mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +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();
|
super.tick();
|
||||||
effects.tick();
|
effects.tick();
|
||||||
|
|
||||||
if (world.isRemote)
|
if (world.isRemote) {
|
||||||
|
cachedBoundingBox = null; // cache the bounding box for every frame between ticks
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (validationCountdown-- <= 0) {
|
if (validationCountdown-- <= 0) {
|
||||||
validationCountdown = AllConfigs.SERVER.kinetics.kineticValidationFrequency.get();
|
validationCountdown = AllConfigs.SERVER.kinetics.kineticValidationFrequency.get();
|
||||||
|
@ -220,7 +222,6 @@ public abstract class KineticTileEntity extends SmartTileEntity
|
||||||
boolean overStressedBefore = overStressed;
|
boolean overStressedBefore = overStressed;
|
||||||
clearKineticInformation();
|
clearKineticInformation();
|
||||||
|
|
||||||
cachedBoundingBox = null;
|
|
||||||
// DO NOT READ kinetic information when placed after movement
|
// DO NOT READ kinetic information when placed after movement
|
||||||
if (wasMoved) {
|
if (wasMoved) {
|
||||||
super.read(compound, clientPacket);
|
super.read(compound, clientPacket);
|
||||||
|
|
|
@ -285,7 +285,6 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList
|
||||||
|
|
||||||
public void setController(BlockPos controller) {
|
public void setController(BlockPos controller) {
|
||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
cachedBoundingBox = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPos getController() {
|
public BlockPos getController() {
|
||||||
|
|
Loading…
Reference in a new issue