4862
This commit is contained in:
parent
f0a70fa478
commit
011ebaba1d
46 changed files with 258 additions and 242 deletions
|
@ -1,7 +1,7 @@
|
|||
package techreborn.tiles.lesu;
|
||||
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.misc.Functions;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
@ -34,7 +34,7 @@ public class TileLesu extends TilePowerAcceptor {//TODO wrench
|
|||
}
|
||||
countedNetworks.clear();
|
||||
connectedBlocks = 0;
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing dir : EnumFacing.VALID_DIRECTIONS) {
|
||||
if (worldObj.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ) instanceof TileLesuStorage) {
|
||||
if (((TileLesuStorage) worldObj.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ)).network != null) {
|
||||
LesuNetwork network = ((TileLesuStorage) worldObj.getTileEntity(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ)).network;
|
||||
|
@ -83,12 +83,12 @@ public class TileLesu extends TilePowerAcceptor {//TODO wrench
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return Functions.getIntDirFromDirection(direction) != getRotation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return Functions.getIntDirFromDirection(direction) == getRotation();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.tiles.lesu;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import techreborn.tiles.TileMachineBase;
|
||||
|
||||
public class TileLesuStorage extends TileMachineBase {
|
||||
|
@ -23,7 +23,7 @@ public class TileLesuStorage extends TileMachineBase {
|
|||
public final void findAndJoinNetwork(World world, int x, int y, int z) {
|
||||
network = new LesuNetwork();
|
||||
network.addElement(this);
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
if (world.getTileEntity(x + direction.offsetX, y + direction.offsetY, z + direction.offsetZ) instanceof TileLesuStorage) {
|
||||
TileLesuStorage lesu = (TileLesuStorage) world.getTileEntity(x + direction.offsetX, y + direction.offsetY, z + direction.offsetZ);
|
||||
if (lesu.network != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue