mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Compromise for render bounding box caching
- Recalculating it once per tick is better than doing it every frame. - Only ever doing it once has proven unreliable.
This commit is contained in:
parent
62b1fe82b7
commit
9d99a5f968
2 changed files with 3 additions and 3 deletions
|
@ -89,8 +89,10 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
super.tick();
|
||||
effects.tick();
|
||||
|
||||
if (world.isRemote)
|
||||
if (world.isRemote) {
|
||||
cachedBoundingBox = null; // cache the bounding box for every frame between ticks
|
||||
return;
|
||||
}
|
||||
|
||||
if (validationCountdown-- <= 0) {
|
||||
validationCountdown = AllConfigs.SERVER.kinetics.kineticValidationFrequency.get();
|
||||
|
@ -220,7 +222,6 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
|||
boolean overStressedBefore = overStressed;
|
||||
clearKineticInformation();
|
||||
|
||||
cachedBoundingBox = null;
|
||||
// DO NOT READ kinetic information when placed after movement
|
||||
if (wasMoved) {
|
||||
super.read(compound, clientPacket);
|
||||
|
|
|
@ -285,7 +285,6 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList
|
|||
|
||||
public void setController(BlockPos controller) {
|
||||
this.controller = controller;
|
||||
cachedBoundingBox = null;
|
||||
}
|
||||
|
||||
public BlockPos getController() {
|
||||
|
|
Loading…
Reference in a new issue