4862
This commit is contained in:
parent
f0a70fa478
commit
011ebaba1d
46 changed files with 258 additions and 242 deletions
|
@ -1,6 +1,6 @@
|
|||
package techreborn.api.power;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public interface IEnergyInterfaceTile {
|
||||
|
||||
|
@ -76,13 +76,13 @@ public interface IEnergyInterfaceTile {
|
|||
* @param direction The direction to insert energy into
|
||||
* @return if the tile can accept energy from the direction
|
||||
*/
|
||||
public boolean canAcceptEnergy(ForgeDirection direction);
|
||||
public boolean canAcceptEnergy(EnumFacing direction);
|
||||
|
||||
/**
|
||||
* @param direction The direction to provide energy from
|
||||
* @return true if the tile can provide energy to that direction
|
||||
*/
|
||||
public boolean canProvideEnergy(ForgeDirection direction);
|
||||
public boolean canProvideEnergy(EnumFacing direction);
|
||||
|
||||
/**
|
||||
* Gets the max output, set to -1 if you don't want the tile to provide energy
|
||||
|
|
|
@ -20,7 +20,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
@ -187,14 +187,14 @@ public class BlockMachineBase extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(World worldObj, int x, int y, int z, ForgeDirection axis) {
|
||||
if (axis == ForgeDirection.UNKNOWN) {
|
||||
public boolean rotateBlock(World worldObj, int x, int y, int z, EnumFacing axis) {
|
||||
if (axis == EnumFacing.UNKNOWN) {
|
||||
return false;
|
||||
} else {
|
||||
TileEntity tile = worldObj.getTileEntity(x, y, z);
|
||||
if (tile != null && tile instanceof TileMachineBase) {
|
||||
TileMachineBase machineBase = (TileMachineBase) tile;
|
||||
machineBase.setRotation(ForgeDirection.getOrientation(machineBase.getRotation()).getRotation(axis).ordinal());
|
||||
machineBase.setRotation(EnumFacing.getOrientation(machineBase.getRotation()).getRotation(axis).ordinal());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -222,7 +222,7 @@ public class BlockMachineBase extends BlockContainer {
|
|||
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
|
||||
// Handle filled containers
|
||||
if (liquid != null) {
|
||||
int qty = tank.fill(ForgeDirection.UNKNOWN, liquid, true);
|
||||
int qty = tank.fill(EnumFacing.UNKNOWN, liquid, true);
|
||||
|
||||
if (qty != 0 && !entityplayer.capabilities.isCreativeMode) {
|
||||
if (current.stackSize > 1) {
|
||||
|
@ -240,7 +240,7 @@ public class BlockMachineBase extends BlockContainer {
|
|||
|
||||
// Handle empty containers
|
||||
} else {
|
||||
FluidStack available = tank.getTankInfo(ForgeDirection.UNKNOWN)[0].fluid;
|
||||
FluidStack available = tank.getTankInfo(EnumFacing.UNKNOWN)[0].fluid;
|
||||
|
||||
if (available != null) {
|
||||
ItemStack filled = FluidContainerRegistry.fillFluidContainer(available, current);
|
||||
|
@ -261,7 +261,7 @@ public class BlockMachineBase extends BlockContainer {
|
|||
}
|
||||
}
|
||||
|
||||
tank.drain(ForgeDirection.UNKNOWN, liquid.amount, true);
|
||||
tank.drain(EnumFacing.UNKNOWN, liquid.amount, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -275,19 +275,19 @@ public class BlockMachineBase extends BlockContainer {
|
|||
if (!world.isRemote) {
|
||||
IFluidContainerItem container = (IFluidContainerItem) current.getItem();
|
||||
FluidStack liquid = container.getFluid(current);
|
||||
FluidStack tankLiquid = tank.getTankInfo(ForgeDirection.UNKNOWN)[0].fluid;
|
||||
FluidStack tankLiquid = tank.getTankInfo(EnumFacing.UNKNOWN)[0].fluid;
|
||||
boolean mustDrain = liquid == null || liquid.amount == 0;
|
||||
boolean mustFill = tankLiquid == null || tankLiquid.amount == 0;
|
||||
if (mustDrain && mustFill) {
|
||||
// Both are empty, do nothing
|
||||
} else if (mustDrain || !entityplayer.isSneaking()) {
|
||||
liquid = tank.drain(ForgeDirection.UNKNOWN, 1000, false);
|
||||
liquid = tank.drain(EnumFacing.UNKNOWN, 1000, false);
|
||||
int qtyToFill = container.fill(current, liquid, true);
|
||||
tank.drain(ForgeDirection.UNKNOWN, qtyToFill, true);
|
||||
tank.drain(EnumFacing.UNKNOWN, qtyToFill, true);
|
||||
} else if (mustFill || entityplayer.isSneaking()) {
|
||||
if (liquid.amount > 0) {
|
||||
int qty = tank.fill(ForgeDirection.UNKNOWN, liquid, false);
|
||||
tank.fill(ForgeDirection.UNKNOWN, container.drain(current, qty, true), true);
|
||||
int qty = tank.fill(EnumFacing.UNKNOWN, liquid, false);
|
||||
tank.fill(EnumFacing.UNKNOWN, container.drain(current, qty, true), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -69,8 +69,8 @@ public class BlockMachineFrame extends Block {
|
|||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
|
|
|
@ -14,7 +14,7 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.util.OreDrop;
|
||||
import reborncore.common.util.OreDropSet;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
@ -152,8 +152,8 @@ public class BlockOre extends Block {
|
|||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -80,8 +80,8 @@ public class BlockStorage extends Block {
|
|||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -77,8 +77,8 @@ public class BlockStorage2 extends Block {
|
|||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package techreborn.client;
|
||||
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -53,9 +53,9 @@ public class ClientMultiBlocks {
|
|||
}
|
||||
|
||||
public static void 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++) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.client.gui.GuiUtil;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import reborncore.client.multiblock.MultiblockSet;
|
||||
|
@ -41,7 +41,7 @@ public class GuiBlastFurnace extends GuiContainer {
|
|||
GuiButton button = new GuiButton(212, k + 4, l + 6, 20, 20, "");
|
||||
buttonList.add(button);
|
||||
super.initGui();
|
||||
ChunkCoordinates coordinates = new ChunkCoordinates(blastfurnace.xCoord - (ForgeDirection.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.yCoord - 1, blastfurnace.zCoord - (ForgeDirection.getOrientation(blastfurnace.getRotation()).offsetZ * 2));
|
||||
ChunkCoordinates coordinates = new ChunkCoordinates(blastfurnace.xCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.yCoord - 1, blastfurnace.zCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetZ * 2));
|
||||
if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor) && blastfurnace.getHeat() != 0){
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
button.displayString = "B";
|
||||
|
@ -134,7 +134,7 @@ public class GuiBlastFurnace extends GuiContainer {
|
|||
MultiblockSet set = new MultiblockSet(multiblock);
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(set);
|
||||
ClientProxy.multiblockRenderEvent.partent = new Location(blastfurnace.xCoord, blastfurnace.yCoord, blastfurnace.zCoord, blastfurnace.getWorldObj());
|
||||
ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(blastfurnace.xCoord - (ForgeDirection.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.yCoord - 1, blastfurnace.zCoord - (ForgeDirection.getOrientation(blastfurnace.getRotation()).offsetZ * 2));
|
||||
ClientProxy.multiblockRenderEvent.anchor = new ChunkCoordinates(blastfurnace.xCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetX * 2), blastfurnace.yCoord - 1, blastfurnace.zCoord - (EnumFacing.getOrientation(blastfurnace.getRotation()).offsetZ * 2));
|
||||
}
|
||||
button.displayString = "A";
|
||||
} else {
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import reborncore.client.multiblock.MultiblockSet;
|
||||
import reborncore.common.misc.Location;
|
||||
|
@ -51,7 +51,7 @@ public class GuiFusionReactor extends GuiContainer {
|
|||
GuiButton button = new GuiButton(212, k + this.xSize - 24, l + 4, 20, 20, "");
|
||||
buttonList.add(button);
|
||||
super.initGui();
|
||||
ChunkCoordinates coordinates = new ChunkCoordinates(fusionController.xCoord - (ForgeDirection.getOrientation(fusionController.getRotation()).offsetX * 2), fusionController.yCoord - 1, fusionController.zCoord - (ForgeDirection.getOrientation(fusionController.getRotation()).offsetZ * 2));
|
||||
ChunkCoordinates coordinates = new ChunkCoordinates(fusionController.xCoord - (EnumFacing.getOrientation(fusionController.getRotation()).offsetX * 2), fusionController.yCoord - 1, fusionController.zCoord - (EnumFacing.getOrientation(fusionController.getRotation()).offsetZ * 2));
|
||||
if(coordinates.equals(ClientProxy.multiblockRenderEvent.anchor)){
|
||||
ClientProxy.multiblockRenderEvent.setMultiblock(null);
|
||||
button.displayString = "B";
|
||||
|
|
|
@ -7,7 +7,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.client.gui.GuiUtil;
|
||||
import reborncore.client.multiblock.MultiblockSet;
|
||||
import reborncore.common.misc.Location;
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.block.Block;
|
|||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.misc.Functions;
|
||||
import reborncore.common.misc.vecmath.Vecs3d;
|
||||
import reborncore.common.misc.vecmath.Vecs3dCube;
|
||||
|
@ -46,7 +46,7 @@ public class RenderCablePart {
|
|||
Block block = part.getBlockType();
|
||||
tessellator.setBrightness(block.getMixedBrightnessForBlock(part.getWorld(), part.getX(), part.getY(), part.getZ()));
|
||||
renderBox(part.boundingBoxes[6], block, tessellator, renderblocks, texture, xD, yD, zD, 0F);
|
||||
for (ForgeDirection direction : ForgeDirection.values()) {
|
||||
for (EnumFacing direction : EnumFacing.values()) {
|
||||
if (part.connectedSides.get(direction) != null) {
|
||||
renderBox(part.boundingBoxes[Functions.getIntDirFromDirection(direction)], block, tessellator, renderblocks, texture, xD, yD, zD, 0f);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import uk.co.qmunity.lib.ref.Names;
|
||||
|
||||
public class ModPartItem extends Item {
|
||||
|
@ -23,7 +23,7 @@ public class ModPartItem extends Item {
|
|||
@Override
|
||||
public boolean onItemUse(ItemStack item, EntityPlayer player, World world,
|
||||
int x, int y, int z, int face, float x_, float y_, float z_) {
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(face);
|
||||
EnumFacing dir = EnumFacing.getOrientation(face);
|
||||
if (ModPartUtils.hasPart(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, modPart.getName())) {
|
||||
x = x + dir.offsetX;
|
||||
y = y + dir.offsetY;
|
||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.misc.Location;
|
||||
import reborncore.common.misc.vecmath.Vecs3dCube;
|
||||
import techreborn.partSystem.IModPart;
|
||||
|
@ -51,7 +51,7 @@ public class QModPartFactory implements IPartFactory, IPartProvider {
|
|||
if (part == null)
|
||||
return false;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(face);
|
||||
EnumFacing dir = EnumFacing.getOrientation(face);
|
||||
return MultipartCompatibility.placePartInWorld(part, world, new Vec3i(
|
||||
x, y, z), dir, player, item);
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import reborncore.common.misc.Location;
|
||||
import reborncore.common.misc.vecmath.Vecs3d;
|
||||
|
@ -51,7 +51,7 @@ public class PartPlacementRenderer {
|
|||
IModPart part = ((ModPartItem) item.getItem()).getModPart();
|
||||
if (part == null)
|
||||
return;
|
||||
ForgeDirection faceHit = ForgeDirection.getOrientation(mop.sideHit);
|
||||
EnumFacing faceHit = EnumFacing.getOrientation(mop.sideHit);
|
||||
Location location = new Location(mop.blockX, mop.blockY, mop.blockZ);
|
||||
if (fb == null || width != Minecraft.getMinecraft().displayWidth
|
||||
|| height != Minecraft.getMinecraft().displayHeight) {
|
||||
|
|
|
@ -16,7 +16,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.misc.Functions;
|
||||
import reborncore.common.misc.Location;
|
||||
import reborncore.common.misc.vecmath.Vecs3d;
|
||||
|
@ -36,17 +36,17 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
public Vecs3dCube[] boundingBoxes = new Vecs3dCube[14];
|
||||
public float center = 0.6F;
|
||||
public float offset = 0.10F;
|
||||
public Map<ForgeDirection, TileEntity> connectedSides;
|
||||
public Map<EnumFacing, TileEntity> connectedSides;
|
||||
public int ticks = 0;
|
||||
public boolean addedToEnergyNet = false;
|
||||
public ItemStack stack;
|
||||
public int type = 0;
|
||||
protected ForgeDirection[] dirs = ForgeDirection.values();
|
||||
protected EnumFacing[] dirs = EnumFacing.values();
|
||||
private boolean[] connections = new boolean[6];
|
||||
private boolean hasCheckedSinceStartup;
|
||||
|
||||
public CablePart() {
|
||||
connectedSides = new HashMap<ForgeDirection, TileEntity>();
|
||||
connectedSides = new HashMap<EnumFacing, TileEntity>();
|
||||
}
|
||||
|
||||
public static int getMaxCapacity(int type) {
|
||||
|
@ -259,7 +259,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
+ w);
|
||||
|
||||
int i = 0;
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing dir : EnumFacing.VALID_DIRECTIONS) {
|
||||
double xMin1 = (dir.offsetX < 0 ? 0.0
|
||||
: (dir.offsetX == 0 ? centerFirst - w : centerFirst + w));
|
||||
double xMax1 = (dir.offsetX > 0 ? 1.0
|
||||
|
@ -283,7 +283,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
|
||||
@Override
|
||||
public void addCollisionBoxesToList(List<Vecs3dCube> boxes, Entity entity) {
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing dir : EnumFacing.VALID_DIRECTIONS) {
|
||||
if (connectedSides.containsKey(dir))
|
||||
boxes.add(boundingBoxes[Functions.getIntDirFromDirection(dir)]);
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
@Override
|
||||
public List<Vecs3dCube> getSelectionBoxes() {
|
||||
List<Vecs3dCube> vec3dCubeList = new ArrayList<Vecs3dCube>();
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing dir : EnumFacing.VALID_DIRECTIONS) {
|
||||
if (connectedSides.containsKey(dir))
|
||||
vec3dCubeList.add(boundingBoxes[Functions
|
||||
.getIntDirFromDirection(dir)]);
|
||||
|
@ -362,7 +362,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
@Override
|
||||
public void nearByChange() {
|
||||
checkConnectedSides();
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
worldObj.markBlockForUpdate(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ);
|
||||
IModPart part = ModPartUtils.getPartFromWorld(world, new Location(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ), this.getName());
|
||||
if (part != null) {
|
||||
|
@ -403,7 +403,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
return new ItemStack(IC2Items.getItem("copperCableItem").getItem(), 1, type);
|
||||
}
|
||||
|
||||
public boolean shouldConnectTo(TileEntity entity, ForgeDirection dir) {
|
||||
public boolean shouldConnectTo(TileEntity entity, EnumFacing dir) {
|
||||
if (entity == null) {
|
||||
return false;
|
||||
} else if (entity instanceof IEnergyTile) {
|
||||
|
@ -429,8 +429,8 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
|
||||
public void checkConnectedSides() {
|
||||
refreshBounding();
|
||||
connectedSides = new HashMap<ForgeDirection, TileEntity>();
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
connectedSides = new HashMap<EnumFacing, TileEntity>();
|
||||
for (EnumFacing dir : EnumFacing.VALID_DIRECTIONS) {
|
||||
int d = Functions.getIntDirFromDirection(dir);
|
||||
if (world == null) {
|
||||
return;
|
||||
|
@ -453,7 +453,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
|
||||
public void checkConnections(World world, int x, int y, int z) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
ForgeDirection dir = dirs[i];
|
||||
EnumFacing dir = dirs[i];
|
||||
int dx = x + dir.offsetX;
|
||||
int dy = y + dir.offsetY;
|
||||
int dz = z + dir.offsetZ;
|
||||
|
@ -524,13 +524,13 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
|
||||
@Override
|
||||
public boolean acceptsEnergyFrom(TileEntity tileEntity,
|
||||
ForgeDirection forgeDirection) {
|
||||
EnumFacing forgeDirection) {
|
||||
return connectedSides.containsKey(forgeDirection);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean emitsEnergyTo(TileEntity tileEntity,
|
||||
ForgeDirection forgeDirection) {
|
||||
EnumFacing forgeDirection) {
|
||||
return connectedSides.containsKey(forgeDirection);
|
||||
}
|
||||
|
||||
|
@ -554,7 +554,7 @@ public class CablePart extends ModPart implements IEnergyConductor, INetworkTile
|
|||
|
||||
NBTTagCompound ourCompound = tagCompound.getCompoundTag("connectedSides");
|
||||
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing dir : EnumFacing.VALID_DIRECTIONS) {
|
||||
connections[dir.ordinal()] = ourCompound.getBoolean(dir.ordinal() + "");
|
||||
}
|
||||
checkConnectedSides();
|
||||
|
|
|
@ -5,7 +5,7 @@ import cofh.api.energy.IEnergyHandler;
|
|||
import cofh.api.energy.IEnergyProvider;
|
||||
import cofh.api.energy.IEnergyReceiver;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import techreborn.api.power.IEnergyInterfaceTile;
|
||||
import techreborn.tiles.TileMachineBase;
|
||||
|
||||
|
@ -32,7 +32,7 @@ public abstract class RFProviderTile extends TileMachineBase implements IEnergyR
|
|||
if (!PowerSystem.RFPOWENET) {
|
||||
return;
|
||||
}
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
for (EnumFacing direction : EnumFacing.VALID_DIRECTIONS) {
|
||||
int extracted = getEnergyStored(direction);
|
||||
|
||||
TileEntity tile = worldObj.getTileEntity(xCoord + direction.offsetX, yCoord + direction.offsetY, zCoord + direction.offsetZ);
|
||||
|
@ -59,7 +59,7 @@ public abstract class RFProviderTile extends TileMachineBase implements IEnergyR
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isPoweredTile(TileEntity tile, ForgeDirection side) {
|
||||
public boolean isPoweredTile(TileEntity tile, EnumFacing side) {
|
||||
if (tile == null) {
|
||||
return false;
|
||||
} else if (tile instanceof IEnergyHandler || tile instanceof IEnergyReceiver) {
|
||||
|
|
|
@ -15,7 +15,7 @@ import ic2.api.info.Info;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import techreborn.api.power.IEnergyInterfaceTile;
|
||||
import techreborn.compat.CompatManager;
|
||||
|
@ -94,20 +94,20 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public double injectEnergy(ForgeDirection directionFrom, double amount, double voltage) {
|
||||
public double injectEnergy(EnumFacing directionFrom, double amount, double voltage) {
|
||||
setEnergy(getEnergy() + amount);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) {
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, EnumFacing direction) {
|
||||
if (!PowerSystem.EUPOWENET)
|
||||
return false;
|
||||
return canAcceptEnergy(direction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean emitsEnergyTo(TileEntity receiver, ForgeDirection direction) {
|
||||
public boolean emitsEnergyTo(TileEntity receiver, EnumFacing direction) {
|
||||
if (!PowerSystem.EUPOWENET)
|
||||
return false;
|
||||
return canProvideEnergy(direction);
|
||||
|
@ -133,21 +133,21 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements
|
|||
|
||||
//COFH
|
||||
@Override
|
||||
public boolean canConnectEnergy(ForgeDirection from) {
|
||||
public boolean canConnectEnergy(EnumFacing from) {
|
||||
if (!PowerSystem.RFPOWENET)
|
||||
return false;
|
||||
return canAcceptEnergy(from) || canProvideEnergy(from);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate) {
|
||||
if (!PowerSystem.RFPOWENET)
|
||||
return 0;
|
||||
if (!canAcceptEnergy(from)) {
|
||||
return 0;
|
||||
}
|
||||
maxReceive *= ConfigTechReborn.euPerRF;
|
||||
int energyReceived = Math.min(getMaxEnergyStored(ForgeDirection.UNKNOWN) - getEnergyStored(ForgeDirection.UNKNOWN), Math.min((int) this.getMaxInput() * ConfigTechReborn.euPerRF, maxReceive));
|
||||
int energyReceived = Math.min(getMaxEnergyStored(EnumFacing.UNKNOWN) - getEnergyStored(EnumFacing.UNKNOWN), Math.min((int) this.getMaxInput() * ConfigTechReborn.euPerRF, maxReceive));
|
||||
|
||||
if (!simulate) {
|
||||
setEnergy(getEnergy() + energyReceived);
|
||||
|
@ -156,28 +156,28 @@ public abstract class TilePowerAcceptor extends RFProviderTile implements
|
|||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyStored(ForgeDirection from) {
|
||||
public int getEnergyStored(EnumFacing from) {
|
||||
if (!PowerSystem.RFPOWENET)
|
||||
return 0;
|
||||
return ((int) getEnergy() / ConfigTechReborn.euPerRF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyStored(ForgeDirection from) {
|
||||
public int getMaxEnergyStored(EnumFacing from) {
|
||||
if (!PowerSystem.RFPOWENET)
|
||||
return 0;
|
||||
return ((int) getMaxPower() / ConfigTechReborn.euPerRF);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate) {
|
||||
public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate) {
|
||||
if (!PowerSystem.RFPOWENET)
|
||||
return 0;
|
||||
if (!canAcceptEnergy(from)) {
|
||||
return 0;
|
||||
}
|
||||
maxExtract *= ConfigTechReborn.euPerRF;
|
||||
int energyExtracted = Math.min(getEnergyStored(ForgeDirection.UNKNOWN), Math.min(maxExtract, maxExtract));
|
||||
int energyExtracted = Math.min(getEnergyStored(EnumFacing.UNKNOWN), Math.min(maxExtract, maxExtract));
|
||||
|
||||
if (!simulate) {
|
||||
setEnergy(energy - energyExtracted);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
package techreborn.utils;
|
||||
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.items.ItemCells;
|
||||
|
||||
|
||||
public class RecipeUtils {
|
||||
public static ItemStack getEmptyCell(int stackSize) {
|
||||
if (Loader.isModLoaded("IC2")) {
|
||||
ItemStack cell = IC2Items.getItem("cell").copy();
|
||||
cell.stackSize = stackSize;
|
||||
return cell;
|
||||
} else {
|
||||
public static ItemStack getEmptyCell(int stackSize) { //TODO ic2
|
||||
// if (Loader.isModLoaded("IC2")) {
|
||||
// ItemStack cell = IC2Items.getItem("cell").copy();
|
||||
// cell.stackSize = stackSize;
|
||||
// return cell;
|
||||
// } else {
|
||||
return ItemCells.getCellByName("empty", stackSize);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package techreborn.world;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.fml.common.IWorldGenerator;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -70,9 +71,9 @@ public class TROreGen implements IWorldGenerator {
|
|||
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
if (world.provider.isSurfaceWorld()) {
|
||||
generateUndergroundOres(random, xChunk * 16, zChunk * 16, world);
|
||||
} else if (world.provider.isHellWorld) {
|
||||
} else if (world.provider.getDimensionId() == 0) {
|
||||
generateHellOres(random, xChunk * 16, zChunk * 16, world);
|
||||
} else if (world.provider.dimensionId == 1) {
|
||||
} else if (world.provider.getDimensionId() == 1) {
|
||||
generateEndOres(random, xChunk * 16, zChunk * 16, world);
|
||||
}
|
||||
|
||||
|
@ -85,7 +86,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreGalena.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreGalena.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.IridiumOreTrue) {
|
||||
|
@ -93,7 +95,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(1);
|
||||
oreIridium.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreIridium.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.RubyOreTrue) {
|
||||
|
@ -101,7 +104,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreRuby.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreRuby.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.SapphireOreTrue) {
|
||||
|
@ -109,7 +113,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreSapphire.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreSapphire.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.BauxiteOreTrue) {
|
||||
|
@ -117,7 +122,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreBauxite.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreBauxite.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.TetrahedriteOreTrue) {
|
||||
|
@ -125,7 +131,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreTetrahedrite.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreTetrahedrite.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.CassiteriteOreTrue) {
|
||||
|
@ -133,7 +140,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 20);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreCassiterite.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreCassiterite.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.LeadOreTrue) {
|
||||
|
@ -141,7 +149,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 20);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreLead.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreLead.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.SilverOreTrue) {
|
||||
|
@ -149,7 +158,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 20);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreSilver.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreSilver.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -161,7 +171,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
orePyrite.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
orePyrite.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.CinnabarOreTrue) {
|
||||
|
@ -169,7 +180,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreCinnabar.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreCinnabar.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.SphaleriteOreTrue) {
|
||||
|
@ -177,7 +189,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreSphalerite.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreSphalerite.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -189,7 +202,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreTungston.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreTungston.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.SheldoniteOreTrue) {
|
||||
|
@ -197,7 +211,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreSheldonite.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreSheldonite.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.PeridotOreTrue) {
|
||||
|
@ -205,7 +220,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
orePeridot.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
orePeridot.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
if (config.SodaliteOreTrue) {
|
||||
|
@ -213,7 +229,8 @@ public class TROreGen implements IWorldGenerator {
|
|||
xPos = xChunk + random.nextInt(16);
|
||||
yPos = 10 + random.nextInt(60 - 10);
|
||||
zPos = zChunk + random.nextInt(16);
|
||||
oreSodalite.generate(world, random, xPos, yPos, zPos);
|
||||
BlockPos pos = new BlockPos(xPos, yPos, zPos);
|
||||
oreSodalite.generate(world, random, pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue