c l e a n u p
This commit is contained in:
@@ -39,12 +39,12 @@ public class ConsumeLiquid extends ConsumeLiquidBase{
|
||||
|
||||
@Override
|
||||
public void update(Tilec entity){
|
||||
entity.getLiquids().remove(liquid, Math.min(use(entity), entity.getLiquids().get(liquid)));
|
||||
entity.liquids().remove(liquid, Math.min(use(entity), entity.liquids().get(liquid)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean valid(Tilec entity){
|
||||
return entity != null && entity.getLiquids() != null && entity.getLiquids().get(liquid) >= use(entity);
|
||||
return entity != null && entity.liquids() != null && entity.liquids().get(liquid) >= use(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,6 +23,6 @@ public abstract class ConsumeLiquidBase extends Consume{
|
||||
}
|
||||
|
||||
protected float use(Tilec entity){
|
||||
return Math.min(amount * entity.delta(), entity.block.liquidCapacity);
|
||||
return Math.min(amount * entity.delta(), entity.block().liquidCapacity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ConsumePower extends Consume{
|
||||
|
||||
@Override
|
||||
public void update(Tilec entity){
|
||||
// Nothing to do since PowerGraph directly updates entity.getPower().status
|
||||
// Nothing to do since PowerGraph directly updates entity.power().status
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user