Fixed #2515
This commit is contained in:
@@ -449,10 +449,6 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
||||
return block.solid && block.fillsTile && !block.synthetic() ? data : 0;
|
||||
}
|
||||
|
||||
//TODO remove this method?
|
||||
public void updateOcclusion(){
|
||||
}
|
||||
|
||||
protected void preChanged(){
|
||||
if(build != null){
|
||||
//only call removed() for the center block - this only gets called once.
|
||||
@@ -475,8 +471,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
||||
other.block = Blocks.air;
|
||||
|
||||
//manually call changed event
|
||||
other.updateOcclusion();
|
||||
world.notifyChanged(other);
|
||||
other.fireChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -533,9 +528,7 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
||||
}
|
||||
}
|
||||
|
||||
updateOcclusion();
|
||||
|
||||
world.notifyChanged(this);
|
||||
fireChanged();
|
||||
|
||||
//recache when static block is added
|
||||
if(block.isStatic()){
|
||||
@@ -543,6 +536,10 @@ public class Tile implements Position, QuadTreeObject, Displayable{
|
||||
}
|
||||
}
|
||||
|
||||
protected void fireChanged(){
|
||||
world.notifyChanged(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void display(Table table){
|
||||
Block toDisplay = overlay.itemDrop != null ? overlay : floor;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class NuclearReactor extends PowerGenerator{
|
||||
@Override
|
||||
public void updateTile(){
|
||||
ConsumeLiquid cliquid = consumes.get(ConsumeType.liquid);
|
||||
Item item = consumes.<ConsumeItems>get(ConsumeType.item).items[0].item;
|
||||
Item item = consumes.getItem().items[0].item;
|
||||
|
||||
int fuel = items.get(item);
|
||||
float fullness = (float)fuel / itemCapacity;
|
||||
|
||||
@@ -34,6 +34,10 @@ public class Consumers{
|
||||
return get(ConsumeType.power);
|
||||
}
|
||||
|
||||
public ConsumeItems getItem(){
|
||||
return get(ConsumeType.item);
|
||||
}
|
||||
|
||||
public boolean hasPower(){
|
||||
return has(ConsumeType.power);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user