Some more fixes to the energy net

This commit is contained in:
modmuss50 2016-03-08 18:55:40 +00:00
parent 7e5e40a338
commit 6765756e2d
2 changed files with 5 additions and 3 deletions

View file

@ -32,7 +32,9 @@ public class TRTickHandler {
@SubscribeEvent
public void worldTick(TickEvent.WorldTickEvent e) {
if(!e.world.isRemote)
if(e.world.isRemote){
return;
}
MinecraftForge.EVENT_BUS.post(new PowerTickEvent());
}

View file

@ -199,7 +199,7 @@ public class TRPowerNet {
public int addEnergy(int max) {
int total = 0;
if (tile.canAcceptEnergy(EnumFacing.NORTH)) {
if (tile.canAcceptEnergy(EnumFacing.NORTH) && max > 0) {
if (type.tier.ordinal() > tile.getTier().ordinal()) {
if (tile instanceof TileEntity) {
((TileEntity) tile).getWorld().createExplosion(new EntityTNTPrimed(((TileEntity) tile).getWorld()), ((TileEntity) tile).getPos().getX(), ((TileEntity) tile).getPos().getY(), ((TileEntity) tile).getPos().getZ(), 2.5F, true);