mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
diode and schrabidate blindness fix
This commit is contained in:
parent
29176d0e82
commit
0146c009e7
@ -48,12 +48,12 @@ public class BlockCable extends BlockContainer {
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
|
||||
boolean posX = Library.canConnect(world, x + 1, y, z, Library.NEG_X);
|
||||
boolean negX = Library.canConnect(world, x - 1, y, z, Library.POS_X);
|
||||
boolean posY = Library.canConnect(world, x, y + 1, z, Library.NEG_Y);
|
||||
boolean negY = Library.canConnect(world, x, y - 1, z, Library.POS_Y);
|
||||
boolean posZ = Library.canConnect(world, x, y, z + 1, Library.NEG_Z);
|
||||
boolean negZ = Library.canConnect(world, x, y, z - 1, Library.POS_Z);
|
||||
boolean posX = Library.canConnect(world, x + 1, y, z, Library.POS_X);
|
||||
boolean negX = Library.canConnect(world, x - 1, y, z, Library.NEG_X);
|
||||
boolean posY = Library.canConnect(world, x, y + 1, z, Library.POS_Y);
|
||||
boolean negY = Library.canConnect(world, x, y - 1, z, Library.NEG_Y);
|
||||
boolean posZ = Library.canConnect(world, x, y, z + 1, Library.POS_Z);
|
||||
boolean negZ = Library.canConnect(world, x, y, z - 1, Library.NEG_Z);
|
||||
|
||||
setBlockBounds(posX, negX, posY, negY, posZ, negZ);
|
||||
|
||||
@ -63,12 +63,12 @@ public class BlockCable extends BlockContainer {
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
boolean posX = Library.canConnect(world, x + 1, y, z, Library.NEG_X);
|
||||
boolean negX = Library.canConnect(world, x - 1, y, z, Library.POS_X);
|
||||
boolean posY = Library.canConnect(world, x, y + 1, z, Library.NEG_Y);
|
||||
boolean negY = Library.canConnect(world, x, y - 1, z, Library.POS_Y);
|
||||
boolean posZ = Library.canConnect(world, x, y, z + 1, Library.NEG_Z);
|
||||
boolean negZ = Library.canConnect(world, x, y, z - 1, Library.POS_Z);
|
||||
boolean posX = Library.canConnect(world, x + 1, y, z, Library.POS_X);
|
||||
boolean negX = Library.canConnect(world, x - 1, y, z, Library.NEG_X);
|
||||
boolean posY = Library.canConnect(world, x, y + 1, z, Library.POS_Y);
|
||||
boolean negY = Library.canConnect(world, x, y - 1, z, Library.NEG_Y);
|
||||
boolean posZ = Library.canConnect(world, x, y, z + 1, Library.POS_Z);
|
||||
boolean negZ = Library.canConnect(world, x, y, z - 1, Library.NEG_Z);
|
||||
|
||||
setBlockBounds(posX, negX, posY, negY, posZ, negZ);
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ import com.hbm.util.I18nUtil;
|
||||
import api.hbm.block.IToolable;
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.energy.IEnergyConnector.ConnectionPriority;
|
||||
import api.hbm.energy.IEnergyConnectorBlock;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -32,7 +33,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class CableDiode extends BlockContainer implements ILookOverlay, IToolable, ITooltipProvider {
|
||||
public class CableDiode extends BlockContainer implements IEnergyConnectorBlock, ILookOverlay, IToolable, ITooltipProvider {
|
||||
|
||||
public CableDiode(Material mat) {
|
||||
super(mat);
|
||||
@ -66,6 +67,11 @@ public class CableDiode extends BlockContainer implements ILookOverlay, IToolabl
|
||||
world.setBlockMetadataWithNotify(x, y, z, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||
|
||||
@ -179,6 +185,11 @@ public class CableDiode extends BlockContainer implements ILookOverlay, IToolabl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir) {
|
||||
return dir != getDir();
|
||||
}
|
||||
|
||||
private boolean recursionBrake = false;
|
||||
private long subBuffer;
|
||||
|
||||
@ -177,7 +177,7 @@ public class HazardRegistry {
|
||||
HazardSystem.register(lamp_demon, makeData(RADIATION, 100_000F));
|
||||
|
||||
HazardSystem.register(cell_tritium, makeData(RADIATION, 0.001F));
|
||||
HazardSystem.register(cell_sas3, makeData().addEntry(RADIATION, sas3).addEntry(BLINDING, 10F));
|
||||
HazardSystem.register(cell_sas3, makeData().addEntry(RADIATION, sas3).addEntry(BLINDING, 60F));
|
||||
HazardSystem.register(cell_balefire, makeData(RADIATION, 50F));
|
||||
HazardSystem.register(powder_balefire, makeData(RADIATION, 500F));
|
||||
HazardSystem.register(egg_balefire_shard, makeData(RADIATION, bf * nugget));
|
||||
|
||||
@ -222,7 +222,10 @@ public class TileEntityMachineBattery extends TileEntityMachineBase implements I
|
||||
|
||||
//if it's just a consumer, buffer it as a subscriber
|
||||
} else if(te instanceof IEnergyConnector) {
|
||||
consumers.add((IEnergyConnector) te);
|
||||
IEnergyConnector con = (IEnergyConnector) te;
|
||||
if(con.canConnect(dir.getOpposite())) {
|
||||
consumers.add((IEnergyConnector) te);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user