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