4862
This commit is contained in:
parent
f0a70fa478
commit
011ebaba1d
46 changed files with 258 additions and 242 deletions
|
@ -4,7 +4,7 @@ import ic2.api.tile.IWrenchable;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
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;
|
||||
|
@ -143,12 +143,12 @@ public class TileAesu extends TilePowerAcceptor implements IWrenchable {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return getRotation() != Functions.getIntDirFromDirection(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return getRotation() == Functions.getIntDirFromDirection(direction);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.api.upgrade.UpgradeHandler;
|
||||
|
@ -187,7 +187,7 @@ public class TileAlloySmelter extends TilePowerAcceptor implements IWrenchable,
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2} : new int[]{0, 1, 2};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2} : new int[]{0, 1, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -215,12 +215,12 @@ public class TileAlloySmelter extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -174,7 +174,7 @@ public class TileAssemblingMachine extends TilePowerAcceptor implements IWrencha
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2} : new int[]{0, 1, 2};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2} : new int[]{0, 1, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -212,12 +212,12 @@ public class TileAssemblingMachine extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.network.NetworkManager;
|
|||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.misc.Location;
|
||||
import reborncore.common.multiblock.IMultiblockPart;
|
||||
import reborncore.common.util.Inventory;
|
||||
|
@ -81,7 +81,7 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
public int getHeat() {
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
TileEntity tileEntity = worldObj.getTileEntity(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ);
|
||||
if (tileEntity instanceof TileMachineCasing) {
|
||||
if (((TileMachineCasing) tileEntity).isConnected() && ((TileMachineCasing) tileEntity).getMultiblockController().isAssembled()) {
|
||||
|
@ -203,7 +203,7 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3} : new int[]{0, 1, 2, 3};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3} : new int[]{0, 1, 2, 3};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -231,12 +231,12 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
|
@ -189,7 +189,7 @@ public class TileCentrifuge extends TilePowerAcceptor implements IWrenchable, II
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -217,12 +217,12 @@ public class TileCentrifuge extends TilePowerAcceptor implements IWrenchable, II
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.power.IEnergyInterfaceItem;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -156,7 +156,7 @@ public class TileChargeBench extends TilePowerAcceptor implements IWrenchable, I
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -181,12 +181,12 @@ public class TileChargeBench extends TilePowerAcceptor implements IWrenchable, I
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -173,7 +173,7 @@ public class TileChemicalReactor extends TilePowerAcceptor implements IWrenchabl
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2} : new int[]{0, 1, 2};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2} : new int[]{0, 1, 2};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -211,12 +211,12 @@ public class TileChemicalReactor extends TilePowerAcceptor implements IWrenchabl
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import ic2.api.tile.IWrenchable;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.powerSystem.TilePowerAcceptor;
|
||||
|
@ -124,12 +124,12 @@ public class TileChunkLoader extends TilePowerAcceptor implements IWrenchable, I
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.api.fuel.FluidPowerManager;
|
||||
import reborncore.common.util.FluidUtils;
|
||||
|
@ -63,14 +63,14 @@ public class TileDieselGenerator extends TilePowerAcceptor implements IWrenchabl
|
|||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill) {
|
||||
int filled = tank.fill(resource, doFill);
|
||||
tank.compareAndUpdate();
|
||||
return filled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) {
|
||||
if (resource == null || !resource.isFluidEqual(tank.getFluid())) {
|
||||
return null;
|
||||
}
|
||||
|
@ -80,24 +80,24 @@ public class TileDieselGenerator extends TilePowerAcceptor implements IWrenchabl
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
FluidStack drained = tank.drain(maxDrain, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
return drained;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(EnumFacing from, Fluid fluid) {
|
||||
return FluidPowerManager.fluidPowerValues.containsKey(fluid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid) {
|
||||
return tank.getFluid() == null || tank.getFluid().getFluid() == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return new FluidTankInfo[]{tank.getInfo()};
|
||||
}
|
||||
|
||||
|
@ -222,12 +222,12 @@ public class TileDieselGenerator extends TilePowerAcceptor implements IWrenchabl
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import net.minecraft.init.Blocks;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -146,12 +146,12 @@ public class TileDragonEggSiphoner extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.common.util.FluidUtils;
|
||||
import reborncore.common.util.Inventory;
|
||||
|
@ -76,14 +76,14 @@ public class TileGasTurbine extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill) {
|
||||
int fill = tank.fill(resource, doFill);
|
||||
tank.compareAndUpdate();
|
||||
return fill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource,
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource,
|
||||
boolean doDrain) {
|
||||
FluidStack drain = tank.drain(resource.amount, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
|
@ -91,14 +91,14 @@ public class TileGasTurbine extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
FluidStack drain = tank.drain(maxDrain, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
return drain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(EnumFacing from, Fluid fluid) {
|
||||
if (fluid != null) {
|
||||
return fluids.containsKey(FluidRegistry.getFluidName(fluid));
|
||||
}
|
||||
|
@ -106,12 +106,12 @@ public class TileGasTurbine extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid) {
|
||||
return tank.getFluid() == null || tank.getFluid().getFluid() == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return new FluidTankInfo[]{tank.getInfo()};
|
||||
}
|
||||
|
||||
|
@ -241,12 +241,12 @@ public class TileGasTurbine extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.inventory.ISidedInventory;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.common.misc.Location;
|
||||
import reborncore.common.util.FluidUtils;
|
||||
|
@ -80,7 +80,7 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable, IFlui
|
|||
}
|
||||
|
||||
public boolean getMutliBlock() {
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
TileEntity tileEntity = worldObj.getTileEntity(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ);
|
||||
if (tileEntity instanceof TileMachineCasing) {
|
||||
if ((tileEntity.getBlockType() instanceof BlockMachineCasing)) {
|
||||
|
@ -136,7 +136,7 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable, IFlui
|
|||
|
||||
/* IFluidHandler */
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill) {
|
||||
if (resource.getFluid() == FluidRegistry.WATER || resource.getFluid() == ModFluids.fluidMercury || resource.getFluid() == ModFluids.fluidSodiumpersulfate) {
|
||||
int filled = tank.fill(resource, doFill);
|
||||
tank.compareAndUpdate();
|
||||
|
@ -146,7 +146,7 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) {
|
||||
if (resource == null || !resource.isFluidEqual(tank.getFluid())) {
|
||||
return null;
|
||||
}
|
||||
|
@ -156,14 +156,14 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
FluidStack drained = tank.drain(maxDrain, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
return drained;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(EnumFacing from, Fluid fluid) {
|
||||
if (fluid == FluidRegistry.WATER || fluid == ModFluids.fluidMercury || fluid == ModFluids.fluidSodiumpersulfate) {
|
||||
return true;
|
||||
}
|
||||
|
@ -171,12 +171,12 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return new FluidTankInfo[]{tank.getInfo()};
|
||||
}
|
||||
|
||||
|
@ -243,7 +243,7 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable, IFlui
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -271,12 +271,12 @@ public class TileGrinder extends TilePowerAcceptor implements IWrenchable, IFlui
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import ic2.api.tile.IWrenchable;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.powerSystem.TilePowerAcceptor;
|
||||
|
@ -80,12 +80,12 @@ public class TileHeatGenerator extends TilePowerAcceptor implements IWrenchable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.inventory.ISidedInventory;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.misc.Location;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
|
@ -67,7 +67,7 @@ public class TileImplosionCompressor extends TilePowerAcceptor implements IWrenc
|
|||
}
|
||||
|
||||
public boolean getMutliBlock() {
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
TileEntity tileEntity = worldObj.getTileEntity(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ);
|
||||
if (tileEntity instanceof TileMachineCasing) {
|
||||
if ((tileEntity.getBlockType() instanceof BlockMachineCasing)) {
|
||||
|
@ -181,7 +181,7 @@ public class TileImplosionCompressor extends TilePowerAcceptor implements IWrenc
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3} : new int[]{0, 1, 2, 3};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3} : new int[]{0, 1, 2, 3};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -209,12 +209,12 @@ public class TileImplosionCompressor extends TilePowerAcceptor implements IWrenc
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -186,7 +186,7 @@ public class TileIndustrialElectrolyzer extends TilePowerAcceptor implements IWr
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5} : new int[]{0, 1, 2, 3, 4, 5};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -214,12 +214,12 @@ public class TileIndustrialElectrolyzer extends TilePowerAcceptor implements IWr
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.inventory.ISidedInventory;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.common.misc.Location;
|
||||
|
@ -53,7 +53,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
public boolean getMutliBlock() {
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
TileEntity tileEntity = worldObj.getTileEntity(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ);
|
||||
if (tileEntity instanceof TileMachineCasing) {
|
||||
if ((tileEntity.getBlockType() instanceof BlockMachineCasing)) {
|
||||
|
@ -126,7 +126,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
|
||||
/* IFluidHandler */
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill) {
|
||||
if (resource.getFluid() == FluidRegistry.WATER || resource.getFluid() == ModFluids.fluidMercury || resource.getFluid() == ModFluids.fluidSodiumpersulfate) {
|
||||
int filled = tank.fill(resource, doFill);
|
||||
tank.compareAndUpdate();
|
||||
|
@ -136,7 +136,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain) {
|
||||
if (resource == null || !resource.isFluidEqual(tank.getFluid())) {
|
||||
return null;
|
||||
}
|
||||
|
@ -146,14 +146,14 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
FluidStack drained = tank.drain(maxDrain, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
return drained;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(EnumFacing from, Fluid fluid) {
|
||||
if (fluid == FluidRegistry.WATER) {
|
||||
return true;
|
||||
}
|
||||
|
@ -161,12 +161,12 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return new FluidTankInfo[]{tank.getInfo()};
|
||||
}
|
||||
|
||||
|
@ -233,7 +233,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4} : new int[]{0, 1, 2, 3, 4};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4} : new int[]{0, 1, 2, 3, 4};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -261,12 +261,12 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -139,7 +139,7 @@ public class TileMatterFabricator extends TilePowerAcceptor implements IWrenchab
|
|||
// ISidedInventory
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
return side == ForgeDirection.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5, 6} : new int[]{0, 1, 2, 3, 4, 5, 6};
|
||||
return side == EnumFacing.DOWN.ordinal() ? new int[]{0, 1, 2, 3, 4, 5, 6} : new int[]{0, 1, 2, 3, 4, 5, 6};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -243,12 +243,12 @@ public class TileMatterFabricator extends TilePowerAcceptor implements IWrenchab
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ package techreborn.tiles;
|
|||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import techreborn.powerSystem.TilePowerAcceptor;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
@ -23,12 +23,12 @@ public class TilePlayerDectector extends TilePowerAcceptor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
@ -82,14 +82,14 @@ public class TileQuantumTank extends TileMachineBase implements IFluidHandler,
|
|||
|
||||
// IFluidHandler
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill) {
|
||||
int fill = tank.fill(resource, doFill);
|
||||
tank.compareAndUpdate();
|
||||
return fill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource,
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource,
|
||||
boolean doDrain) {
|
||||
FluidStack drain = tank.drain(resource.amount, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
|
@ -97,24 +97,24 @@ public class TileQuantumTank extends TileMachineBase implements IFluidHandler,
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
FluidStack drain = tank.drain(maxDrain, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
return drain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(EnumFacing from, Fluid fluid) {
|
||||
return tank.getFluid() == null || tank.getFluid().getFluid() == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid) {
|
||||
return tank.getFluid() == null || tank.getFluid().getFluid() == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return new FluidTankInfo[]{tank.getInfo()};
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.api.RollingMachineRecipe;
|
||||
|
@ -52,12 +52,12 @@ public class TileRollingMachine extends TilePowerAcceptor implements IWrenchable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.common.util.FluidUtils;
|
||||
import reborncore.common.util.Inventory;
|
||||
|
@ -82,14 +82,14 @@ public class TileSemifluidGenerator extends TilePowerAcceptor implements IWrench
|
|||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill) {
|
||||
int fill = tank.fill(resource, doFill);
|
||||
tank.compareAndUpdate();
|
||||
return fill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource,
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource,
|
||||
boolean doDrain) {
|
||||
FluidStack drain = tank.drain(resource.amount, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
|
@ -97,14 +97,14 @@ public class TileSemifluidGenerator extends TilePowerAcceptor implements IWrench
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
FluidStack drain = tank.drain(maxDrain, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
return drain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(EnumFacing from, Fluid fluid) {
|
||||
if (fluid != null) {
|
||||
return fluids.containsKey(FluidRegistry.getFluidName(fluid));
|
||||
}
|
||||
|
@ -112,12 +112,12 @@ public class TileSemifluidGenerator extends TilePowerAcceptor implements IWrench
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid) {
|
||||
return tank.getFluid() == null || tank.getFluid().getFluid() == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return new FluidTankInfo[]{tank.getInfo()};
|
||||
}
|
||||
|
||||
|
@ -244,12 +244,12 @@ public class TileSemifluidGenerator extends TilePowerAcceptor implements IWrench
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.network.NetworkManager;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.common.util.FluidUtils;
|
||||
import reborncore.common.util.Inventory;
|
||||
|
@ -63,14 +63,14 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
|
|||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill) {
|
||||
int fill = tank.fill(resource, doFill);
|
||||
tank.compareAndUpdate();
|
||||
return fill;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource,
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource,
|
||||
boolean doDrain) {
|
||||
FluidStack drain = tank.drain(resource.amount, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
|
@ -78,14 +78,14 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
|
|||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain) {
|
||||
FluidStack drain = tank.drain(maxDrain, doDrain);
|
||||
tank.compareAndUpdate();
|
||||
return drain;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canFill(EnumFacing from, Fluid fluid) {
|
||||
if (fluid != null) {
|
||||
if (fluid == FluidRegistry.LAVA) {
|
||||
return true;
|
||||
|
@ -95,12 +95,12 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid) {
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid) {
|
||||
return tank.getFluid() == null || tank.getFluid().getFluid() == fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from) {
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from) {
|
||||
return new FluidTankInfo[]{tank.getInfo()};
|
||||
}
|
||||
|
||||
|
@ -138,7 +138,7 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
|
|||
super.updateEntity();
|
||||
if (!worldObj.isRemote) {
|
||||
FluidUtils.drainContainers(this, inventory, 0, 1);
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
if (worldObj.getBlock(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ) == Blocks.lava) {
|
||||
addEnergy(1);
|
||||
}
|
||||
|
@ -224,12 +224,12 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -45,12 +45,12 @@ public class TileVacuumFreezer extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -183,9 +183,9 @@ public class TileVacuumFreezer extends TilePowerAcceptor implements IWrenchable,
|
|||
}
|
||||
|
||||
public boolean checkMachine() {
|
||||
int xDir = ForgeDirection.UP.offsetX * 2;
|
||||
int yDir = ForgeDirection.UP.offsetY * 2;
|
||||
int zDir = ForgeDirection.UP.offsetZ * 2;
|
||||
int xDir = EnumFacing.UP.offsetX * 2;
|
||||
int yDir = EnumFacing.UP.offsetY * 2;
|
||||
int zDir = EnumFacing.UP.offsetZ * 2;
|
||||
for (int i = -1; i < 2; i++) {
|
||||
for (int j = -1; j < 2; j++) {
|
||||
for (int k = -1; k < 2; k++) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.Inventory;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.api.reactor.FusionReactorRecipe;
|
||||
|
@ -41,16 +41,16 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
if(direction == ForgeDirection.DOWN || direction == ForgeDirection.UP){
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
if(direction == EnumFacing.DOWN || direction == EnumFacing.UP){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
if(direction == ForgeDirection.DOWN || direction == ForgeDirection.UP){
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
if(direction == EnumFacing.DOWN || direction == EnumFacing.UP){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -3,7 +3,7 @@ package techreborn.tiles.idsu;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import reborncore.common.misc.Functions;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
@ -46,12 +46,12 @@ public class TileIDSU extends TilePowerAcceptor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean canAcceptEnergy(ForgeDirection direction) {
|
||||
public boolean canAcceptEnergy(EnumFacing direction) {
|
||||
return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) != Functions.getIntDirFromDirection(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvideEnergy(ForgeDirection direction) {
|
||||
public boolean canProvideEnergy(EnumFacing direction) {
|
||||
return worldObj.getBlockMetadata(xCoord, yCoord, zCoord) == Functions.getIntDirFromDirection(direction);
|
||||
}
|
||||
|
||||
|
|
|
@ -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