More cleanup

This commit is contained in:
Anuken 2020-02-03 20:24:49 -05:00
parent 88d2ec5be8
commit a942ed2cad
141 changed files with 2213 additions and 1819 deletions

View file

@ -87,19 +87,19 @@ public class PowerTestFixture{
// Simulate the "changed" method. Calling it through reflections would require half the game to be initialized.
tile.entity = block.newEntity().init(tile, false);
tile.entity.cons = new ConsumeModule(tile.entity);
if(block.hasItems) tile.entity.items = new ItemModule();
if(block.hasLiquids) tile.entity.liquids = new LiquidModule();
tile.entity.getCons() = new ConsumeModule(tile.entity);
if(block.hasItems) tile.entity.getItems() = new ItemModule();
if(block.hasLiquids) tile.entity.getLiquids() = new LiquidModule();
if(block.hasPower){
tile.entity.power = new PowerModule();
tile.entity.power.graph = new PowerGraph(){
tile.entity.getPower() = new PowerModule();
tile.entity.getPower().graph = new PowerGraph(){
//assume there's always something consuming power
@Override
public float getUsageFraction(){
return 1f;
}
};
tile.entity.power.graph.add(tile);
tile.entity.getPower().graph.add(tile);
}
// Assign incredibly high health so the block does not get destroyed on e.g. burning Blast Compound