Mark certain blocks as non-updating
This commit is contained in:
@@ -1008,6 +1008,7 @@ public class Blocks{
|
||||
outputsLiquid = true;
|
||||
envEnabled = Env.any;
|
||||
drawer = new DrawMixer(true);
|
||||
liquidCapacity = 24f;
|
||||
|
||||
consumePower(1f);
|
||||
consumeItem(Items.titanium);
|
||||
@@ -2018,7 +2019,7 @@ public class Blocks{
|
||||
}};
|
||||
|
||||
liquidJunction = new LiquidJunction("liquid-junction"){{
|
||||
requirements(Category.liquid, with(Items.graphite, 2, Items.metaglass, 2));
|
||||
requirements(Category.liquid, with(Items.graphite, 4, Items.metaglass, 8));
|
||||
}};
|
||||
|
||||
bridgeConduit = new LiquidBridge("bridge-conduit"){{
|
||||
|
||||
@@ -16,7 +16,8 @@ public class OverflowGate extends Block{
|
||||
super(name);
|
||||
hasItems = true;
|
||||
solid = true;
|
||||
update = true;
|
||||
update = false;
|
||||
destructible = true;
|
||||
group = BlockGroup.transportation;
|
||||
instantTransfer = true;
|
||||
unloadable = false;
|
||||
|
||||
@@ -19,7 +19,8 @@ public class Sorter extends Block{
|
||||
|
||||
public Sorter(String name){
|
||||
super(name);
|
||||
update = true;
|
||||
update = false;
|
||||
destructible = true;
|
||||
solid = true;
|
||||
instantTransfer = true;
|
||||
group = BlockGroup.transportation;
|
||||
|
||||
@@ -24,6 +24,9 @@ public class Battery extends PowerDistributor{
|
||||
flags = EnumSet.of(BlockFlag.battery);
|
||||
//TODO could be supported everywhere...
|
||||
envEnabled |= Env.space;
|
||||
destructible = true;
|
||||
//batteries don't need to update
|
||||
update = false;
|
||||
}
|
||||
|
||||
public class BatteryBuild extends Building{
|
||||
|
||||
@@ -94,6 +94,7 @@ public class BeamNode extends PowerBlock{
|
||||
|
||||
@Override
|
||||
public void updateTile(){
|
||||
//TODO this block technically does not need to update every frame, perhaps put it in a special list.
|
||||
if(lastChange != world.tileChanges){
|
||||
lastChange = world.tileChanges;
|
||||
updateDirections();
|
||||
|
||||
@@ -46,6 +46,10 @@ public class PowerNode extends PowerBlock{
|
||||
schematicPriority = -10;
|
||||
drawDisabled = false;
|
||||
envEnabled |= Env.space;
|
||||
destructible = true;
|
||||
|
||||
//nodes do not even need to update
|
||||
update = false;
|
||||
|
||||
config(Integer.class, (entity, value) -> {
|
||||
PowerModule power = entity.power;
|
||||
|
||||
Reference in New Issue
Block a user