fixed batteries not disconnecting, acidizer output stacks

This commit is contained in:
Bob 2021-12-26 22:05:44 +01:00
parent cbc620f646
commit 2aaa426feb
5 changed files with 22 additions and 8 deletions

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (4088)";
public static final String VERSION = "1.0.27 BETA (4095)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -217,8 +217,15 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
if(te instanceof IEnergyConductor) {
IEnergyConductor con = (IEnergyConductor) te;
if(con.getPowerNet() != null && !con.getPowerNet().isSubscribed(this))
con.getPowerNet().subscribe(this);
if(con.getPowerNet() != null) {
if(mode == 1 || mode == 2) {
if(con.getPowerNet().isSubscribed(this)) {
con.getPowerNet().unsubscribe(this);
}
} else if(!con.getPowerNet().isSubscribed(this)) {
con.getPowerNet().subscribe(this);
}
}
}
}
}

View File

@ -160,7 +160,7 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
return false;
//Or is the output slot already full?
if(slots[2] != null && slots[2].stackSize >= slots[2].getMaxStackSize())
if(slots[2] != null && slots[2].stackSize + result.stackSize > slots[2].getMaxStackSize())
return false;
return true;

View File

@ -77,9 +77,16 @@ public class TileEntityMachineFENSU extends TileEntityMachineBattery {
if(te instanceof IEnergyConductor) {
IEnergyConductor con = (IEnergyConductor) te;
if(con.getPowerNet() != null && !con.getPowerNet().isSubscribed(this))
con.getPowerNet().subscribe(this);
if(con.getPowerNet() != null) {
if(mode == 1 || mode == 2) {
if(con.getPowerNet().isSubscribed(this)) {
con.getPowerNet().unsubscribe(this);
}
} else if(!con.getPowerNet().isSubscribed(this)) {
con.getPowerNet().subscribe(this);
}
}
}
}

View File

@ -3,7 +3,7 @@
"modid": "hbm",
"name": "Hbm's Nuclear Tech",
"description": "A mod that adds weapons, nuclear themed stuff and machines",
"version":"1.0.27_X4088",
"version":"1.0.27_X4095",
"mcversion": "1.7.10",
"url": "",
"updateUrl": "",