mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Apply various common one-to-one replacements
More work on common too. network package now done.
This commit is contained in:
1 parent
a0114b5112
commit
a80f724cc2
189 files changed
+1586
-1634
No files matched your search
@@ -177,9 +177,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public void write(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(getX());
|
||||
dataStream.writeInt(getY());
|
||||
dataStream.writeInt(getZ());
|
||||
dataStream.writeLong(toLong());
|
||||
dataStream.writeInt(dimensionId);
|
||||
}
|
||||
|
||||
@@ -266,7 +264,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public static Coord4D read(ByteBuf dataStream)
|
||||
{
|
||||
return new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
return new Coord4D(BlockPos.fromLong(dataStream.readLong()), dataStream.readInt());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,10 +277,10 @@ public class Coord4D extends BlockPos
|
||||
return vec.getX() == 0 && vec.getY() == 0 && vec.getZ() == 0 ? this : new Coord4D(this.getX() - vec.getX(), this.getY() - vec.getY(), this.getZ() - vec.getZ()); }
|
||||
|
||||
/**
|
||||
* A method used to find the ForgeDirection represented by the distance of the defined Coord4D. Most likely won't have many
|
||||
* A method used to find the EnumFacing represented by the distance of the defined Coord4D. Most likely won't have many
|
||||
* applicable uses.
|
||||
* @param other - Coord4D to find the side difference of
|
||||
* @return ForgeDirection representing the side the defined relative Coord4D is on to this
|
||||
* @return EnumFacing representing the side the defined relative Coord4D is on to this
|
||||
*/
|
||||
public EnumFacing sideDifference(Coord4D other)
|
||||
{
|
||||
|
||||
@@ -146,7 +146,7 @@ public class Pos3D extends Vec3
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs the same operation as translate(x, y, z), but by a set amount in a ForgeDirection
|
||||
* Performs the same operation as translate(x, y, z), but by a set amount in a EnumFacing
|
||||
*/
|
||||
public Pos3D translate(EnumFacing direction, double amount)
|
||||
{
|
||||
@@ -154,7 +154,7 @@ public class Pos3D extends Vec3
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs the same operation as translate(x, y, z), but by a set amount in a ForgeDirection
|
||||
* Performs the same operation as translate(x, y, z), but by a set amount in a EnumFacing
|
||||
*/
|
||||
public Pos3D translateExcludingSide(EnumFacing direction, double amount)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ public class GuiElectricChest extends GuiMekanism
|
||||
{
|
||||
if(isBlock)
|
||||
{
|
||||
mc.thePlayer.openGui(Mekanism.instance, 20, mc.theWorld, tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
mc.thePlayer.openGui(Mekanism.instance, 20, mc.theWorld, tileEntity.getPos().getX(), tileEntity.getPos().getY(), tileEntity.getPos().getZ());
|
||||
}
|
||||
else {
|
||||
FMLClientHandler.instance().displayGuiScreen(mc.thePlayer, new GuiPasswordModify(mc.thePlayer.getCurrentEquippedItem()));
|
||||
|
||||
@@ -107,7 +107,7 @@ public class GuiRobitMain extends GuiMekanism
|
||||
if(!displayNameChange)
|
||||
{
|
||||
CharSequence owner = robit.getOwnerName().length() > 14 ? robit.getOwnerName().subSequence(0, 14) : robit.getOwnerName();
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.robit.greeting") + " " + robit.getCommandSenderName() + "!", 29, 18, 0x00CD00);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.robit.greeting") + " " + robit.getName() + "!", 29, 18, 0x00CD00);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.energy") + ": " + MekanismUtils.getEnergyDisplay(robit.getEnergy()), 29, 36-4, 0x00CD00);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.robit.following") + ": " + robit.getFollowing(), 29, 45-4, 0x00CD00);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.robit.dropPickup") + ": " + robit.getDropPickup(), 29, 54-4, 0x00CD00);
|
||||
|
||||
@@ -58,7 +58,7 @@ public class GuiRobitRepair extends GuiMekanism implements ICrafting
|
||||
itemNameField.setEnableBackgroundDrawing(false);
|
||||
itemNameField.setMaxStringLength(30);
|
||||
inventorySlots.removeCraftingFromCrafters(this);
|
||||
inventorySlots.addCraftingToCrafters(this);
|
||||
inventorySlots.onCraftGuiOpened(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class GuiSeismicVibrator extends GuiMekanism
|
||||
fontRendererObj.drawString(LangUtils.localize("container.inventory"), 8, (ySize - 96) + 2, 0x404040);
|
||||
|
||||
fontRendererObj.drawString(tileEntity.isActive ? LangUtils.localize("gui.vibrating") : LangUtils.localize("gui.idle"), 19, 26, 0x00CD00);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.chunk") + ": " + (tileEntity.xCoord >> 4) + ", " + (tileEntity.zCoord >> 4), 19, 35, 0x00CD00);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.chunk") + ": " + (tileEntity.getPos().getX() >> 4) + ", " + (tileEntity.getPos().getZ() >> 4), 19, 35, 0x00CD00);
|
||||
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@@ -463,7 +463,7 @@ public class GuiTeleporter extends GuiMekanism
|
||||
|
||||
private String getOwner()
|
||||
{
|
||||
return tileEntity != null ? tileEntity.owner : entityPlayer.getCommandSenderName();
|
||||
return tileEntity != null ? tileEntity.owner : entityPlayer.getName();
|
||||
}
|
||||
|
||||
private byte getStatus()
|
||||
|
||||
@@ -21,7 +21,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -92,7 +92,7 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
int y = slotPosMap.get(i).yPos;
|
||||
|
||||
EnumColor color = configurable.getEjector().getInputColor(ForgeDirection.getOrientation(i));
|
||||
EnumColor color = configurable.getEjector().getInputColor(EnumFacing.getFront(i));
|
||||
|
||||
if(color != null)
|
||||
{
|
||||
@@ -144,7 +144,7 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
int x = slotPosMap.get(i).xPos;
|
||||
int y = slotPosMap.get(i).yPos;
|
||||
|
||||
EnumColor color = configurable.getEjector().getInputColor(ForgeDirection.getOrientation(i));
|
||||
EnumColor color = configurable.getEjector().getInputColor(EnumFacing.getFront(i));
|
||||
|
||||
if(xAxis >= x && xAxis <= x+14 && yAxis >= y && yAxis <= y+14)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Timer;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
@@ -152,7 +152,7 @@ public class MekanismRenderer
|
||||
|
||||
public static void loadDynamicTextures(ResourceLocationRegister register, String name, ResourceLocation[] textures, DefIcon... defaults)
|
||||
{
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
String tex = "mekanism:" + name + simpleSides[side.ordinal()];
|
||||
String texOn = tex + "On";
|
||||
@@ -259,12 +259,12 @@ public class MekanismRenderer
|
||||
maxZ = zPos;
|
||||
}
|
||||
|
||||
public void setSideRender(ForgeDirection side, boolean value)
|
||||
public void setSideRender(EnumFacing side, boolean value)
|
||||
{
|
||||
renderSides[side.ordinal()] = value;
|
||||
}
|
||||
|
||||
public boolean shouldSideRender(ForgeDirection side)
|
||||
public boolean shouldSideRender(EnumFacing side)
|
||||
{
|
||||
return renderSides[side.ordinal()];
|
||||
}
|
||||
@@ -308,32 +308,32 @@ public class MekanismRenderer
|
||||
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
|
||||
if(object.shouldSideRender(ForgeDirection.DOWN))
|
||||
if(object.shouldSideRender(EnumFacing.DOWN))
|
||||
{
|
||||
renderBlocks.renderFaceYNeg(null, 0, 0, 0, object.getBlockTextureFromSide(0));
|
||||
}
|
||||
|
||||
if(object.shouldSideRender(ForgeDirection.UP))
|
||||
if(object.shouldSideRender(EnumFacing.UP))
|
||||
{
|
||||
renderBlocks.renderFaceYPos(null, 0, 0, 0, object.getBlockTextureFromSide(1));
|
||||
}
|
||||
|
||||
if(object.shouldSideRender(ForgeDirection.NORTH))
|
||||
if(object.shouldSideRender(EnumFacing.NORTH))
|
||||
{
|
||||
renderBlocks.renderFaceZNeg(null, 0, 0, 0, object.getBlockTextureFromSide(2));
|
||||
}
|
||||
|
||||
if(object.shouldSideRender(ForgeDirection.SOUTH))
|
||||
if(object.shouldSideRender(EnumFacing.SOUTH))
|
||||
{
|
||||
renderBlocks.renderFaceZPos(null, 0, 0, 0, object.getBlockTextureFromSide(3));
|
||||
}
|
||||
|
||||
if(object.shouldSideRender(ForgeDirection.WEST))
|
||||
if(object.shouldSideRender(EnumFacing.WEST))
|
||||
{
|
||||
renderBlocks.renderFaceXNeg(null, 0, 0, 0, object.getBlockTextureFromSide(4));
|
||||
}
|
||||
|
||||
if(object.shouldSideRender(ForgeDirection.EAST))
|
||||
if(object.shouldSideRender(EnumFacing.EAST))
|
||||
{
|
||||
renderBlocks.renderFaceXPos(null, 0, 0, 0, object.getBlockTextureFromSide(5));
|
||||
}
|
||||
|
||||
@@ -39,7 +39,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 net.minecraftforge.fluids.Fluid;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -76,8 +76,8 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
|
||||
private ModelTransporterBox modelBox = new ModelTransporterBox();
|
||||
|
||||
private HashMap<ForgeDirection, HashMap<Fluid, DisplayInteger[]>> cachedLiquids = new HashMap<ForgeDirection, HashMap<Fluid, DisplayInteger[]>>();
|
||||
private HashMap<ForgeDirection, HashMap<Integer, DisplayInteger>> cachedOverlays = new HashMap<ForgeDirection, HashMap<Integer, DisplayInteger>>();
|
||||
private HashMap<EnumFacing, HashMap<Fluid, DisplayInteger[]>> cachedLiquids = new HashMap<EnumFacing, HashMap<Fluid, DisplayInteger[]>>();
|
||||
private HashMap<EnumFacing, HashMap<Integer, DisplayInteger>> cachedOverlays = new HashMap<EnumFacing, HashMap<Integer, DisplayInteger>>();
|
||||
|
||||
private Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@@ -147,7 +147,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
CCRenderState.reset();
|
||||
CCRenderState.startDrawing();
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
renderSide(side, type, false);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
CCRenderState.reset();
|
||||
CCRenderState.startDrawing();
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
renderSide(side, type, true);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
if(obj.equals(Coord4D.get(transporter.tile())))
|
||||
{
|
||||
int mode = ((PartDiversionTransporter)transporter).modes[pos.sideHit];
|
||||
ForgeDirection side = ForgeDirection.getOrientation(pos.sideHit);
|
||||
EnumFacing side = EnumFacing.getFront(pos.sideHit);
|
||||
|
||||
pushTransporter();
|
||||
|
||||
@@ -258,7 +258,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
CCRenderState.startDrawing();
|
||||
GL11.glTranslated(pos.x, pos.y, pos.z);
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
renderEnergySide(side, cable);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
CCRenderState.startDrawing();
|
||||
GL11.glTranslated(pos.x, pos.y, pos.z);
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
renderHeatSide(side, transmitter);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
|
||||
boolean gas = fluid.isGaseous();
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
if(pipe.getConnectionType(side) == ConnectionType.NORMAL)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
}
|
||||
}
|
||||
|
||||
DisplayInteger[] displayLists = getListAndRender(ForgeDirection.UNKNOWN, fluid);
|
||||
DisplayInteger[] displayLists = getListAndRender(EnumFacing.null, fluid);
|
||||
|
||||
if(displayLists != null)
|
||||
{
|
||||
@@ -391,7 +391,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
}
|
||||
}
|
||||
|
||||
private DisplayInteger[] getListAndRender(ForgeDirection side, Fluid fluid)
|
||||
private DisplayInteger[] getListAndRender(EnumFacing side, Fluid fluid)
|
||||
{
|
||||
if(side == null || fluid == null || fluid.getIcon() == null)
|
||||
{
|
||||
@@ -528,7 +528,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
CCRenderState.startDrawing();
|
||||
GL11.glTranslated(pos.x, pos.y, pos.z);
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
renderGasSide(side, tube);
|
||||
}
|
||||
@@ -550,13 +550,13 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
CCRenderState.hasColour = true;
|
||||
CCRenderState.setBrightness(transmitter.world(), transmitter.x(), transmitter.y(), transmitter.z());
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
renderSide(side, transmitter, pass);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderSide(ForgeDirection side, PartSidedPipe transmitter, int pass)
|
||||
public void renderSide(EnumFacing side, PartSidedPipe transmitter, int pass)
|
||||
{
|
||||
if(pass == 1)
|
||||
{
|
||||
@@ -590,34 +590,34 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
}
|
||||
}
|
||||
|
||||
public void renderSide(ForgeDirection side, TransmitterType type, boolean opaque)
|
||||
public void renderSide(EnumFacing side, TransmitterType type, boolean opaque)
|
||||
{
|
||||
boolean out = side == ForgeDirection.UP || side == ForgeDirection.DOWN;
|
||||
boolean out = side == EnumFacing.UP || side == EnumFacing.DOWN;
|
||||
|
||||
IIcon renderIcon = out ? type.getSideIcon(opaque) : type.getCenterIcon(opaque);
|
||||
|
||||
renderPart(renderIcon, getItemModel(side, type), 0, 0, 0, null);
|
||||
}
|
||||
|
||||
public void renderEnergySide(ForgeDirection side, PartUniversalCable cable)
|
||||
public void renderEnergySide(EnumFacing side, PartUniversalCable cable)
|
||||
{
|
||||
CCRenderState.changeTexture(MekanismRenderer.getBlocksTexture());
|
||||
renderTransparency(MekanismRenderer.energyIcon, cable.getModelForSide(side, true), new ColourRGBA(1.0, 1.0, 1.0, cable.currentPower));
|
||||
}
|
||||
|
||||
public void renderHeatSide(ForgeDirection side, PartHeatTransmitter cable)
|
||||
public void renderHeatSide(EnumFacing side, PartHeatTransmitter cable)
|
||||
{
|
||||
CCRenderState.changeTexture(MekanismRenderer.getBlocksTexture());
|
||||
renderTransparency(MekanismRenderer.heatIcon, cable.getModelForSide(side, true), ColourTemperature.fromTemperature(cable.getTransmitter().temperature, cable.getBaseColour()));
|
||||
}
|
||||
|
||||
public void renderFluidInOut(ForgeDirection side, PartMechanicalPipe pipe)
|
||||
public void renderFluidInOut(EnumFacing side, PartMechanicalPipe pipe)
|
||||
{
|
||||
CCRenderState.changeTexture(MekanismRenderer.getBlocksTexture());
|
||||
renderTransparency(pipe.getTransmitter().getTransmitterNetwork().refFluid.getIcon(), pipe.getModelForSide(side, true), new ColourRGBA(1.0, 1.0, 1.0, pipe.currentScale));
|
||||
}
|
||||
|
||||
public void renderGasSide(ForgeDirection side, PartPressurizedTube tube)
|
||||
public void renderGasSide(EnumFacing side, PartPressurizedTube tube)
|
||||
{
|
||||
CCRenderState.changeTexture(MekanismRenderer.getBlocksTexture());
|
||||
renderTransparency(tube.getTransmitter().getTransmitterNetwork().refGas.getIcon(), tube.getModelForSide(side, true), new ColourRGBA(1.0, 1.0, 1.0, tube.currentScale));
|
||||
@@ -645,10 +645,10 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
}
|
||||
}
|
||||
|
||||
public CCModel getItemModel(ForgeDirection side, TransmitterType type)
|
||||
public CCModel getItemModel(EnumFacing side, TransmitterType type)
|
||||
{
|
||||
String name = side.name().toLowerCase();
|
||||
boolean out = side == ForgeDirection.UP || side == ForgeDirection.DOWN;
|
||||
boolean out = side == EnumFacing.UP || side == EnumFacing.DOWN;
|
||||
name += out ? "NORMAL" : "NONE";
|
||||
|
||||
if(type.getSize() == Size.SMALL)
|
||||
@@ -694,7 +694,7 @@ public class RenderPartTransmitter //TODO implements IIconSelfRegister
|
||||
MekanismRenderer.blendOn();
|
||||
}
|
||||
|
||||
private DisplayInteger getOverlayDisplay(World world, ForgeDirection side, int mode)
|
||||
private DisplayInteger getOverlayDisplay(World world, EnumFacing side, int mode)
|
||||
{
|
||||
if(cachedOverlays.containsKey(side) && cachedOverlays.get(side).containsKey(mode))
|
||||
{
|
||||
|
||||
@@ -9,9 +9,10 @@ import mekanism.client.render.block.TextureSubmap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -35,7 +36,7 @@ public class CTMData
|
||||
acceptableBlockMetas.put(block, connectableMeta);
|
||||
}
|
||||
|
||||
public CTMData addSideOverride(ForgeDirection side, String sideTexture)
|
||||
public CTMData addSideOverride(EnumFacing side, String sideTexture)
|
||||
{
|
||||
sideOverrides[side.ordinal()] = new CTMTextureData(sideTexture);
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import mekanism.common.tile.TileEntityTeleporter;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
@@ -207,8 +208,8 @@ public class CommandMekanism extends CommandBase
|
||||
|
||||
if (Mekanism.gameProfile != null)
|
||||
{
|
||||
minecraftserver.getConfigurationManager().func_152605_a(Mekanism.gameProfile);
|
||||
func_152373_a(sender, this, "commands.op.success", new Object[] {"[Mekanism]"});
|
||||
minecraftserver.getConfigurationManager().addOp(Mekanism.gameProfile);
|
||||
notifyOperators(sender, this, "commands.op.success", new Object[] {"[Mekanism]"});
|
||||
}
|
||||
}
|
||||
else if(params[0].equalsIgnoreCase("deop"))
|
||||
@@ -217,8 +218,8 @@ public class CommandMekanism extends CommandBase
|
||||
|
||||
if (Mekanism.gameProfile != null)
|
||||
{
|
||||
minecraftserver.getConfigurationManager().func_152610_b(Mekanism.gameProfile);
|
||||
func_152373_a(sender, this, "commands.deop.success", new Object[] {"[Mekanism]"});
|
||||
minecraftserver.getConfigurationManager().removeOp(Mekanism.gameProfile);
|
||||
notifyOperators(sender, this, "commands.deop.success", new Object[] {"[Mekanism]"});
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -228,7 +229,7 @@ public class CommandMekanism extends CommandBase
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Object obj)
|
||||
public int compareTo(ICommand obj)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ public class CommonPlayerTickHandler
|
||||
|
||||
public static boolean isFlamethrowerOn(EntityPlayer player)
|
||||
{
|
||||
if(Mekanism.flamethrowerActive.contains(player.getCommandSenderName()))
|
||||
if(Mekanism.flamethrowerActive.contains(player.getName()))
|
||||
{
|
||||
if(player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() instanceof ItemFlamethrower)
|
||||
{
|
||||
|
||||
@@ -38,17 +38,17 @@ public class CommonPlayerTracker
|
||||
@SubscribeEvent
|
||||
public void onPlayerLogoutEvent(PlayerLoggedOutEvent event)
|
||||
{
|
||||
Mekanism.jetpackOn.remove(event.player.getCommandSenderName());
|
||||
Mekanism.gasmaskOn.remove(event.player.getCommandSenderName());
|
||||
Mekanism.flamethrowerActive.remove(event.player.getCommandSenderName());
|
||||
Mekanism.jetpackOn.remove(event.player.getName());
|
||||
Mekanism.gasmaskOn.remove(event.player.getName());
|
||||
Mekanism.flamethrowerActive.remove(event.player.getName());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPlayerDimChangedEvent(PlayerChangedDimensionEvent event)
|
||||
{
|
||||
Mekanism.jetpackOn.remove(event.player.getCommandSenderName());
|
||||
Mekanism.gasmaskOn.remove(event.player.getCommandSenderName());
|
||||
Mekanism.flamethrowerActive.remove(event.player.getCommandSenderName());
|
||||
Mekanism.jetpackOn.remove(event.player.getName());
|
||||
Mekanism.gasmaskOn.remove(event.player.getName());
|
||||
Mekanism.flamethrowerActive.remove(event.player.getName());
|
||||
|
||||
if(!event.player.worldObj.isRemote)
|
||||
{
|
||||
|
||||
@@ -352,7 +352,7 @@ public class CommonProxy
|
||||
usage.gasCentrifugeUsage = Mekanism.configuration.get("usage", "GasCentrifugeUsage", 100D).getDouble();
|
||||
usage.heavyWaterElectrolysisUsage = Mekanism.configuration.get("usage", "HeavyWaterElectrolysisUsage", 800D).getDouble();
|
||||
|
||||
Tier.loadConfig();
|
||||
//TODO: Tier.loadConfig();
|
||||
|
||||
if(Mekanism.configuration.hasChanged())
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CommonWorldTickHandler
|
||||
return;
|
||||
}
|
||||
|
||||
int dimensionId = world.provider.dimensionId;
|
||||
int dimensionId = world.provider.getDimensionId();
|
||||
|
||||
//Credit to E. Beef
|
||||
if(chunkRegenMap.containsKey(dimensionId))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mekanism.common;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
|
||||
@@ -15,12 +16,12 @@ public class CoreGuiHandler implements IGuiHandler
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
return Mekanism.proxy.getServerGui(ID, player, world, x, y, z);
|
||||
return Mekanism.proxy.getServerGui(ID, player, world, new BlockPos(x, y, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
||||
{
|
||||
return Mekanism.proxy.getClientGui(ID, player, world, x, y, z);
|
||||
return Mekanism.proxy.getClientGui(ID, player, world, new BlockPos(x, y, z));
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,8 @@ import mekanism.api.transmitters.DynamicNetwork;
|
||||
import mekanism.api.transmitters.IGridTransmitter;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event;
|
||||
|
||||
@@ -164,14 +164,14 @@ public class EnergyNetwork extends DynamicNetwork<EnergyAcceptorWrapper, EnergyN
|
||||
for(EnergyAcceptorWrapper acceptor : availableAcceptors)
|
||||
{
|
||||
double currentSending = sending+remaining;
|
||||
EnumSet<ForgeDirection> sides = acceptorDirections.get(acceptor.coord);
|
||||
EnumSet<EnumFacing> sides = acceptorDirections.get(acceptor.coord);
|
||||
|
||||
if(sides == null || sides.isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
for(ForgeDirection side : sides)
|
||||
for(EnumFacing side : sides)
|
||||
{
|
||||
double prev = sent;
|
||||
|
||||
@@ -200,7 +200,7 @@ public class EnergyNetwork extends DynamicNetwork<EnergyAcceptorWrapper, EnergyN
|
||||
|
||||
for(Coord4D coord : possibleAcceptors.keySet())
|
||||
{
|
||||
EnumSet<ForgeDirection> sides = acceptorDirections.get(coord);
|
||||
EnumSet<EnumFacing> sides = acceptorDirections.get(coord);
|
||||
|
||||
if(sides == null || sides.isEmpty())
|
||||
{
|
||||
@@ -212,7 +212,7 @@ public class EnergyNetwork extends DynamicNetwork<EnergyAcceptorWrapper, EnergyN
|
||||
|
||||
if(acceptor != null)
|
||||
{
|
||||
for(ForgeDirection side : sides)
|
||||
for(EnumFacing side : sides)
|
||||
{
|
||||
if(acceptor.canReceiveEnergy(side) && acceptor.needsEnergy(side))
|
||||
{
|
||||
|
||||
@@ -7,8 +7,8 @@ import mekanism.api.transmitters.DynamicNetwork;
|
||||
import mekanism.api.transmitters.IGridTransmitter;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
@@ -144,7 +144,7 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
|
||||
for(IFluidHandler acceptor : availableAcceptors)
|
||||
{
|
||||
int currentSending = sending;
|
||||
EnumSet<ForgeDirection> sides = acceptorDirections.get(Coord4D.get((TileEntity)acceptor));
|
||||
EnumSet<EnumFacing> sides = acceptorDirections.get(Coord4D.get((TileEntity)acceptor));
|
||||
|
||||
if(remaining > 0)
|
||||
{
|
||||
@@ -152,13 +152,13 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
|
||||
remaining--;
|
||||
}
|
||||
|
||||
for(ForgeDirection side : sides)
|
||||
for(EnumFacing side : sides)
|
||||
{
|
||||
int prev = fluidSent;
|
||||
|
||||
if(acceptor != null && fluidToSend != null)
|
||||
{
|
||||
fluidSent += acceptor.fill(side, new FluidStack(fluidToSend.getFluidID(), currentSending), doTransfer);
|
||||
fluidSent += acceptor.fill(side, new FluidStack(fluidToSend.getFluid(), currentSending), doTransfer);
|
||||
}
|
||||
|
||||
if(fluidSent > prev)
|
||||
@@ -287,7 +287,7 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
|
||||
|
||||
for(Coord4D coord : possibleAcceptors.keySet())
|
||||
{
|
||||
EnumSet<ForgeDirection> sides = acceptorDirections.get(coord);
|
||||
EnumSet<EnumFacing> sides = acceptorDirections.get(coord);
|
||||
TileEntity tile = coord.getTileEntity(getWorld());
|
||||
|
||||
if(sides == null || sides.isEmpty())
|
||||
@@ -297,7 +297,7 @@ public class FluidNetwork extends DynamicNetwork<IFluidHandler, FluidNetwork>
|
||||
|
||||
IFluidHandler acceptor = (IFluidHandler)tile;
|
||||
|
||||
for(ForgeDirection side : sides)
|
||||
for(EnumFacing side : sides)
|
||||
{
|
||||
if(acceptor != null && acceptor.canFill(side, fluidToSend.getFluid()))
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
@@ -17,7 +16,7 @@ import mekanism.common.content.transporter.TransporterManager;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
|
||||
public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwork>
|
||||
@@ -49,7 +48,7 @@ public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwor
|
||||
continue;
|
||||
}
|
||||
|
||||
EnumSet<ForgeDirection> sides = acceptorDirections.get(coord);
|
||||
EnumSet<EnumFacing> sides = acceptorDirections.get(coord);
|
||||
IInventory acceptor = (IInventory)coord.getTileEntity(getWorld());
|
||||
|
||||
if(sides == null || sides.isEmpty())
|
||||
@@ -59,7 +58,7 @@ public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwor
|
||||
|
||||
AcceptorData data = null;
|
||||
|
||||
for(ForgeDirection side : sides)
|
||||
for(EnumFacing side : sides)
|
||||
{
|
||||
ItemStack returned = TransporterManager.getPredictedInsert((TileEntity)acceptor, color, stack, side.getOpposite().ordinal());
|
||||
|
||||
@@ -88,9 +87,9 @@ public class InventoryNetwork extends DynamicNetwork<IInventory, InventoryNetwor
|
||||
{
|
||||
public Coord4D location;
|
||||
public ItemStack rejected;
|
||||
public EnumSet<ForgeDirection> sides = EnumSet.noneOf(ForgeDirection.class);
|
||||
public EnumSet<EnumFacing> sides = EnumSet.noneOf(EnumFacing.class);
|
||||
|
||||
public AcceptorData(Coord4D coord, ItemStack stack, ForgeDirection side)
|
||||
public AcceptorData(Coord4D coord, ItemStack stack, EnumFacing side)
|
||||
{
|
||||
location = coord;
|
||||
rejected = stack;
|
||||
|
||||
@@ -3,7 +3,6 @@ package mekanism.common;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.common.multipart.TransmitterType;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -15,10 +14,12 @@ public final class ItemAttacher
|
||||
{
|
||||
attachable.add(new ItemStack(Blocks.lever));
|
||||
|
||||
/*TODO put this back
|
||||
for(TransmitterType type : TransmitterType.values())
|
||||
{
|
||||
attachable.add(new ItemStack(MekanismItems.PartTransmitter, 1, type.ordinal()));
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
public static boolean canAttach(ItemStack itemStack)
|
||||
|
||||
@@ -7,6 +7,7 @@ import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.Pos3D;
|
||||
import mekanism.api.lasers.ILaserReceptor;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -17,33 +18,33 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
|
||||
public class LaserManager
|
||||
{
|
||||
public static LaserInfo fireLaser(TileEntity from, ForgeDirection direction, double energy, World world)
|
||||
public static LaserInfo fireLaser(TileEntity from, EnumFacing direction, double energy, World world)
|
||||
{
|
||||
return fireLaser(new Pos3D(from).centre().translate(direction, 0.501), direction, energy, world);
|
||||
}
|
||||
|
||||
public static LaserInfo fireLaser(Pos3D from, ForgeDirection direction, double energy, World world)
|
||||
public static LaserInfo fireLaser(Pos3D from, EnumFacing direction, double energy, World world)
|
||||
{
|
||||
Pos3D to = from.clone().translate(direction, general.laserRange - 0.002);
|
||||
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(Vec3.createVectorHelper(from.xPos, from.yPos, from.zPos), Vec3.createVectorHelper(to.xPos, to.yPos, to.zPos));
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(from, to);
|
||||
|
||||
if(mop != null)
|
||||
{
|
||||
to = new Pos3D(mop.hitVec);
|
||||
Coord4D toCoord = new Coord4D(mop.blockX, mop.blockY, mop.blockZ);
|
||||
Coord4D toCoord = new Coord4D(mop.getBlockPos());
|
||||
TileEntity tile = toCoord.getTileEntity(world);
|
||||
|
||||
if(tile instanceof ILaserReceptor)
|
||||
{
|
||||
if(!(((ILaserReceptor)tile).canLasersDig()))
|
||||
{
|
||||
((ILaserReceptor)tile).receiveLaserEnergy(energy, ForgeDirection.getOrientation(mop.sideHit));
|
||||
((ILaserReceptor)tile).receiveLaserEnergy(energy, mop.sideHit);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,11 +80,11 @@ public class LaserManager
|
||||
}
|
||||
|
||||
List<ItemStack> ret = null;
|
||||
Block blockHit = blockCoord.getBlock(world);
|
||||
int meta = blockCoord.getBlockState(world);
|
||||
IBlockState state = blockCoord.getBlockState(world);
|
||||
Block blockHit = state.getBlock();
|
||||
|
||||
EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord).get();
|
||||
BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, world, blockHit, meta, dummy);
|
||||
EntityPlayer dummy = Mekanism.proxy.getDummyPlayer((WorldServer)world, blockCoord.getX(), blockCoord.getY(), blockCoord.getZ()).get();
|
||||
BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(world, blockCoord, state, dummy);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
|
||||
if(event.isCanceled())
|
||||
@@ -93,28 +94,28 @@ public class LaserManager
|
||||
|
||||
if(dropAtBlock)
|
||||
{
|
||||
blockHit.dropBlockAsItem(world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, blockCoord.getBlockState(world), 0);
|
||||
blockHit.dropBlockAsItem(world, blockCoord, state, 0);
|
||||
}
|
||||
else {
|
||||
ret = blockHit.getDrops(world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, blockCoord.getBlockState(world), 0);
|
||||
ret = blockHit.getDrops(world, blockCoord, state, 0);
|
||||
}
|
||||
|
||||
blockHit.breakBlock(world, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, blockHit, blockCoord.getBlockState(world));
|
||||
world.setBlockToAir(blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord);
|
||||
world.playAuxSFX(2001, blockCoord.xCoord, blockCoord.yCoord, blockCoord.zCoord, Block.getIdFromBlock(blockHit));
|
||||
blockHit.breakBlock(world, blockCoord, state);
|
||||
world.setBlockToAir(blockCoord);
|
||||
world.playAuxSFX(2001, blockCoord, Block.getIdFromBlock(blockHit));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static MovingObjectPosition fireLaserClient(TileEntity from, ForgeDirection direction, double energy, World world)
|
||||
public static MovingObjectPosition fireLaserClient(TileEntity from, EnumFacing direction, double energy, World world)
|
||||
{
|
||||
return fireLaserClient(new Pos3D(from).centre().translate(direction, 0.501), direction, energy, world);
|
||||
}
|
||||
|
||||
public static MovingObjectPosition fireLaserClient(Pos3D from, ForgeDirection direction, double energy, World world)
|
||||
public static MovingObjectPosition fireLaserClient(Pos3D from, EnumFacing direction, double energy, World world)
|
||||
{
|
||||
Pos3D to = from.clone().translate(direction, general.laserRange - 0.002);
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(Vec3.createVectorHelper(from.xPos, from.yPos, from.zPos), Vec3.createVectorHelper(to.xPos, to.yPos, to.zPos));
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(from, to);
|
||||
|
||||
if(mop != null)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,6 @@ import mekanism.common.frequency.FrequencyManager;
|
||||
import mekanism.common.integration.MekanismHooks;
|
||||
import mekanism.common.integration.OreDictManager;
|
||||
import mekanism.common.multiblock.MultiblockManager;
|
||||
import mekanism.common.multipart.MultipartMekanism;
|
||||
import mekanism.common.network.PacketDataRequest.DataRequestMessage;
|
||||
import mekanism.common.network.PacketTransmitterUpdate.PacketType;
|
||||
import mekanism.common.network.PacketTransmitterUpdate.TransmitterUpdateMessage;
|
||||
@@ -91,6 +90,7 @@ import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.WorldChunkManager;
|
||||
@@ -111,7 +111,6 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
import rebelkeithy.mods.metallurgy.api.IOreInfo;
|
||||
import rebelkeithy.mods.metallurgy.api.MetallurgyAPI;
|
||||
import codechicken.multipart.handler.MultipartProxy;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
@@ -222,491 +221,491 @@ public class Mekanism
|
||||
public void addRecipes()
|
||||
{
|
||||
//Storage Recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 3), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 3),
|
||||
"***", "***", "***", Character.valueOf('*'), new ItemStack(Items.coal, 1, 1)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(Items.coal, 9, 1), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(Items.coal, 9, 1),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 3)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 2), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 2),
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotRefinedObsidian"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 0), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 0),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 2)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 4), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 4),
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotRefinedGlowstone"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 3), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 3),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 4)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 0), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 0),
|
||||
"XXX", "XXX", "XXX", Character.valueOf('X'), "ingotOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 1), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 1),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 0)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 1), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 1),
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotBronze"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 2), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 2),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 1)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 5), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 5),
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotSteel"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 4), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 4),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 5)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 12), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 12),
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotCopper"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 5), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 5),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 12)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 13), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 13),
|
||||
"***", "***", "***", Character.valueOf('*'), "ingotTin"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 6), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Ingot, 9, 6),
|
||||
"*", Character.valueOf('*'), new ItemStack(MekanismBlocks.BasicBlock, 1, 13)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.SaltBlock), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.SaltBlock),
|
||||
"**", "**", Character.valueOf('*'), MekanismItems.Salt
|
||||
}));
|
||||
));
|
||||
|
||||
//Base Recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.ObsidianTNT, 1), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.ObsidianTNT, 1),
|
||||
"***", "XXX", "***", Character.valueOf('*'), Blocks.obsidian, Character.valueOf('X'), Blocks.tnt
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.ElectricBow.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.ElectricBow.getUnchargedItem(),
|
||||
" AB", "E B", " AB", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('B'), Items.string, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.EnergyTablet.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.EnergyTablet.getUnchargedItem(),
|
||||
"RCR", "ECE", "RCR", Character.valueOf('C'), "ingotGold", Character.valueOf('R'), "dustRedstone", Character.valueOf('E'), MekanismItems.EnrichedAlloy
|
||||
}));
|
||||
MachineType.ENRICHMENT_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 0), new Object[] {
|
||||
));
|
||||
MachineType.ENRICHMENT_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 0),
|
||||
"RCR", "iIi", "RCR", Character.valueOf('i'), "ingotIron", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('R'), "alloyBasic", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
MachineType.OSMIUM_COMPRESSOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 1), new Object[] {
|
||||
));
|
||||
MachineType.OSMIUM_COMPRESSOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 1),
|
||||
"ECE", "BIB", "ECE", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ADVANCED), Character.valueOf('B'), Items.bucket, Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
MachineType.COMBINER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 2), new Object[] {
|
||||
));
|
||||
MachineType.COMBINER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 2),
|
||||
"RCR", "SIS", "RCR", Character.valueOf('S'), Blocks.cobblestone, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ELITE), Character.valueOf('R'), "alloyElite", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
MachineType.CRUSHER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 3), new Object[] {
|
||||
));
|
||||
MachineType.CRUSHER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 3),
|
||||
"RCR", "LIL", "RCR", Character.valueOf('R'), "dustRedstone", Character.valueOf('L'), Items.lava_bucket, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.SpeedUpgrade), new Object[]{
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.SpeedUpgrade),
|
||||
" G ", "ADA", " G ", Character.valueOf('G'), "blockGlass", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('D'), "dustOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.EnergyUpgrade), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.EnergyUpgrade),
|
||||
" G ", "ADA", " G ", Character.valueOf('G'), "blockGlass", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('D'), "dustGold"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FilterUpgrade), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FilterUpgrade),
|
||||
" G ", "ADA", " G ", Character.valueOf('G'), "blockGlass", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('D'), "dustTin"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GasUpgrade), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GasUpgrade),
|
||||
" G ", "ADA", " G ", Character.valueOf('G'), "blockGlass", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('D'), "dustIron"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.AtomicDisassembler.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.AtomicDisassembler.getUnchargedItem(),
|
||||
"AEA", "ACA", " O ", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), MekanismItems.AtomicAlloy, Character.valueOf('O'), "ingotRefinedObsidian"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEmptyGasTank(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEmptyGasTank(),
|
||||
"PPP", "PDP", "PPP", Character.valueOf('P'), "ingotOsmium", Character.valueOf('D'), "dustIron"
|
||||
}));
|
||||
MachineType.METALLURGIC_INFUSER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 8), new Object[] {
|
||||
));
|
||||
MachineType.METALLURGIC_INFUSER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 8),
|
||||
"IFI", "ROR", "IFI", Character.valueOf('I'), "ingotIron", Character.valueOf('F'), Blocks.furnace, Character.valueOf('R'), "dustRedstone", Character.valueOf('O'), "ingotOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.TeleportationCore), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.TeleportationCore),
|
||||
"LAL", "GDG", "LAL", Character.valueOf('L'), new ItemStack(Items.dye, 1, 4), Character.valueOf('A'), MekanismItems.AtomicAlloy, Character.valueOf('G'), "ingotGold", Character.valueOf('D'), Items.diamond
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.PortableTeleporter.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.PortableTeleporter.getUnchargedItem(),
|
||||
" E ", "CTC", " E ", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('T'), MekanismItems.TeleportationCore
|
||||
}));
|
||||
MachineType.TELEPORTER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 11), new Object[] {
|
||||
));
|
||||
MachineType.TELEPORTER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 11),
|
||||
"COC", "OTO", "COC", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('O'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('T'), MekanismItems.TeleportationCore
|
||||
}));
|
||||
MachineType.PURIFICATION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 9), new Object[] {
|
||||
));
|
||||
MachineType.PURIFICATION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 9),
|
||||
"ECE", "ORO", "ECE", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ADVANCED), Character.valueOf('E'), "alloyAdvanced", Character.valueOf('O'), "ingotOsmium", Character.valueOf('R'), new ItemStack(MekanismBlocks.MachineBlock, 1, 0)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Configurator.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Configurator.getUnchargedItem(),
|
||||
" L ", "AEA", " S ", Character.valueOf('L'), new ItemStack(Items.dye, 1, 4), Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('S'), Items.stick
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 9, 7), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 9, 7),
|
||||
"OOO", "OGO", "OOO", Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('G'), "ingotRefinedGlowstone"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 8), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 8),
|
||||
" S ", "SPS", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('P'), "ingotOsmium"
|
||||
}));
|
||||
MachineType.ENERGIZED_SMELTER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 10), new Object[] {
|
||||
));
|
||||
MachineType.ENERGIZED_SMELTER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 10),
|
||||
"RCR", "GIG", "RCR", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('R'), "alloyBasic", Character.valueOf('G'), "blockGlass", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
MachineType.ELECTRIC_PUMP.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 12), new Object[] {
|
||||
));
|
||||
MachineType.ELECTRIC_PUMP.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 12),
|
||||
" B ", "ECE", "OOO", Character.valueOf('B'), Items.bucket, Character.valueOf('E'), MekanismItems.EnrichedAlloy, Character.valueOf('C'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('O'), "ingotOsmium"
|
||||
}));
|
||||
MachineType.ELECTRIC_CHEST.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 13), new Object[] {
|
||||
));
|
||||
MachineType.ELECTRIC_CHEST.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 13),
|
||||
"SGS", "CcC", "SSS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "blockGlass", Character.valueOf('C'), Blocks.chest, Character.valueOf('c'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 4, 9), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 4, 9),
|
||||
" I ", "IBI", " I ", Character.valueOf('I'), "ingotSteel", Character.valueOf('B'), Items.bucket
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 4, 10), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 4, 10),
|
||||
" I ", "IGI", " I ", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 9), Character.valueOf('G'), "blockGlass"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 2, 11), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 2, 11),
|
||||
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 9), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
MachineType.CHARGEPAD.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 14), new Object[] {
|
||||
));
|
||||
MachineType.CHARGEPAD.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 14),
|
||||
"PPP", "SES", Character.valueOf('P'), Blocks.stone_pressure_plate, Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Robit.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Robit.getUnchargedItem(),
|
||||
" S ", "ECE", "OIO", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), MekanismItems.AtomicAlloy, Character.valueOf('O'), "ingotRefinedObsidian", Character.valueOf('I'), new ItemStack(MekanismBlocks.MachineBlock, 1, 13)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.NetworkReader.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.NetworkReader.getUnchargedItem(),
|
||||
" G ", "AEA", " I ", Character.valueOf('G'), "blockGlass", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('I'), "ingotSteel"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.WalkieTalkie), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.WalkieTalkie),
|
||||
" O", "SCS", " S ", Character.valueOf('O'), "ingotOsmium", Character.valueOf('S'), "ingotSteel", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
MachineType.LOGISTICAL_SORTER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 15), new Object[] {
|
||||
));
|
||||
MachineType.LOGISTICAL_SORTER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 15),
|
||||
"IPI", "ICI", "III", Character.valueOf('I'), "ingotIron", Character.valueOf('P'), Blocks.piston, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 6), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 6),
|
||||
"SSS", "SCS", "SSS", Character.valueOf('S'), Blocks.cobblestone, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
MachineType.DIGITAL_MINER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 4), new Object[] {
|
||||
));
|
||||
MachineType.DIGITAL_MINER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock, 1, 4),
|
||||
"ACA", "SES", "TIT", Character.valueOf('A'), MekanismItems.AtomicAlloy, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('S'), new ItemStack(MekanismBlocks.MachineBlock, 1, 15), Character.valueOf('E'), MekanismItems.Robit.getUnchargedItem(),
|
||||
Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('T'), MekanismItems.TeleportationCore
|
||||
}));
|
||||
MachineType.ROTARY_CONDENSENTRATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 0), new Object[] {
|
||||
));
|
||||
MachineType.ROTARY_CONDENSENTRATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 0),
|
||||
"GCG", "tEI", "GCG", Character.valueOf('G'), "blockGlass", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('t'), MekanismUtils.getEmptyGasTank(), Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(),
|
||||
Character.valueOf('T'), new ItemStack(MekanismBlocks.BasicBlock, 1, 9), Character.valueOf('I'), new ItemStack(MekanismBlocks.MachineBlock2, 1, 11)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Jetpack.getEmptyItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Jetpack.getEmptyItem(),
|
||||
"SCS", "TGT", " T ", Character.valueOf('S'), "ingotSteel", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('T'), "ingotTin", Character.valueOf('G'), MekanismUtils.getEmptyGasTank()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Dictionary), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Dictionary),
|
||||
"C", "B", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('B'), Items.book
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GasMask), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GasMask),
|
||||
" S ", "GCG", "S S", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "blockGlass", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.ScubaTank.getEmptyItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.ScubaTank.getEmptyItem(),
|
||||
" C ", "ATA", "SSS", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('S'), "ingotSteel"
|
||||
}));
|
||||
MachineType.CHEMICAL_OXIDIZER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 1), new Object[] {
|
||||
));
|
||||
MachineType.CHEMICAL_OXIDIZER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 1),
|
||||
"ACA", "ERG", "ACA", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('R'), new ItemStack(MekanismBlocks.BasicBlock, 1, 9), Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('E'), new ItemStack(MekanismBlocks.MachineBlock, 1, 13), Character.valueOf('A'), MekanismItems.EnrichedAlloy
|
||||
}));
|
||||
MachineType.CHEMICAL_INFUSER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 2), new Object[] {
|
||||
));
|
||||
MachineType.CHEMICAL_INFUSER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 2),
|
||||
"ACA", "GRG", "ACA", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('R'), new ItemStack(MekanismBlocks.BasicBlock, 1, 9), Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('A'), MekanismItems.EnrichedAlloy
|
||||
}));
|
||||
MachineType.CHEMICAL_INJECTION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 3), new Object[] {
|
||||
));
|
||||
MachineType.CHEMICAL_INJECTION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 3),
|
||||
"RCR", "GPG", "RCR", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ELITE), Character.valueOf('R'), "alloyElite", Character.valueOf('G'), "ingotGold", Character.valueOf('P'), new ItemStack(MekanismBlocks.MachineBlock, 1, 9)
|
||||
}));
|
||||
MachineType.ELECTROLYTIC_SEPARATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 4), new Object[] {
|
||||
));
|
||||
MachineType.ELECTROLYTIC_SEPARATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 4),
|
||||
"IRI", "ECE", "IRI", Character.valueOf('I'), "ingotIron", Character.valueOf('R'), "dustRedstone", Character.valueOf('E'), MekanismItems.EnrichedAlloy, Character.valueOf('C'), MekanismItems.ElectrolyticCore
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ElectrolyticCore), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ElectrolyticCore),
|
||||
"EPE", "IEG", "EPE", Character.valueOf('E'), MekanismItems.EnrichedAlloy, Character.valueOf('P'), "dustOsmium", Character.valueOf('I'), "dustIron", Character.valueOf('G'), "dustGold"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.CardboardBox), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.CardboardBox),
|
||||
"SS", "SS", Character.valueOf('S'), "pulpWood"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(Items.paper, 6), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(Items.paper, 6),
|
||||
"SSS", Character.valueOf('S'), MekanismItems.Sawdust
|
||||
}));
|
||||
MachineType.PRECISION_SAWMILL.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 5), new Object[] {
|
||||
));
|
||||
MachineType.PRECISION_SAWMILL.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 5),
|
||||
"ICI", "ASA", "ICI", Character.valueOf('I'), "ingotIron", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('S'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 14), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 14),
|
||||
"CGC", "IBI", "CGC", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('G'), "paneGlass", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('B'), "blockCopper"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 15), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock, 1, 15),
|
||||
"ITI", "CBC", "ITI", Character.valueOf('I'), "ingotCopper", Character.valueOf('T'), new ItemStack(MekanismBlocks.BasicBlock, 1, 11), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('B'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 1, 0), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 1, 0),
|
||||
"CCC", "CTC", "CCC", Character.valueOf('C'), "ingotCopper", Character.valueOf('T'), new ItemStack(MekanismBlocks.BasicBlock, 1, 9)
|
||||
}));
|
||||
MachineType.CHEMICAL_DISSOLUTION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 6), new Object[] {
|
||||
));
|
||||
MachineType.CHEMICAL_DISSOLUTION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 6),
|
||||
"CGC", "EAE", "CGC", Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('A'), MekanismItems.AtomicAlloy, Character.valueOf('E'), MekanismItems.EnrichedAlloy
|
||||
}));
|
||||
MachineType.CHEMICAL_WASHER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 7), new Object[] {
|
||||
));
|
||||
MachineType.CHEMICAL_WASHER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 7),
|
||||
"CWC", "EIE", "CGC", Character.valueOf('W'), Items.bucket, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('E'), MekanismItems.EnrichedAlloy, Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
MachineType.CHEMICAL_CRYSTALLIZER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 8), new Object[] {
|
||||
));
|
||||
MachineType.CHEMICAL_CRYSTALLIZER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 8),
|
||||
"CGC", "ASA", "CGC", Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('A'), MekanismItems.AtomicAlloy, Character.valueOf('S'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.FreeRunners.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.FreeRunners.getUnchargedItem(),
|
||||
"C C", "A A", "T T", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.ArmoredJetpack.getEmptyItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.ArmoredJetpack.getEmptyItem(),
|
||||
"D D", "BSB", " J ", Character.valueOf('D'), "dustDiamond", Character.valueOf('B'), "ingotBronze", Character.valueOf('S'), "blockSteel", Character.valueOf('J'), MekanismItems.Jetpack.getEmptyItem()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FilterCard), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FilterCard),
|
||||
" A ", "ACA", " A ", Character.valueOf('A'), MekanismItems.EnrichedAlloy, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.SeismicReader.getUnchargedItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.SeismicReader.getUnchargedItem(),
|
||||
"SLS", "STS", "SSS", Character.valueOf('S'), "ingotSteel", Character.valueOf('L'), new ItemStack(Items.dye, 1, 4), Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem()
|
||||
}));
|
||||
MachineType.SEISMIC_VIBRATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 9), new Object[] {
|
||||
));
|
||||
MachineType.SEISMIC_VIBRATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 9),
|
||||
"TLT", "CIC", "TTT", Character.valueOf('T'), "ingotTin", Character.valueOf('L'), new ItemStack(Items.dye, 1, 4), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
MachineType.PRESSURIZED_REACTION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 10), new Object[] {
|
||||
));
|
||||
MachineType.PRESSURIZED_REACTION_CHAMBER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 10),
|
||||
"TET", "CIC", "GFG", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), MekanismItems.EnrichedAlloy, Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('G'), MekanismUtils.getEmptyGasTank(),
|
||||
Character.valueOf('I'), new ItemStack(MekanismBlocks.MachineBlock, 1, 0), Character.valueOf('F'), new ItemStack(MekanismBlocks.BasicBlock, 1, 9)
|
||||
}));
|
||||
MachineType.PORTABLE_TANK.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 11), new Object[] {
|
||||
));
|
||||
MachineType.PORTABLE_TANK.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 11),
|
||||
"III", "GCG", "III", Character.valueOf('I'), "ingotIron", Character.valueOf('G'), "blockGlass", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
MachineType.FLUIDIC_PLENISHER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 12), new Object[] {
|
||||
));
|
||||
MachineType.FLUIDIC_PLENISHER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 12),
|
||||
"TTT", "CPC", "TTT", Character.valueOf('P'), new ItemStack(MekanismBlocks.MachineBlock, 1, 12), Character.valueOf('T'), "ingotTin", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(Blocks.rail, 24), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(Blocks.rail, 24),
|
||||
"O O", "OSO", "O O", Character.valueOf('O'), "ingotOsmium", Character.valueOf('S'), "stickWood"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Flamethrower.getEmptyItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.Flamethrower.getEmptyItem(),
|
||||
"TTT", "TGS", "BCB", Character.valueOf('T'), "ingotTin", Character.valueOf('G'), MekanismUtils.getEmptyGasTank(), Character.valueOf('S'), Items.flint_and_steel, Character.valueOf('B'), "ingotBronze", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ADVANCED)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.GaugeDropper.getEmptyItem(), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismItems.GaugeDropper.getEmptyItem(),
|
||||
" O ", "G G", "GGG", Character.valueOf('O'), "ingotOsmium", Character.valueOf('G'), "paneGlass"
|
||||
}));
|
||||
MachineType.SOLAR_NEUTRON_ACTIVATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock3, 1, 1), new Object[] {
|
||||
));
|
||||
MachineType.SOLAR_NEUTRON_ACTIVATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock3, 1, 1),
|
||||
"APA", "CSC", "BBB", Character.valueOf('A'), "alloyElite", Character.valueOf('S'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('P'), new ItemStack(MekanismItems.Polyethene, 1, 2), Character.valueOf('B'), "ingotBronze", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ELITE)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 4, 1), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 4, 1),
|
||||
" S ", "SES", " S ", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem()
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 2, 2), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.BasicBlock2, 2, 2),
|
||||
" I ", "ICI", " I ", Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock2, 1, 1), Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ELITE)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 0), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 0),
|
||||
"RCR", "iWi", "RCR", Character.valueOf('R'), "alloyBasic", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('i'), "ingotIron", Character.valueOf('W'), "plankWood"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 1), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 1),
|
||||
"ECE", "oWo", "ECE", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ADVANCED), Character.valueOf('o'), "ingotOsmium", Character.valueOf('W'), "plankWood"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 2), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.FactoryInstaller, 1, 2),
|
||||
"RCR", "gWg", "RCR", Character.valueOf('R'), "alloyElite", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ELITE), Character.valueOf('g'), "ingotGold", Character.valueOf('W'), "plankWood"
|
||||
}));
|
||||
MachineType.OREDICTIONIFICATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock3, 1, 3), new Object[] {
|
||||
));
|
||||
MachineType.OREDICTIONIFICATOR.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock3, 1, 3),
|
||||
"SGS", "CBC", "SWS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "paneGlass", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('B'), MekanismItems.Dictionary, Character.valueOf('W'), Blocks.chest
|
||||
}));
|
||||
MachineType.LASER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 13), new Object[] {
|
||||
));
|
||||
MachineType.LASER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 13),
|
||||
"RE ", "RCD", "RE ", Character.valueOf('R'), "alloyElite", Character.valueOf('E'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('C'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8), Character.valueOf('D'), "gemDiamond"
|
||||
}));
|
||||
MachineType.LASER_AMPLIFIER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 14), new Object[] {
|
||||
));
|
||||
MachineType.LASER_AMPLIFIER.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 14),
|
||||
"SSS", "SED", "SSS", Character.valueOf('S'), "ingotSteel", Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), Character.valueOf('D'), "gemDiamond"
|
||||
}));
|
||||
MachineType.LASER_TRACTOR_BEAM.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 15), new Object[] {
|
||||
));
|
||||
MachineType.LASER_TRACTOR_BEAM.addRecipe(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.MachineBlock2, 1, 15),
|
||||
"C", "F", Character.valueOf('C'), new ItemStack(MekanismBlocks.MachineBlock, 1, 13), Character.valueOf('F'), new ItemStack(MekanismBlocks.MachineBlock2, 1, 14)
|
||||
}));
|
||||
));
|
||||
|
||||
//Energy Cube recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC),
|
||||
"RTR", "iIi", "RTR", Character.valueOf('R'), "alloyBasic", Character.valueOf('i'), "ingotIron", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('I'), new ItemStack(MekanismBlocks.BasicBlock, 1, 8)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED),
|
||||
"ETE", "oBo", "ETE", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('o'), "ingotOsmium", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('B'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE),
|
||||
"RTR", "gAg", "RTR", Character.valueOf('R'), "alloyElite", Character.valueOf('g'), "ingotGold", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('A'), MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ULTIMATE), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getEnergyCube(EnergyCubeTier.ULTIMATE),
|
||||
"ATA", "dEd", "ATA", Character.valueOf('A'), "alloyUltimate", Character.valueOf('d'), "gemDiamond", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE)
|
||||
}));
|
||||
));
|
||||
|
||||
//Induction Cell recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.BASIC), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.BASIC),
|
||||
"LTL", "TET", "LTL", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), Character.valueOf('L'), "dustLithium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.ADVANCED), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.ADVANCED),
|
||||
"TCT", "CEC", "TCT", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED), Character.valueOf('C'), MekanismUtils.getInductionCell(InductionCellTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.ELITE), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.ELITE),
|
||||
"TCT", "CEC", "TCT", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE), Character.valueOf('C'), MekanismUtils.getInductionCell(InductionCellTier.ADVANCED)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.ULTIMATE), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.ULTIMATE),
|
||||
"TCT", "CEC", "TCT", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ULTIMATE), Character.valueOf('C'), MekanismUtils.getInductionCell(InductionCellTier.ELITE)
|
||||
}));
|
||||
));
|
||||
|
||||
//Induction Provider recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.BASIC), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.BASIC),
|
||||
"LCL", "CEC", "LCL", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), Character.valueOf('L'), "dustLithium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.ADVANCED), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.ADVANCED),
|
||||
"CPC", "PEP", "CPC", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ADVANCED), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED), Character.valueOf('P'), MekanismUtils.getInductionProvider(InductionProviderTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.ELITE), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.ELITE),
|
||||
"CPC", "PEP", "CPC", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ELITE), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ELITE), Character.valueOf('P'), MekanismUtils.getInductionProvider(InductionProviderTier.ADVANCED)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.ULTIMATE), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.ULTIMATE),
|
||||
"CPC", "PEP", "CPC", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ULTIMATE), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ULTIMATE), Character.valueOf('P'), MekanismUtils.getInductionProvider(InductionProviderTier.ELITE)
|
||||
}));
|
||||
));
|
||||
|
||||
//Circuit recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ControlCircuit, 1, 1), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ControlCircuit, 1, 1),
|
||||
"ECE", Character.valueOf('C'), new ItemStack(MekanismItems.ControlCircuit, 1, 0), Character.valueOf('E'), "alloyAdvanced"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ControlCircuit, 1, 2), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ControlCircuit, 1, 2),
|
||||
"RCR", Character.valueOf('C'), new ItemStack(MekanismItems.ControlCircuit, 1, 1), Character.valueOf('R'), "alloyElite"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ControlCircuit, 1, 3), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.ControlCircuit, 1, 3),
|
||||
"ACA", Character.valueOf('C'), new ItemStack(MekanismItems.ControlCircuit, 1, 2), Character.valueOf('A'), "alloyUltimate"
|
||||
}));
|
||||
));
|
||||
|
||||
//Factory recipes
|
||||
for(RecipeType type : RecipeType.values())
|
||||
{
|
||||
MachineType.BASIC_FACTORY.addRecipe(new ShapedMekanismRecipe(MekanismUtils.getFactory(FactoryTier.BASIC, type), new Object[] {
|
||||
MachineType.BASIC_FACTORY.addRecipe(new ShapedMekanismRecipe(MekanismUtils.getFactory(FactoryTier.BASIC, type),
|
||||
"RCR", "iOi", "RCR", Character.valueOf('R'), "alloyBasic", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC), Character.valueOf('i'), "ingotIron", Character.valueOf('O'), type.getStack()
|
||||
}));
|
||||
MachineType.ADVANCED_FACTORY.addRecipe(new ShapedMekanismRecipe(MekanismUtils.getFactory(FactoryTier.ADVANCED, type), new Object[] {
|
||||
));
|
||||
MachineType.ADVANCED_FACTORY.addRecipe(new ShapedMekanismRecipe(MekanismUtils.getFactory(FactoryTier.ADVANCED, type),
|
||||
"ECE", "oOo", "ECE", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ADVANCED), Character.valueOf('o'), "ingotOsmium", Character.valueOf('O'), MekanismUtils.getFactory(FactoryTier.BASIC, type)
|
||||
}));
|
||||
MachineType.ELITE_FACTORY.addRecipe(new ShapedMekanismRecipe(MekanismUtils.getFactory(FactoryTier.ELITE, type), new Object[] {
|
||||
));
|
||||
MachineType.ELITE_FACTORY.addRecipe(new ShapedMekanismRecipe(MekanismUtils.getFactory(FactoryTier.ELITE, type),
|
||||
"RCR", "gOg", "RCR", Character.valueOf('R'), "alloyElite", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.ELITE), Character.valueOf('g'), "ingotGold", Character.valueOf('O'), MekanismUtils.getFactory(FactoryTier.ADVANCED, type)
|
||||
}));
|
||||
));
|
||||
}
|
||||
|
||||
//Add the bin recipe system to the CraftingManager
|
||||
CraftingManager.getInstance().getRecipeList().add(new BinRecipe());
|
||||
|
||||
//Transmitters
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 0), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 0),
|
||||
"SRS", Character.valueOf('S'), "ingotSteel", Character.valueOf('R'), "dustRedstone"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 1), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 1),
|
||||
"TTT", "TET", "TTT", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 0)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 2), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 2),
|
||||
"TTT", "TRT", "TTT", Character.valueOf('R'), "alloyElite", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 1)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 3), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 3),
|
||||
"TTT", "TAT", "TTT", Character.valueOf('A'), "alloyUltimate", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 2)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 4), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 4),
|
||||
"SBS", Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Items.bucket
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 5), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 5),
|
||||
"TTT", "TET", "TTT", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 4)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 6), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 6),
|
||||
"TTT", "TRT", "TTT", Character.valueOf('R'), "alloyElite", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 5)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 7), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 7),
|
||||
"TTT", "TAT", "TTT", Character.valueOf('A'), "alloyUltimate", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 6)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 8), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 8),
|
||||
"SGS", Character.valueOf('S'), "ingotSteel", Character.valueOf('G'), "blockGlass"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 9), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 9),
|
||||
"TTT", "TET", "TTT", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 8)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 10), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 10),
|
||||
"TTT", "TRT", "TTT", Character.valueOf('R'), "alloyElite", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 9)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 11), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 11),
|
||||
"TTT", "TAT", "TTT", Character.valueOf('A'), "alloyUltimate", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 10)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 12), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 12),
|
||||
"SCS", Character.valueOf('S'), "ingotSteel", Character.valueOf('C'), MekanismUtils.getControlCircuit(BaseTier.BASIC)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 13), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 13),
|
||||
"TTT", "TET", "TTT", Character.valueOf('E'), "alloyAdvanced", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 12)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 14), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 14),
|
||||
"TTT", "TRT", "TTT", Character.valueOf('R'), "alloyElite", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 13)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 15), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 8, 15),
|
||||
"TTT", "TAT", "TTT", Character.valueOf('A'), "alloyUltimate", Character.valueOf('T'), new ItemStack(MekanismItems.PartTransmitter, 1, 14)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 2, 16), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 2, 16),
|
||||
"SBS", Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Blocks.iron_bars
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 2, 17), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.PartTransmitter, 2, 17),
|
||||
"RRR", "SBS", "RRR", Character.valueOf('R'), "dustRedstone", Character.valueOf('S'), "ingotSteel", Character.valueOf('B'), Blocks.iron_bars
|
||||
}));
|
||||
));
|
||||
|
||||
//Plastic stuff
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 1), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 1),
|
||||
"PP", "PP", Character.valueOf('P'), new ItemStack(MekanismItems.Polyethene, 1, 0)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 2), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 2),
|
||||
"PPP", "P P", "PPP", Character.valueOf('P'), new ItemStack(MekanismItems.Polyethene, 1, 0)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 3), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.Polyethene, 1, 3),
|
||||
"R", "R", Character.valueOf('R'), new ItemStack(MekanismItems.Polyethene, 1, 1)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, 15), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, 15),
|
||||
"SSS", "S S", "SSS", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, 15), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, 15),
|
||||
"PSP", "S S", "GSG", Character.valueOf('P'), "paneGlass", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2), Character.valueOf('G'), Items.glowstone_dust
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticFence, 3, 15), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticFence, 3, 15),
|
||||
"BSB", "BSB", Character.valueOf('B'), new ItemStack(MekanismBlocks.PlasticBlock, 1, 15), Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 3)
|
||||
}));
|
||||
));
|
||||
|
||||
for(int i = 0; i < EnumColor.DYES.length-1; i++)
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, i), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, i),
|
||||
"SSS", "SDS", "SSS", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, i), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 2, i),
|
||||
"PSP", "SDS", "GSG", Character.valueOf('P'), "paneGlass", Character.valueOf('S'), new ItemStack(MekanismItems.Polyethene, 1, 2), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName, Character.valueOf('G'), Items.glowstone_dust
|
||||
}));
|
||||
));
|
||||
}
|
||||
|
||||
for(int i = 0; i < EnumColor.DYES.length; i++)
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapelessMekanismRecipe(new ItemStack(MekanismItems.Balloon, 2, i), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapelessMekanismRecipe(new ItemStack(MekanismItems.Balloon, 2, i),
|
||||
Items.leather, Items.string, "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
));
|
||||
|
||||
for(int j = 0; j < EnumColor.DYES.length; j++)
|
||||
{
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapelessMekanismRecipe(new ItemStack(MekanismItems.Balloon, 1, i), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapelessMekanismRecipe(new ItemStack(MekanismItems.Balloon, 1, i),
|
||||
new ItemStack(MekanismItems.Balloon, 1, j), "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
));
|
||||
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, i), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.PlasticBlock, 4, i),
|
||||
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.PlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.SlickPlasticBlock, 4, i), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.SlickPlasticBlock, 4, i),
|
||||
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.SlickPlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.GlowPlasticBlock, 4, i), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.GlowPlasticBlock, 4, i),
|
||||
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.GlowPlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 4, i), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 4, i),
|
||||
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 4, i), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismItems.GlowPanel, 4, i),
|
||||
" P ", "PDP", " P ", Character.valueOf('P'), new ItemStack(MekanismItems.GlowPanel, 1, j), Character.valueOf('D'), "dye" + EnumColor.DYES[i].dyeName
|
||||
}));
|
||||
));
|
||||
}
|
||||
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapelessMekanismRecipe(new ItemStack(MekanismBlocks.GlowPlasticBlock, 3, i), new Object[] {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapelessMekanismRecipe(new ItemStack(MekanismBlocks.GlowPlasticBlock, 3, i),
|
||||
new ItemStack(MekanismBlocks.PlasticBlock, 1, i), new ItemStack(MekanismBlocks.PlasticBlock, 1, i), new ItemStack(MekanismBlocks.PlasticBlock, 1, i), new ItemStack(Items.glowstone_dust)
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 4, i), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.ReinforcedPlasticBlock, 4, i),
|
||||
" P ", "POP", " P ", Character.valueOf('P'), new ItemStack(MekanismBlocks.PlasticBlock, 1, i), Character.valueOf('O'), "dustOsmium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.RoadPlasticBlock, 3, i), new Object[] {
|
||||
));
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedMekanismRecipe(new ItemStack(MekanismBlocks.RoadPlasticBlock, 3, i),
|
||||
"SSS", "PPP", "SSS", Character.valueOf('S'), Blocks.sand, Character.valueOf('P'), new ItemStack(MekanismBlocks.SlickPlasticBlock, 1, i)
|
||||
}));
|
||||
));
|
||||
}
|
||||
|
||||
//Furnace Recipes
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.OreBlock, 1, 0), new ItemStack(MekanismItems.Ingot, 1, 1), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.OreBlock, 1, 1), new ItemStack(MekanismItems.Ingot, 1, 5), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismBlocks.OreBlock, 1, 2), new ItemStack(MekanismItems.Ingot, 1, 6), 1.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.OSMIUM.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 1), 0.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.IRON.ordinal()), new ItemStack(Items.iron_ingot), 0.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.GOLD.ordinal()), new ItemStack(Items.gold_ingot), 0.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.OtherDust, 1, 1), new ItemStack(MekanismItems.Ingot, 1, 4), 0.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.COPPER.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 5), 0.0F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(MekanismItems.Dust, 1, Resource.TIN.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 6), 0.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismBlocks.OreBlock, 1, 0), new ItemStack(MekanismItems.Ingot, 1, 1), 1.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismBlocks.OreBlock, 1, 1), new ItemStack(MekanismItems.Ingot, 1, 5), 1.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismBlocks.OreBlock, 1, 2), new ItemStack(MekanismItems.Ingot, 1, 6), 1.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismItems.Dust, 1, Resource.OSMIUM.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 1), 0.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismItems.Dust, 1, Resource.IRON.ordinal()), new ItemStack(Items.iron_ingot), 0.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismItems.Dust, 1, Resource.GOLD.ordinal()), new ItemStack(Items.gold_ingot), 0.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismItems.OtherDust, 1, 1), new ItemStack(MekanismItems.Ingot, 1, 4), 0.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismItems.Dust, 1, Resource.COPPER.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 5), 0.0F);
|
||||
FurnaceRecipes.instance().addSmeltingRecipe(new ItemStack(MekanismItems.Dust, 1, Resource.TIN.ordinal()), new ItemStack(MekanismItems.Ingot, 1, 6), 0.0F);
|
||||
|
||||
//Enrichment Chamber Recipes
|
||||
RecipeHandler.addEnrichmentChamberRecipe(new ItemStack(Blocks.redstone_ore), new ItemStack(Items.redstone, 12));
|
||||
@@ -793,12 +792,27 @@ public class Mekanism
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.trapdoor), new ItemStack(Blocks.planks, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.boat), new ItemStack(Blocks.planks, 5));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.bed), new ItemStack(Blocks.planks, 3), new ItemStack(Blocks.wool, 3), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.wooden_door), new ItemStack(Blocks.planks, 6));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.oak_door), new ItemStack(Blocks.planks, 6, 0));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.spruce_door), new ItemStack(Blocks.planks, 6, 1));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.birch_door), new ItemStack(Blocks.planks, 6, 2));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.jungle_door), new ItemStack(Blocks.planks, 6, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.acacia_door), new ItemStack(Blocks.planks, 6, 4));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Items.dark_oak_door), new ItemStack(Blocks.planks, 6, 5));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.jukebox), new ItemStack(Blocks.planks, 8), new ItemStack(Items.diamond), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.bookshelf), new ItemStack(Blocks.planks, 6), new ItemStack(Items.book, 3), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.wooden_pressure_plate), new ItemStack(Blocks.planks, 2));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.fence), new ItemStack(Items.stick, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.fence_gate), new ItemStack(Blocks.planks, 2), new ItemStack(Items.stick, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.oak_fence), new ItemStack(Items.stick, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.spruce_fence), new ItemStack(Items.stick, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.birch_fence), new ItemStack(Items.stick, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.jungle_fence), new ItemStack(Items.stick, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.acacia_fence), new ItemStack(Items.stick, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.dark_oak_fence), new ItemStack(Items.stick, 3));
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.oak_fence_gate), new ItemStack(Blocks.planks, 2, 0), new ItemStack(Items.stick, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.spruce_fence_gate), new ItemStack(Blocks.planks, 2, 1), new ItemStack(Items.stick, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.birch_fence_gate), new ItemStack(Blocks.planks, 2, 2), new ItemStack(Items.stick, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.jungle_fence_gate), new ItemStack(Blocks.planks, 2, 3), new ItemStack(Items.stick, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.acacia_fence_gate), new ItemStack(Blocks.planks, 2, 4), new ItemStack(Items.stick, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.dark_oak_fence_gate), new ItemStack(Blocks.planks, 2, 5), new ItemStack(Items.stick, 4), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.noteblock), new ItemStack(Blocks.planks, 8), new ItemStack(Items.redstone), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.redstone_torch), new ItemStack(Items.stick), new ItemStack(Items.redstone), 1);
|
||||
RecipeHandler.addPrecisionSawmillRecipe(new ItemStack(Blocks.crafting_table), new ItemStack(Blocks.planks, 4));
|
||||
@@ -1079,7 +1093,7 @@ public class Mekanism
|
||||
//Load cached furnace recipes
|
||||
Recipe.ENERGIZED_SMELTER.get().clear();
|
||||
|
||||
for(Object obj : FurnaceRecipes.smelting().getSmeltingList().entrySet())
|
||||
for(Object obj : FurnaceRecipes.instance().getSmeltingList().entrySet())
|
||||
{
|
||||
Map.Entry<ItemStack, ItemStack> entry = (Map.Entry<ItemStack, ItemStack>)obj;
|
||||
SmeltingRecipe recipe = new SmeltingRecipe(new ItemStackInput(entry.getKey()), new ItemStackOutput(entry.getValue()));
|
||||
@@ -1154,7 +1168,7 @@ public class Mekanism
|
||||
GasRegistry.register(new Gas("steam")).registerFluid();
|
||||
GasRegistry.register(new Gas("lithium")).registerFluid();
|
||||
|
||||
FluidRegistry.registerFluid(new Fluid("heavyWater"));
|
||||
FluidRegistry.registerFluid(new Fluid("heavyWater", new ResourceLocation("mekanism:heavy_water"), new ResourceLocation("mekanism:heavy_water")));
|
||||
|
||||
for(Resource resource : Resource.values())
|
||||
{
|
||||
@@ -1224,9 +1238,9 @@ public class Mekanism
|
||||
{
|
||||
for(BiomeGenBase biome : WorldChunkManager.allowedBiomes)
|
||||
{
|
||||
if(biome.getSpawnableList(EnumCreatureType.monster) != null && biome.getSpawnableList(EnumCreatureType.monster).size() > 0)
|
||||
if(biome.getSpawnableList(EnumCreatureType.MONSTER) != null && biome.getSpawnableList(EnumCreatureType.MONSTER).size() > 0)
|
||||
{
|
||||
EntityRegistry.addSpawn(EntityBabySkeleton.class, 40, 1, 3, EnumCreatureType.monster, new BiomeGenBase[] {biome});
|
||||
EntityRegistry.addSpawn(EntityBabySkeleton.class, 40, 1, 3, EnumCreatureType.MONSTER, biome);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1239,7 +1253,7 @@ public class Mekanism
|
||||
registerOreDict();
|
||||
|
||||
//Set up multiparts
|
||||
new MultipartMekanism();
|
||||
//TODO reinstate Multipart support with MCMultipart new MultipartMekanism();
|
||||
|
||||
//Integrate with Waila
|
||||
FMLInterModComms.sendMessage("Waila", "register", "mekanism.common.integration.WailaDataProvider.register");
|
||||
@@ -1352,9 +1366,14 @@ public class Mekanism
|
||||
MekanismAPI.addBoxBlacklist(Blocks.end_portal, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.end_portal_frame, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.bed, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.wooden_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.oak_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.spruce_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.birch_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.jungle_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.acacia_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.dark_oak_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(Blocks.iron_door, OreDictionary.WILDCARD_VALUE);
|
||||
MekanismAPI.addBoxBlacklist(MultipartProxy.block(), OreDictionary.WILDCARD_VALUE);
|
||||
// MekanismAPI.addBoxBlacklist(MultipartProxy.block(), OreDictionary.WILDCARD_VALUE);
|
||||
|
||||
BoxBlacklistParser.load();
|
||||
}
|
||||
@@ -1364,7 +1383,7 @@ public class Mekanism
|
||||
{
|
||||
if(event.getChunk() != null && !event.world.isRemote)
|
||||
{
|
||||
Map copy = (Map)((HashMap)event.getChunk().chunkTileEntityMap).clone();
|
||||
Map copy = (Map)((HashMap)event.getChunk().getTileEntityMap()).clone();
|
||||
|
||||
for(Iterator iter = copy.values().iterator(); iter.hasNext();)
|
||||
{
|
||||
@@ -1414,7 +1433,7 @@ public class Mekanism
|
||||
}
|
||||
|
||||
ChunkCoordIntPair coordPair = event.getChunk().getChunkCoordIntPair();
|
||||
worldTickHandler.addRegenChunk(event.world.provider.dimensionId, coordPair);
|
||||
worldTickHandler.addRegenChunk(event.world.provider.getDimensionId(), coordPair);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,24 +32,24 @@ import static mekanism.common.block.BlockMachine.MachineBlock.MACHINE_BLOCK_3;
|
||||
@ObjectHolder("Mekanism")
|
||||
public class MekanismBlocks
|
||||
{
|
||||
public static final Block BasicBlock = new BlockBasic(BASIC_BLOCK_1).setBlockName("BasicBlock");
|
||||
public static final Block BasicBlock2 = new BlockBasic(BASIC_BLOCK_2).setBlockName("BasicBlock2");
|
||||
public static final Block MachineBlock = new BlockMachine(MACHINE_BLOCK_1).setBlockName("MachineBlock");
|
||||
public static final Block MachineBlock2 = new BlockMachine(MACHINE_BLOCK_2).setBlockName("MachineBlock2");
|
||||
public static final Block MachineBlock3 = new BlockMachine(MACHINE_BLOCK_3).setBlockName("MachineBlock3");
|
||||
public static final Block OreBlock = new BlockOre().setBlockName("OreBlock");
|
||||
public static final Block ObsidianTNT = new BlockObsidianTNT().setBlockName("ObsidianTNT").setCreativeTab(Mekanism.tabMekanism);
|
||||
public static final Block EnergyCube = new BlockEnergyCube().setBlockName("EnergyCube");
|
||||
public static final Block BoundingBlock = (BlockBounding)new BlockBounding().setBlockName("BoundingBlock");
|
||||
public static final Block GasTank = new BlockGasTank().setBlockName("GasTank");
|
||||
public static final Block CardboardBox = new BlockCardboardBox().setBlockName("CardboardBox");
|
||||
public static final Block PlasticBlock = new BlockPlastic().setBlockName("PlasticBlock");
|
||||
public static final Block SlickPlasticBlock = new BlockPlastic().setBlockName("SlickPlasticBlock");
|
||||
public static final Block GlowPlasticBlock = new BlockPlastic().setBlockName("GlowPlasticBlock");
|
||||
public static final Block ReinforcedPlasticBlock = new BlockPlastic().setBlockName("ReinforcedPlasticBlock");
|
||||
public static final Block RoadPlasticBlock = new BlockPlastic().setBlockName("RoadPlasticBlock");
|
||||
public static final Block PlasticFence = new BlockPlasticFence().setBlockName("PlasticFence");
|
||||
public static final Block SaltBlock = new BlockSalt().setBlockName("SaltBlock");
|
||||
public static final Block BasicBlock = new BlockBasic(BASIC_BLOCK_1).setUnlocalizedName("BasicBlock");
|
||||
public static final Block BasicBlock2 = new BlockBasic(BASIC_BLOCK_2).setUnlocalizedName("BasicBlock2");
|
||||
public static final Block MachineBlock = new BlockMachine(MACHINE_BLOCK_1).setUnlocalizedName("MachineBlock");
|
||||
public static final Block MachineBlock2 = new BlockMachine(MACHINE_BLOCK_2).setUnlocalizedName("MachineBlock2");
|
||||
public static final Block MachineBlock3 = new BlockMachine(MACHINE_BLOCK_3).setUnlocalizedName("MachineBlock3");
|
||||
public static final Block OreBlock = new BlockOre().setUnlocalizedName("OreBlock");
|
||||
public static final Block ObsidianTNT = new BlockObsidianTNT().setUnlocalizedName("ObsidianTNT").setCreativeTab(Mekanism.tabMekanism);
|
||||
public static final Block EnergyCube = new BlockEnergyCube().setUnlocalizedName("EnergyCube");
|
||||
public static final Block BoundingBlock = (BlockBounding)new BlockBounding().setUnlocalizedName("BoundingBlock");
|
||||
public static final Block GasTank = new BlockGasTank().setUnlocalizedName("GasTank");
|
||||
public static final Block CardboardBox = new BlockCardboardBox().setUnlocalizedName("CardboardBox");
|
||||
public static final Block PlasticBlock = new BlockPlastic().setUnlocalizedName("PlasticBlock");
|
||||
public static final Block SlickPlasticBlock = new BlockPlastic().setUnlocalizedName("SlickPlasticBlock");
|
||||
public static final Block GlowPlasticBlock = new BlockPlastic().setUnlocalizedName("GlowPlasticBlock");
|
||||
public static final Block ReinforcedPlasticBlock = new BlockPlastic().setUnlocalizedName("ReinforcedPlasticBlock");
|
||||
public static final Block RoadPlasticBlock = new BlockPlastic().setUnlocalizedName("RoadPlasticBlock");
|
||||
public static final Block PlasticFence = new BlockPlasticFence().setUnlocalizedName("PlasticFence");
|
||||
public static final Block SaltBlock = new BlockSalt().setUnlocalizedName("SaltBlock");
|
||||
|
||||
/**
|
||||
* Adds and registers all blocks.
|
||||
|
||||
@@ -31,8 +31,6 @@ import mekanism.common.item.ItemSeismicReader;
|
||||
import mekanism.common.item.ItemShard;
|
||||
import mekanism.common.item.ItemUpgrade;
|
||||
import mekanism.common.item.ItemWalkieTalkie;
|
||||
import mekanism.common.multipart.ItemGlowPanel;
|
||||
import mekanism.common.multipart.ItemPartTransmitter;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -80,8 +78,8 @@ public class MekanismItems
|
||||
public static final Item Dictionary = new ItemDictionary().setUnlocalizedName("Dictionary");
|
||||
public static final ItemGaugeDropper GaugeDropper = (ItemGaugeDropper)new ItemGaugeDropper().setUnlocalizedName("GaugeDropper");
|
||||
public static final Item FilterCard = new ItemFilterCard().setUnlocalizedName("FilterCard");
|
||||
public static final Item PartTransmitter = new ItemPartTransmitter().setUnlocalizedName("MultipartTransmitter");
|
||||
public static final Item GlowPanel = new ItemGlowPanel().setUnlocalizedName("GlowPanel");
|
||||
// public static final Item PartTransmitter = new ItemPartTransmitter().setUnlocalizedName("MultipartTransmitter");
|
||||
// public static final Item GlowPanel = new ItemGlowPanel().setUnlocalizedName("GlowPanel");
|
||||
public static final ItemScubaTank ScubaTank = (ItemScubaTank)new ItemScubaTank().setUnlocalizedName("ScubaTank");
|
||||
public static final ItemGasMask GasMask = (ItemGasMask)new ItemGasMask().setUnlocalizedName("GasMask");
|
||||
public static final ItemJetpack Jetpack = (ItemJetpack)new ItemJetpack().setUnlocalizedName("Jetpack");
|
||||
@@ -106,7 +104,7 @@ public class MekanismItems
|
||||
*/
|
||||
public static void register()
|
||||
{
|
||||
GameRegistry.registerItem(PartTransmitter, "PartTransmitter");
|
||||
// GameRegistry.registerItem(PartTransmitter, "PartTransmitter");
|
||||
GameRegistry.registerItem(ElectricBow, "ElectricBow");
|
||||
GameRegistry.registerItem(Dust, "Dust");
|
||||
GameRegistry.registerItem(Ingot, "Ingot");
|
||||
@@ -154,7 +152,7 @@ public class MekanismItems
|
||||
GameRegistry.registerItem(Substrate, "Substrate");
|
||||
GameRegistry.registerItem(Polyethene, "Polyethene");
|
||||
GameRegistry.registerItem(BioFuel, "BioFuel");
|
||||
GameRegistry.registerItem(GlowPanel, "GlowPanel");
|
||||
// GameRegistry.registerItem(GlowPanel, "GlowPanel");
|
||||
GameRegistry.registerItem(Flamethrower, "Flamethrower");
|
||||
GameRegistry.registerItem(GaugeDropper, "GaugeDropper");
|
||||
GameRegistry.registerItem(FactoryInstaller, "FactoryInstaller");
|
||||
|
||||
@@ -341,7 +341,7 @@ public class PacketHandler
|
||||
{
|
||||
for(EntityPlayerMP player : (List<EntityPlayerMP>)server.getConfigurationManager().playerEntityList)
|
||||
{
|
||||
if(player.dimension == dimId && cuboid.isVecInside(Vec3.createVectorHelper(player.posX, player.posY, player.posZ)))
|
||||
if(player.dimension == dimId && cuboid.isVecInside(new Vec3(player.posX, player.posY, player.posZ)))
|
||||
{
|
||||
sendTo(message, player);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ import mekanism.common.entity.EntityRobit;
|
||||
|
||||
import net.minecraft.entity.ai.EntityAIBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.pathfinding.PathNavigate;
|
||||
import net.minecraft.pathfinding.PathNavigateGround;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -23,7 +24,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
private float moveSpeed;
|
||||
|
||||
/** The robit's pathfinder. */
|
||||
private PathNavigate thePathfinder;
|
||||
private PathNavigateGround thePathfinder;
|
||||
|
||||
/** The ticker for updates. */
|
||||
private int ticker;
|
||||
@@ -57,7 +58,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if(theRobit.worldObj.provider.dimensionId != player.worldObj.provider.dimensionId)
|
||||
else if(theRobit.worldObj.provider.getDimensionId() != player.worldObj.provider.getDimensionId())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -85,7 +86,7 @@ public class RobitAIFollow extends EntityAIBase
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
{
|
||||
return !thePathfinder.noPath() && theRobit.getDistanceSqToEntity(theOwner) > (maxDist * maxDist) && theRobit.getFollowing() && theRobit.getEnergy() > 0 && theOwner.worldObj.provider.dimensionId == theRobit.worldObj.provider.dimensionId;
|
||||
return !thePathfinder.noPath() && theRobit.getDistanceSqToEntity(theOwner) > (maxDist * maxDist) && theRobit.getFollowing() && theRobit.getEnergy() > 0 && theOwner.worldObj.provider.getDimensionId() == theRobit.worldObj.provider.getDimensionId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,16 +121,17 @@ public class RobitAIFollow extends EntityAIBase
|
||||
if(theRobit.getDistanceSqToEntity(theOwner) >= 144.0D)
|
||||
{
|
||||
int x = MathHelper.floor_double(theOwner.posX) - 2;
|
||||
int y = MathHelper.floor_double(theOwner.posZ) - 2;
|
||||
int z = MathHelper.floor_double(theOwner.boundingBox.minY);
|
||||
int y = MathHelper.floor_double(theOwner.getEntityBoundingBox().minY);
|
||||
int z = MathHelper.floor_double(theOwner.posZ) - 2;
|
||||
|
||||
for(int l = 0; l <= 4; ++l)
|
||||
{
|
||||
for(int i1 = 0; i1 <= 4; ++i1)
|
||||
{
|
||||
if((l < 1 || i1 < 1 || l > 3 || i1 > 3) && theWorld.doesBlockHaveSolidTopSurface(theWorld, x + l, z - 1, y + i1) && !theWorld.getBlock(x + l, z, y + i1).isNormalCube() && !theWorld.getBlock(x + l, z + 1, y + i1).isNormalCube())
|
||||
BlockPos pos = new BlockPos(x+l, y, z+i1);
|
||||
if((l < 1 || i1 < 1 || l > 3 || i1 > 3) && World.doesBlockHaveSolidTopSurface(theWorld, pos.down()) && !theWorld.getBlockState(pos).getBlock().isNormalCube() && !theWorld.getBlockState(pos.up()).getBlock().isNormalCube())
|
||||
{
|
||||
theRobit.setLocationAndAngles((x + l) + 0.5F, z, (y + i1) + 0.5F, theRobit.rotationYaw, theRobit.rotationPitch);
|
||||
theRobit.setLocationAndAngles((x + l) + 0.5F, y, (z + i1) + 0.5F, theRobit.rotationYaw, theRobit.rotationPitch);
|
||||
thePathfinder.clearPathEntity();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.entity.ai.EntityAIBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.pathfinding.PathNavigate;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -58,7 +59,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
return true;
|
||||
}
|
||||
|
||||
List items = theRobit.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(theRobit.posX-10, theRobit.posY-10, theRobit.posZ-10, theRobit.posX+10, theRobit.posY+10, theRobit.posZ+10));
|
||||
List items = theRobit.worldObj.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(theRobit.posX-10, theRobit.posY-10, theRobit.posZ-10, theRobit.posX+10, theRobit.posY+10, theRobit.posZ+10));
|
||||
Iterator iter = items.iterator();
|
||||
//Cached for slight performance
|
||||
double closestDistance = -1;
|
||||
@@ -95,7 +96,7 @@ public class RobitAIPickup extends EntityAIBase
|
||||
@Override
|
||||
public boolean continueExecuting()
|
||||
{
|
||||
return !closest.isDead && !thePathfinder.noPath() && theRobit.getDistanceSqToEntity(closest) > 100 && theRobit.getFollowing() && theRobit.getEnergy() > 0 && closest.worldObj.provider.dimensionId == theRobit.worldObj.provider.dimensionId;
|
||||
return !closest.isDead && !thePathfinder.noPath() && theRobit.getDistanceSqToEntity(closest) > 100 && theRobit.getFollowing() && theRobit.getEnergy() > 0 && closest.worldObj.provider.getDimensionId() == theRobit.worldObj.provider.getDimensionId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -132,16 +133,17 @@ public class RobitAIPickup extends EntityAIBase
|
||||
if(theRobit.getDistanceSqToEntity(closest) >= 144.0D)
|
||||
{
|
||||
int x = MathHelper.floor_double(closest.posX) - 2;
|
||||
int y = MathHelper.floor_double(closest.posZ) - 2;
|
||||
int z = MathHelper.floor_double(closest.boundingBox.minY);
|
||||
int y = MathHelper.floor_double(closest.getEntityBoundingBox().minY);
|
||||
int z = MathHelper.floor_double(closest.posZ) - 2;
|
||||
|
||||
for(int l = 0; l <= 4; ++l)
|
||||
{
|
||||
for(int i1 = 0; i1 <= 4; ++i1)
|
||||
{
|
||||
if((l < 1 || i1 < 1 || l > 3 || i1 > 3) && theWorld.doesBlockHaveSolidTopSurface(theWorld, x + l, z - 1, y + i1) && !theWorld.getBlock(x + l, z, y + i1).isNormalCube() && !theWorld.getBlock(x + l, z + 1, y + i1).isNormalCube())
|
||||
BlockPos pos = new BlockPos(x+l, y, z+i1);
|
||||
if((l < 1 || i1 < 1 || l > 3 || i1 > 3) && World.doesBlockHaveSolidTopSurface(theWorld, pos.down()) && !theWorld.getBlockState(pos).getBlock().isNormalCube() && !theWorld.getBlockState(pos.up()).getBlock().isNormalCube())
|
||||
{
|
||||
theRobit.setLocationAndAngles((x + l) + 0.5F, z, (y + i1) + 0.5F, theRobit.rotationYaw, theRobit.rotationPitch);
|
||||
theRobit.setLocationAndAngles((x + l) + 0.5F, y, (z + i1) + 0.5F, theRobit.rotationYaw, theRobit.rotationPitch);
|
||||
thePathfinder.clearPathEntity();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package mekanism.common;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.multipart.TransmitterType;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -233,6 +232,7 @@ public final class Tier
|
||||
* @author aidancbrady
|
||||
*
|
||||
*/
|
||||
/*
|
||||
public static enum CableTier
|
||||
{
|
||||
BASIC(3200, TransmitterType.UNIVERSAL_CABLE_BASIC),
|
||||
@@ -286,11 +286,13 @@ public final class Tier
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* The tiers used by Mechanical Pipes and their corresponding values.
|
||||
* @author unpairedbracket
|
||||
*
|
||||
*/
|
||||
*//*
|
||||
|
||||
public static enum PipeTier
|
||||
{
|
||||
BASIC(1000, 100, TransmitterType.MECHANICAL_PIPE_BASIC),
|
||||
@@ -351,11 +353,13 @@ public final class Tier
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* The tiers used by Pressurized Tubes and their corresponding values.
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
*//*
|
||||
|
||||
public static enum TubeTier
|
||||
{
|
||||
BASIC(256, 64, TransmitterType.PRESSURIZED_TUBE_BASIC),
|
||||
@@ -416,11 +420,13 @@ public final class Tier
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
/**
|
||||
* The tiers used by Logistical Transporters and their corresponding values.
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
*//*
|
||||
|
||||
public static enum TransporterTier
|
||||
{
|
||||
BASIC(1, 5, TransmitterType.LOGISTICAL_TRANSPORTER_BASIC),
|
||||
@@ -556,14 +562,17 @@ public final class Tier
|
||||
tier.readConfig(dataStream);
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
public static void writeConfig(ByteBuf dataStream)
|
||||
{
|
||||
/*
|
||||
for(CableTier tier : CableTier.values())
|
||||
{
|
||||
tier.writeConfig(dataStream);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
for(InductionCellTier tier : InductionCellTier.values())
|
||||
{
|
||||
tier.writeConfig(dataStream);
|
||||
@@ -579,6 +588,7 @@ public final class Tier
|
||||
tier.writeConfig(dataStream);
|
||||
}
|
||||
|
||||
/*
|
||||
for(PipeTier tier : PipeTier.values())
|
||||
{
|
||||
tier.writeConfig(dataStream);
|
||||
@@ -593,5 +603,6 @@ public final class Tier
|
||||
{
|
||||
tier.writeConfig(dataStream);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package mekanism.common.base;
|
||||
|
||||
import mekanism.common.tile.component.TileComponentConfig;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
/**
|
||||
* Implement this if your TileEntity is capable of being modified by a Configurator in it's 'modify' mode.
|
||||
* @author AidanBrady
|
||||
@@ -19,7 +21,7 @@ public interface ISideConfiguration
|
||||
* Gets this machine's current orientation.
|
||||
* @return machine's current orientation
|
||||
*/
|
||||
public int getOrientation();
|
||||
public EnumFacing getOrientation();
|
||||
|
||||
/**
|
||||
* Gets this machine's ejector.
|
||||
|
||||
@@ -43,7 +43,7 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
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.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@@ -483,7 +483,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);
|
||||
}
|
||||
|
||||
int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][bin.facing];
|
||||
int change = EnumFacing.ROTATION_MATRIX[EnumFacing.UP.ordinal()][bin.facing];
|
||||
|
||||
bin.setFacing((short)change);
|
||||
world.notifyBlocksOfNeighborChange(x, y, z, this);
|
||||
@@ -571,7 +571,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, EnumFacing side)
|
||||
{
|
||||
return !(blockType == BasicBlock.BASIC_BLOCK_1 && world.getBlockMetadata(x, y, z) == 10);
|
||||
}
|
||||
@@ -991,7 +991,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side)
|
||||
{
|
||||
Coord4D obj = new Coord4D(x, y, z).offset(ForgeDirection.getOrientation(side).getOpposite());
|
||||
Coord4D obj = new Coord4D(x, y, z).offset(EnumFacing.getFront(side).getOpposite());
|
||||
|
||||
if(blockType == BasicBlock.BASIC_BLOCK_1 && obj.getBlockState(world) == 10)
|
||||
{
|
||||
@@ -1003,16 +1003,16 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
|
||||
public EnumFacing[] getValidRotations(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
ForgeDirection[] valid = new ForgeDirection[6];
|
||||
EnumFacing[] valid = new EnumFacing[6];
|
||||
|
||||
if(tile instanceof TileEntityBasicBlock)
|
||||
{
|
||||
TileEntityBasicBlock basicTile = (TileEntityBasicBlock)tile;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing dir : EnumFacing.VALUES)
|
||||
{
|
||||
if(basicTile.canSetFacing(dir.ordinal()))
|
||||
{
|
||||
@@ -1025,7 +1025,7 @@ public class BlockBasic extends Block implements IBlockCTM, ICustomBlockIcon
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
|
||||
public boolean rotateBlock(World world, int x, int y, int z, EnumFacing axis)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
@@ -166,7 +166,7 @@ public class BlockEnergyCube extends BlockContainer
|
||||
((IToolWrench) tool).wrenchUsed(entityplayer, x, y, z);
|
||||
}
|
||||
|
||||
int change = ForgeDirection.ROTATION_MATRIX[side][tileEntity.facing];
|
||||
int change = EnumFacing.ROTATION_MATRIX[side][tileEntity.facing];
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
world.notifyBlocksOfNeighborChange(x, y, z, this);
|
||||
@@ -280,22 +280,22 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, EnumFacing side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
|
||||
public EnumFacing[] getValidRotations(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
ForgeDirection[] valid = new ForgeDirection[6];
|
||||
EnumFacing[] valid = new EnumFacing[6];
|
||||
|
||||
if(tile instanceof TileEntityBasicBlock)
|
||||
{
|
||||
TileEntityBasicBlock basicTile = (TileEntityBasicBlock)tile;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing dir : EnumFacing.VALUES)
|
||||
{
|
||||
if(basicTile.canSetFacing(dir.ordinal()))
|
||||
{
|
||||
@@ -308,7 +308,7 @@ public class BlockEnergyCube extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
|
||||
public boolean rotateBlock(World world, int x, int y, int z, EnumFacing axis)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
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 net.minecraftforge.fml.common.ModAPIManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -113,7 +113,7 @@ public class BlockGasTank extends BlockContainer
|
||||
if(MekanismUtils.isBCWrench(tool))
|
||||
((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);
|
||||
|
||||
int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][tileEntity.facing];
|
||||
int change = EnumFacing.ROTATION_MATRIX[EnumFacing.UP.ordinal()][tileEntity.facing];
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
world.notifyBlocksOfNeighborChange(x, y, z, this);
|
||||
@@ -236,16 +236,16 @@ public class BlockGasTank extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
|
||||
public EnumFacing[] getValidRotations(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
ForgeDirection[] valid = new ForgeDirection[6];
|
||||
EnumFacing[] valid = new EnumFacing[6];
|
||||
|
||||
if(tile instanceof TileEntityBasicBlock)
|
||||
{
|
||||
TileEntityBasicBlock basicTile = (TileEntityBasicBlock)tile;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing dir : EnumFacing.VALUES)
|
||||
{
|
||||
if(basicTile.canSetFacing(dir.ordinal()))
|
||||
{
|
||||
@@ -258,7 +258,7 @@ public class BlockGasTank extends BlockContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
|
||||
public boolean rotateBlock(World world, int x, int y, int z, EnumFacing axis)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
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.Fluid;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
@@ -234,7 +234,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
|
||||
if(!transporter.hasInventory())
|
||||
{
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing dir : EnumFacing.VALUES)
|
||||
{
|
||||
TileEntity tile = Coord4D.get(transporter).offset(dir).getTileEntity(world);
|
||||
|
||||
@@ -249,7 +249,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
else if(tileEntity instanceof TileEntityTeleporter)
|
||||
{
|
||||
TileEntityTeleporter teleporter = (TileEntityTeleporter)tileEntity;
|
||||
teleporter.owner = entityliving.getCommandSenderName();
|
||||
teleporter.owner = entityliving.getName();
|
||||
}
|
||||
|
||||
tileEntity.setFacing((short)change);
|
||||
@@ -292,7 +292,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
|
||||
if(tileEntity instanceof TileEntityMetallurgicInfuser)
|
||||
{
|
||||
side = ForgeDirection.getOrientation(side).getOpposite().ordinal();
|
||||
side = EnumFacing.getFront(side).getOpposite().ordinal();
|
||||
}
|
||||
|
||||
if(side == 4)
|
||||
@@ -518,13 +518,13 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);
|
||||
}
|
||||
|
||||
int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][tileEntity.facing];
|
||||
int change = EnumFacing.ROTATION_MATRIX[EnumFacing.UP.ordinal()][tileEntity.facing];
|
||||
|
||||
if(tileEntity instanceof TileEntityLogisticalSorter)
|
||||
{
|
||||
if(!((TileEntityLogisticalSorter)tileEntity).hasInventory())
|
||||
{
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing dir : EnumFacing.VALUES)
|
||||
{
|
||||
TileEntity tile = Coord4D.get(tileEntity).offset(dir).getTileEntity(world);
|
||||
|
||||
@@ -552,7 +552,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
case ELECTRIC_CHEST:
|
||||
TileEntityElectricChest electricChest = (TileEntityElectricChest)tileEntity;
|
||||
|
||||
if(!(entityplayer.isSneaking() || world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN)))
|
||||
if(!(entityplayer.isSneaking() || world.isSideSolid(x, y + 1, z, EnumFacing.DOWN)))
|
||||
{
|
||||
if(electricChest.canAccess() || MekanismUtils.isOp((EntityPlayerMP)entityplayer))
|
||||
{
|
||||
@@ -593,10 +593,10 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
|
||||
if(teleporter.owner == null)
|
||||
{
|
||||
teleporter.owner = entityplayer.getCommandSenderName();
|
||||
teleporter.owner = entityplayer.getName();
|
||||
}
|
||||
|
||||
if(teleporter.owner.equals(entityplayer.getCommandSenderName()) || MekanismUtils.isOp((EntityPlayerMP)entityplayer))
|
||||
if(teleporter.owner.equals(entityplayer.getName()) || MekanismUtils.isOp((EntityPlayerMP)entityplayer))
|
||||
{
|
||||
entityplayer.openGui(Mekanism.instance, type.guiId, world, x, y, z);
|
||||
}
|
||||
@@ -835,7 +835,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
|
||||
if(!sorter.hasInventory())
|
||||
{
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing dir : EnumFacing.VALUES)
|
||||
{
|
||||
TileEntity tile = Coord4D.get(tileEntity).offset(dir).getTileEntity(world);
|
||||
|
||||
@@ -1004,7 +1004,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side)
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, EnumFacing side)
|
||||
{
|
||||
MachineType type = MachineType.get(blockType, world.getBlockMetadata(x, y, z));
|
||||
|
||||
@@ -1014,7 +1014,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
case ELECTRIC_CHEST:
|
||||
return false;
|
||||
case PORTABLE_TANK:
|
||||
return side == ForgeDirection.UP || side == ForgeDirection.DOWN;
|
||||
return side == EnumFacing.UP || side == EnumFacing.DOWN;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
@@ -1292,16 +1292,16 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection[] getValidRotations(World world, int x, int y, int z)
|
||||
public EnumFacing[] getValidRotations(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
ForgeDirection[] valid = new ForgeDirection[6];
|
||||
EnumFacing[] valid = new EnumFacing[6];
|
||||
|
||||
if(tile instanceof TileEntityBasicBlock)
|
||||
{
|
||||
TileEntityBasicBlock basicTile = (TileEntityBasicBlock)tile;
|
||||
|
||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing dir : EnumFacing.VALUES)
|
||||
{
|
||||
if(basicTile.canSetFacing(dir.ordinal()))
|
||||
{
|
||||
@@ -1314,7 +1314,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IBlo
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(World world, int x, int y, int z, ForgeDirection axis)
|
||||
public boolean rotateBlock(World world, int x, int y, int z, EnumFacing axis)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -115,7 +115,7 @@ public class BlockPlastic extends Block
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour)
|
||||
public boolean recolourBlock(World world, int x, int y, int z, EnumFacing side, int colour)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class BlockPlasticFence extends BlockFence
|
||||
|
||||
}
|
||||
|
||||
public boolean recolourBlock(World world, int x, int y, int z, ForgeDirection side, int colour)
|
||||
public boolean recolourBlock(World world, int x, int y, int z, EnumFacing side, int colour)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class BoilerManager extends MultiblockManager<SynchronizedBoilerData>
|
||||
|
||||
for(Coord4D obj : entry.getValue().locations)
|
||||
{
|
||||
if(obj.dimensionId == world.provider.dimensionId && obj.exists(world))
|
||||
if(obj.dimensionId == world.provider.getDimensionId() && obj.exists(world))
|
||||
{
|
||||
TileEntity tileEntity = obj.getTileEntity(world);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import mekanism.common.multiblock.SynchronizedData;
|
||||
import mekanism.common.util.FluidContainerUtils.ContainerEditMode;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class SynchronizedBoilerData extends SynchronizedData<SynchronizedBoilerD
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getInsulationCoefficient(ForgeDirection side)
|
||||
public double getInsulationCoefficient(EnumFacing side)
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
@@ -102,20 +102,20 @@ public class SynchronizedBoilerData extends SynchronizedData<SynchronizedBoilerD
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectHeat(ForgeDirection side)
|
||||
public boolean canConnectHeat(EnumFacing side)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IHeatTransfer getAdjacent(ForgeDirection side)
|
||||
public IHeatTransfer getAdjacent(EnumFacing side)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public static class ValveData
|
||||
{
|
||||
public ForgeDirection side;
|
||||
public EnumFacing side;
|
||||
public Coord4D location;
|
||||
public boolean serverFluid;
|
||||
|
||||
|
||||
@@ -60,27 +60,27 @@ public class ThreadMinerSearch extends Thread
|
||||
}
|
||||
|
||||
try {
|
||||
if(tileEntity.xCoord == x && tileEntity.yCoord == y && tileEntity.zCoord == z)
|
||||
if(tileEntity.getPos().getX() == x && tileEntity.getPos().getY() == y && tileEntity.getPos().getZ() == z)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!tileEntity.getWorldObj().getChunkProvider().chunkExists(x >> 4, z >> 4))
|
||||
if(!tileEntity.getWorld().getChunkProvider().chunkExists(x >> 4, z >> 4))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
TileEntity tile = tileEntity.getWorldObj().getTileEntity(x, y, z);
|
||||
TileEntity tile = tileEntity.getWorld().getTileEntity(x, y, z);
|
||||
|
||||
if(tile instanceof TileEntityBoundingBlock)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
info.block = tileEntity.getWorldObj().getBlock(x, y, z);
|
||||
info.meta = tileEntity.getWorldObj().getBlockMetadata(x, y, z);
|
||||
info.block = tileEntity.getWorld().getBlock(x, y, z);
|
||||
info.meta = tileEntity.getWorld().getBlockMetadata(x, y, z);
|
||||
|
||||
if(info.block != null && !tileEntity.getWorldObj().isAirBlock(x, y, z) && info.block.getBlockHardness(tileEntity.getWorldObj(), x, y, z) >= 0)
|
||||
if(info.block != null && !tileEntity.getWorld().isAirBlock(x, y, z) && info.block.getBlockHardness(tileEntity.getWorld(), x, y, z) >= 0)
|
||||
{
|
||||
MinerFilter filterFound = null;
|
||||
boolean canFilter = false;
|
||||
@@ -113,7 +113,7 @@ public class ThreadMinerSearch extends Thread
|
||||
|
||||
if(canFilter)
|
||||
{
|
||||
set(i, new Coord4D(x, y, z, tileEntity.getWorldObj().provider.dimensionId));
|
||||
set(i, new Coord4D(x, y, z, tileEntity.getWorld().provider.getDimensionId()));
|
||||
replaceMap.put(i, filterFound);
|
||||
|
||||
found++;
|
||||
|
||||
@@ -8,7 +8,7 @@ import mekanism.common.multiblock.SynchronizedData;
|
||||
import mekanism.common.util.FluidContainerUtils.ContainerEditMode;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import mekanism.api.gas.GasTank;
|
||||
import mekanism.api.gas.IGasHandler;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
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.FluidTank;
|
||||
@@ -35,13 +35,13 @@ public class SharedInventory implements IStrictEnergyStorage, IFluidHandler, IGa
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill)
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
return storedFluid.fill(resource, doFill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain)
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
if(resource.isFluidEqual(storedFluid.getFluid()))
|
||||
{
|
||||
@@ -52,61 +52,61 @@ public class SharedInventory implements IStrictEnergyStorage, IFluidHandler, IGa
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain)
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
return storedFluid.drain(maxDrain, doDrain);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canFill(ForgeDirection from, Fluid fluid)
|
||||
public boolean canFill(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
return storedFluid.getFluid() == null || fluid == storedFluid.getFluid().getFluid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrain(ForgeDirection from, Fluid fluid)
|
||||
public boolean canDrain(EnumFacing from, Fluid fluid)
|
||||
{
|
||||
return storedFluid.getFluid() == null || fluid == storedFluid.getFluid().getFluid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidTankInfo[] getTankInfo(ForgeDirection from)
|
||||
public FluidTankInfo[] getTankInfo(EnumFacing from)
|
||||
{
|
||||
return new FluidTankInfo[]{new FluidTankInfo(storedFluid)};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
return storedGas.receive(stack, doTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
public int receiveGas(EnumFacing side, GasStack stack)
|
||||
{
|
||||
return receiveGas(side, stack, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
|
||||
public GasStack drawGas(EnumFacing side, int amount, boolean doTransfer)
|
||||
{
|
||||
return storedGas.draw(amount, doTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
public GasStack drawGas(EnumFacing side, int amount)
|
||||
{
|
||||
return drawGas(side, amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return storedGas.getGasType() == null || type == storedGas.getGasType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
public boolean canDrawGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return storedGas.getGasType() == null || type == storedGas.getGasType();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class PathfinderCache
|
||||
{
|
||||
@@ -18,11 +18,11 @@ public class PathfinderCache
|
||||
reset();
|
||||
}
|
||||
|
||||
public static List<Coord4D> getCache(Coord4D start, Coord4D end, EnumSet<ForgeDirection> sides)
|
||||
public static List<Coord4D> getCache(Coord4D start, Coord4D end, EnumSet<EnumFacing> sides)
|
||||
{
|
||||
List<Coord4D> ret = null;
|
||||
|
||||
for(ForgeDirection side : sides)
|
||||
for(EnumFacing side : sides)
|
||||
{
|
||||
PathData data = new PathData(start, end, side);
|
||||
|
||||
@@ -47,9 +47,9 @@ public class PathfinderCache
|
||||
public Coord4D startTransporter;
|
||||
|
||||
public Coord4D end;
|
||||
public ForgeDirection endSide;
|
||||
public EnumFacing endSide;
|
||||
|
||||
public PathData(Coord4D s, Coord4D e, ForgeDirection es)
|
||||
public PathData(Coord4D s, Coord4D e, EnumFacing es)
|
||||
{
|
||||
startTransporter = s;
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@ import mekanism.common.util.InventoryUtils;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class StackSearcher
|
||||
{
|
||||
public int i;
|
||||
public int[] slots;
|
||||
public IInventory theInventory;
|
||||
public ForgeDirection side;
|
||||
public EnumFacing side;
|
||||
|
||||
public StackSearcher(IInventory inventory, ForgeDirection direction)
|
||||
public StackSearcher(IInventory inventory, EnumFacing direction)
|
||||
{
|
||||
theInventory = InventoryUtils.checkChestInv(inventory);
|
||||
side = direction;
|
||||
@@ -25,7 +25,7 @@ public class StackSearcher
|
||||
}
|
||||
else
|
||||
{
|
||||
slots = ((ISidedInventory)theInventory).getAccessibleSlotsFromSide(side.getOpposite().ordinal());
|
||||
slots = ((ISidedInventory)theInventory).getSlotsForFace(side.getOpposite().ordinal());
|
||||
if(slots != null)
|
||||
{
|
||||
i = slots.length;
|
||||
@@ -101,7 +101,7 @@ public class StackSearcher
|
||||
}
|
||||
else {
|
||||
ISidedInventory sidedInventory = (ISidedInventory)theInventory;
|
||||
int[] slots = sidedInventory.getAccessibleSlotsFromSide(side.getOpposite().ordinal());
|
||||
int[] slots = sidedInventory.getSlotsForFace(side.getOpposite().ordinal());
|
||||
|
||||
if(slots != null && slots.length != 0)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import mekanism.common.util.InventoryUtils;
|
||||
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 io.netty.buffer.ByteBuf;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import mekanism.common.util.InventoryUtils;
|
||||
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 io.netty.buffer.ByteBuf;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import mekanism.common.util.TransporterUtils;
|
||||
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;
|
||||
|
||||
public abstract class TransporterFilter
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
|
||||
@@ -90,7 +90,7 @@ public class TransporterManager
|
||||
}
|
||||
else {
|
||||
ISidedInventory sidedInventory = (ISidedInventory)inv;
|
||||
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
||||
int[] slots = sidedInventory.getSlotsForFace(EnumFacing.getFront(side).getOpposite().ordinal());
|
||||
|
||||
if(slots == null || slots.length == 0)
|
||||
{
|
||||
@@ -124,7 +124,7 @@ public class TransporterManager
|
||||
{
|
||||
ISideConfiguration config = (ISideConfiguration)inv;
|
||||
int tileSide = config.getOrientation();
|
||||
EnumColor configColor = config.getEjector().getInputColor(ForgeDirection.getOrientation(MekanismUtils.getBaseOrientation(side, tileSide)).getOpposite());
|
||||
EnumColor configColor = config.getEjector().getInputColor(EnumFacing.getFront(MekanismUtils.getBaseOrientation(side, tileSide)).getOpposite());
|
||||
|
||||
if(config.getEjector().hasStrictInput() && configColor != null && configColor != stack.color)
|
||||
{
|
||||
@@ -184,20 +184,20 @@ public class TransporterManager
|
||||
}
|
||||
else {
|
||||
ISidedInventory sidedInventory = (ISidedInventory)inv;
|
||||
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
||||
int[] slots = sidedInventory.getSlotsForFace(EnumFacing.getFront(side).getOpposite().ordinal());
|
||||
|
||||
if(slots != null && slots.length != 0)
|
||||
{
|
||||
if(stack.pathType != Path.HOME && sidedInventory instanceof TileEntityBin && ForgeDirection.getOrientation(side).getOpposite().ordinal() == 0)
|
||||
if(stack.pathType != Path.HOME && sidedInventory instanceof TileEntityBin && EnumFacing.getFront(side).getOpposite().ordinal() == 0)
|
||||
{
|
||||
slots = sidedInventory.getAccessibleSlotsFromSide(1);
|
||||
slots = sidedInventory.getSlotsForFace(1);
|
||||
}
|
||||
|
||||
if(inv instanceof TileEntityBin)
|
||||
{
|
||||
int slot = slots[0];
|
||||
|
||||
if(!sidedInventory.isItemValidForSlot(slot, toInsert) || !sidedInventory.canInsertItem(slot, toInsert, ForgeDirection.getOrientation(side).getOpposite().ordinal()))
|
||||
if(!sidedInventory.isItemValidForSlot(slot, toInsert) || !sidedInventory.canInsertItem(slot, toInsert, EnumFacing.getFront(side).getOpposite().ordinal()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -214,7 +214,7 @@ public class TransporterManager
|
||||
|
||||
if(stack.pathType != Path.HOME)
|
||||
{
|
||||
if(!sidedInventory.isItemValidForSlot(slotID, toInsert) || !sidedInventory.canInsertItem(slotID, toInsert, ForgeDirection.getOrientation(side).getOpposite().ordinal()))
|
||||
if(!sidedInventory.isItemValidForSlot(slotID, toInsert) || !sidedInventory.canInsertItem(slotID, toInsert, EnumFacing.getFront(side).getOpposite().ordinal()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ public class TransporterManager
|
||||
{
|
||||
ISideConfiguration config = (ISideConfiguration)tileEntity;
|
||||
int tileSide = config.getOrientation();
|
||||
EnumColor configColor = config.getEjector().getInputColor(ForgeDirection.getOrientation(MekanismUtils.getBaseOrientation(side, tileSide)).getOpposite());
|
||||
EnumColor configColor = config.getEjector().getInputColor(EnumFacing.getFront(MekanismUtils.getBaseOrientation(side, tileSide)).getOpposite());
|
||||
|
||||
if(config.getEjector().hasStrictInput() && configColor != null && configColor != color)
|
||||
{
|
||||
@@ -347,7 +347,7 @@ public class TransporterManager
|
||||
}
|
||||
else {
|
||||
ISidedInventory sidedInventory = (ISidedInventory)inventory;
|
||||
int[] slots = sidedInventory.getAccessibleSlotsFromSide(ForgeDirection.getOrientation(side).getOpposite().ordinal());
|
||||
int[] slots = sidedInventory.getSlotsForFace(EnumFacing.getFront(side).getOpposite().ordinal());
|
||||
|
||||
if(slots != null && slots.length != 0)
|
||||
{
|
||||
@@ -355,7 +355,7 @@ public class TransporterManager
|
||||
{
|
||||
int slot = slots[0];
|
||||
|
||||
if(!sidedInventory.isItemValidForSlot(slot, toInsert) || !sidedInventory.canInsertItem(slot, toInsert, ForgeDirection.getOrientation(side).getOpposite().ordinal()))
|
||||
if(!sidedInventory.isItemValidForSlot(slot, toInsert) || !sidedInventory.canInsertItem(slot, toInsert, EnumFacing.getFront(side).getOpposite().ordinal()))
|
||||
{
|
||||
return toInsert;
|
||||
}
|
||||
@@ -375,7 +375,7 @@ public class TransporterManager
|
||||
{
|
||||
int slotID = slots[get];
|
||||
|
||||
if(!sidedInventory.isItemValidForSlot(slotID, toInsert) || !sidedInventory.canInsertItem(slotID, toInsert, ForgeDirection.getOrientation(side).getOpposite().ordinal()))
|
||||
if(!sidedInventory.isItemValidForSlot(slotID, toInsert) || !sidedInventory.canInsertItem(slotID, toInsert, EnumFacing.getFront(side).getOpposite().ordinal()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import mekanism.common.util.InventoryUtils;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
@@ -48,9 +48,9 @@ public final class TransporterPathfinder
|
||||
ArrayList<Coord4D> ret = new ArrayList<Coord4D>();
|
||||
ret.add(start);
|
||||
|
||||
if(transportStack.idleDir == ForgeDirection.UNKNOWN)
|
||||
if(transportStack.idleDir == EnumFacing.null)
|
||||
{
|
||||
ForgeDirection newSide = findSide();
|
||||
EnumFacing newSide = findSide();
|
||||
|
||||
if(newSide == null)
|
||||
{
|
||||
@@ -76,13 +76,13 @@ public final class TransporterPathfinder
|
||||
|
||||
if(newPath != null && TransporterManager.didEmit(transportStack.itemStack, newPath.rejected))
|
||||
{
|
||||
transportStack.idleDir = ForgeDirection.UNKNOWN;
|
||||
transportStack.idleDir = EnumFacing.null;
|
||||
newPath.setPathType(Path.DEST);
|
||||
|
||||
return newPath;
|
||||
}
|
||||
else {
|
||||
ForgeDirection newSide = findSide();
|
||||
EnumFacing newSide = findSide();
|
||||
|
||||
if(newSide == null)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ public final class TransporterPathfinder
|
||||
}
|
||||
}
|
||||
|
||||
private void loopSide(List<Coord4D> list, ForgeDirection side)
|
||||
private void loopSide(List<Coord4D> list, EnumFacing side)
|
||||
{
|
||||
int count = 1;
|
||||
|
||||
@@ -117,11 +117,11 @@ public final class TransporterPathfinder
|
||||
}
|
||||
}
|
||||
|
||||
private ForgeDirection findSide()
|
||||
private EnumFacing findSide()
|
||||
{
|
||||
if(transportStack.idleDir == ForgeDirection.UNKNOWN)
|
||||
if(transportStack.idleDir == EnumFacing.null)
|
||||
{
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
TileEntity tile = start.offset(side).getTileEntity(worldObj);
|
||||
|
||||
@@ -132,7 +132,7 @@ public final class TransporterPathfinder
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(ForgeDirection side : EnumSet.complementOf(EnumSet.of(ForgeDirection.UNKNOWN, transportStack.idleDir.getOpposite())))
|
||||
for(EnumFacing side : EnumSet.complementOf(EnumSet.of(EnumFacing.null, transportStack.idleDir.getOpposite())))
|
||||
{
|
||||
TileEntity tile = start.offset(side).getTileEntity(worldObj);
|
||||
|
||||
@@ -286,7 +286,7 @@ public final class TransporterPathfinder
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Destination getPath(DestChecker checker, EnumSet<ForgeDirection> sides, ILogisticalTransporter start, Coord4D dest, TransporterStack stack, ItemStack rejects, int min)
|
||||
public static Destination getPath(DestChecker checker, EnumSet<EnumFacing> sides, ILogisticalTransporter start, Coord4D dest, TransporterStack stack, ItemStack rejects, int min)
|
||||
{
|
||||
List<Coord4D> test = PathfinderCache.getCache(start.coord(), dest, sides);
|
||||
|
||||
@@ -390,7 +390,7 @@ public final class TransporterPathfinder
|
||||
|
||||
public double finalScore;
|
||||
|
||||
public ForgeDirection side;
|
||||
public EnumFacing side;
|
||||
|
||||
public ArrayList<Coord4D> results;
|
||||
|
||||
@@ -429,7 +429,7 @@ public final class TransporterPathfinder
|
||||
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
ForgeDirection direction = ForgeDirection.getOrientation(i);
|
||||
EnumFacing direction = EnumFacing.getFront(i);
|
||||
Coord4D neighbor = start.offset(direction);
|
||||
|
||||
if(!transportStack.canInsertToTransporter(neighbor.getTileEntity(worldObj), direction) && (!neighbor.equals(finalNode) || !destChecker.isValid(transportStack, i, neighbor.getTileEntity(worldObj))))
|
||||
@@ -467,7 +467,7 @@ public final class TransporterPathfinder
|
||||
openSet.remove(currentNode);
|
||||
closedSet.add(currentNode);
|
||||
|
||||
for(ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing direction : EnumFacing.VALUES)
|
||||
{
|
||||
Coord4D neighbor = currentNode.offset(direction);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import mekanism.common.util.TransporterUtils;
|
||||
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 org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TransporterStack
|
||||
|
||||
public boolean initiatedPath = false;
|
||||
|
||||
public ForgeDirection idleDir = ForgeDirection.UNKNOWN;
|
||||
public EnumFacing idleDir = EnumFacing.null;
|
||||
|
||||
private List<Coord4D> pathToTarget = new ArrayList<Coord4D>();
|
||||
|
||||
@@ -125,7 +125,7 @@ public class TransporterStack
|
||||
|
||||
progress = nbtTags.getInteger("progress");
|
||||
originalLocation = Coord4D.read(nbtTags.getCompoundTag("originalLocation"));
|
||||
idleDir = ForgeDirection.values()[nbtTags.getInteger("idleDir")];
|
||||
idleDir = EnumFacing.values()[nbtTags.getInteger("idleDir")];
|
||||
|
||||
if(nbtTags.hasKey("homeLocation"))
|
||||
{
|
||||
@@ -188,7 +188,7 @@ public class TransporterStack
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
idleDir = ForgeDirection.UNKNOWN;
|
||||
idleDir = EnumFacing.null;
|
||||
setPath(newPath.path, Path.DEST);
|
||||
initiatedPath = true;
|
||||
|
||||
@@ -204,7 +204,7 @@ public class TransporterStack
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
idleDir = ForgeDirection.UNKNOWN;
|
||||
idleDir = EnumFacing.null;
|
||||
setPath(newPath.path, Path.DEST);
|
||||
initiatedPath = true;
|
||||
|
||||
@@ -222,7 +222,7 @@ public class TransporterStack
|
||||
|
||||
if(newPath.getRight() == Path.HOME)
|
||||
{
|
||||
idleDir = ForgeDirection.UNKNOWN;
|
||||
idleDir = EnumFacing.null;
|
||||
}
|
||||
|
||||
setPath(newPath.getLeft(), newPath.getRight());
|
||||
@@ -302,7 +302,7 @@ public class TransporterStack
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean canInsertToTransporter(TileEntity tileEntity, ForgeDirection from)
|
||||
public boolean canInsertToTransporter(TileEntity tileEntity, EnumFacing from)
|
||||
{
|
||||
if(!(tileEntity instanceof ITransporterTile))
|
||||
{
|
||||
@@ -319,7 +319,7 @@ public class TransporterStack
|
||||
return transporter.getColor() == color || transporter.getColor() == null;
|
||||
}
|
||||
|
||||
public boolean canInsertToTransporter(ILogisticalTransporter transporter, ForgeDirection side)
|
||||
public boolean canInsertToTransporter(ILogisticalTransporter transporter, EnumFacing side)
|
||||
{
|
||||
if(!transporter.canConnectMutual(side))
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ public class EntityBalloon extends Entity implements IEntityAdditionalSpawnData
|
||||
{
|
||||
if(dataWatcher.getWatchableObjectByte(2) == 1)
|
||||
{
|
||||
latched = new Coord4D(dataWatcher.getWatchableObjectInt(3), dataWatcher.getWatchableObjectInt(4), dataWatcher.getWatchableObjectInt(5), worldObj.provider.dimensionId);
|
||||
latched = new Coord4D(dataWatcher.getWatchableObjectInt(3), dataWatcher.getWatchableObjectInt(4), dataWatcher.getWatchableObjectInt(5), worldObj.provider.getDimensionId());
|
||||
}
|
||||
else {
|
||||
latched = null;
|
||||
|
||||
@@ -18,7 +18,7 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -180,7 +180,7 @@ public class EntityFlame extends Entity implements IEntityAdditionalSpawnData
|
||||
int meta = worldObj.getBlockMetadata(mop.blockX, mop.blockY, mop.blockZ);
|
||||
boolean fluid = MekanismUtils.isFluid(worldObj, new Coord4D(mop)) || MekanismUtils.isDeadFluid(worldObj, new Coord4D(mop));
|
||||
|
||||
Coord4D sideCoord = new Coord4D(mop.blockX, mop.blockY, mop.blockZ, worldObj.provider.dimensionId).offset(ForgeDirection.getOrientation(mop.sideHit));
|
||||
Coord4D sideCoord = new Coord4D(mop.blockX, mop.blockY, mop.blockZ, worldObj.provider.getDimensionId()).offset(EnumFacing.getFront(mop.sideHit));
|
||||
|
||||
if(general.aestheticWorldDamage && !fluid && (sideCoord.isAirBlock(worldObj) || sideCoord.isReplaceable(worldObj)))
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.pathfinding.PathNavigateGround;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.util.DamageSource;
|
||||
@@ -88,6 +89,12 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
prevPosZ = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PathNavigateGround getNavigator()
|
||||
{
|
||||
return (PathNavigateGround)navigator;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyEntityAttributes()
|
||||
{
|
||||
@@ -304,7 +311,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
{
|
||||
setFollowing(false);
|
||||
|
||||
if(worldObj.provider.dimensionId != homeLocation.dimensionId)
|
||||
if(worldObj.provider.getDimensionId() != homeLocation.dimensionId)
|
||||
{
|
||||
travelToDimension(homeLocation.dimensionId);
|
||||
}
|
||||
@@ -404,7 +411,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
ItemRobit item = (ItemRobit)entityItem.getEntityItem().getItem();
|
||||
item.setEnergy(entityItem.getEntityItem(), getEnergy());
|
||||
item.setInventory(getInventory(), entityItem.getEntityItem());
|
||||
item.setName(entityItem.getEntityItem(), getCommandSenderName());
|
||||
item.setName(entityItem.getEntityItem(), getName());
|
||||
|
||||
float k = 0.05F;
|
||||
entityItem.motionX = 0;
|
||||
@@ -723,7 +730,7 @@ public class EntityRobit extends EntityCreature implements IInventory, ISustaine
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCommandSenderName()
|
||||
public String getName()
|
||||
{
|
||||
return getName().isEmpty() ? "Robit" : getName();
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@ public class FrequencyManager
|
||||
{
|
||||
Coord4D coord = iter.next();
|
||||
|
||||
if(coord.dimensionId == world.provider.dimensionId)
|
||||
if(coord.dimensionId == world.provider.getDimensionId())
|
||||
{
|
||||
if(!coord.exists(world))
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ public class WailaDataProvider implements IWailaDataProvider
|
||||
else if(tile instanceof TileEntityBoundingBlock)
|
||||
{
|
||||
TileEntityBoundingBlock bound = (TileEntityBoundingBlock)tile;
|
||||
Coord4D coord = new Coord4D(bound.mainX, bound.mainY, bound.mainZ, tile.getWorldObj().provider.dimensionId);
|
||||
Coord4D coord = new Coord4D(bound.mainX, bound.mainY, bound.mainZ, tile.getWorldObj().provider.getDimensionId());
|
||||
|
||||
if(bound.receivedCoords && coord.getTileEntity(tile.getWorldObj()) instanceof IInventory)
|
||||
{
|
||||
|
||||
@@ -52,9 +52,9 @@ public class ContainerRobitSmelting extends Container
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting icrafting)
|
||||
public void onCraftGuiOpened(ICrafting icrafting)
|
||||
{
|
||||
super.addCraftingToCrafters(icrafting);
|
||||
super.onCraftGuiOpened(icrafting);
|
||||
icrafting.sendProgressBarUpdate(this, 0, robit.furnaceCookTime);
|
||||
icrafting.sendProgressBarUpdate(this, 1, robit.furnaceBurnTime);
|
||||
icrafting.sendProgressBarUpdate(this, 2, robit.currentItemBurnTime);
|
||||
|
||||
@@ -23,7 +23,7 @@ import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.event.entity.player.UseHoeEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.Result;
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
}
|
||||
|
||||
ItemStack stack = new ItemStack(block, 1, meta);
|
||||
Coord4D orig = new Coord4D(x, y, z, player.worldObj.provider.dimensionId);
|
||||
Coord4D orig = new Coord4D(x, y, z, player.worldObj.provider.getDimensionId());
|
||||
|
||||
List<String> names = MekanismUtils.getOreDictName(stack);
|
||||
|
||||
@@ -121,7 +121,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
|
||||
if(getMode(itemstack) == 3 && isOre && !player.capabilities.isCreativeMode)
|
||||
{
|
||||
Set<Coord4D> found = new Finder(player.worldObj, stack, new Coord4D(x, y, z, player.worldObj.provider.dimensionId)).calc();
|
||||
Set<Coord4D> found = new Finder(player.worldObj, stack, new Coord4D(x, y, z, player.worldObj.provider.getDimensionId())).calc();
|
||||
|
||||
for(Coord4D coord : found)
|
||||
{
|
||||
@@ -350,7 +350,7 @@ public class ItemAtomicDisassembler extends ItemEnergized
|
||||
|
||||
found.add(pointer);
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
Coord4D coord = pointer.offset(side);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -105,14 +105,14 @@ public class ItemBalloon extends ItemMekanism
|
||||
return true;
|
||||
}
|
||||
|
||||
Coord4D obj = new Coord4D(x, y, z, world.provider.dimensionId);
|
||||
Coord4D obj = new Coord4D(x, y, z, world.provider.getDimensionId());
|
||||
|
||||
if(obj.getBlock(world).isReplaceable(world, x, y, z))
|
||||
{
|
||||
obj.yCoord--;
|
||||
}
|
||||
|
||||
if(!world.isSideSolid(x, y, z, ForgeDirection.UP))
|
||||
if(!world.isSideSolid(x, y, z, EnumFacing.UP))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -178,8 +178,8 @@ public class ItemBalloon extends ItemMekanism
|
||||
@Override
|
||||
public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
|
||||
{
|
||||
Coord4D coord = new Coord4D(source.getXInt(), source.getYInt(), source.getZInt(), source.getWorld().provider.dimensionId);
|
||||
ForgeDirection side = ForgeDirection.getOrientation(BlockDispenser.func_149937_b(source.getBlockMetadata()).ordinal());
|
||||
Coord4D coord = new Coord4D(source.getXInt(), source.getYInt(), source.getZInt(), source.getWorld().provider.getDimensionId());
|
||||
EnumFacing side = EnumFacing.getFront(BlockDispenser.func_149937_b(source.getBlockMetadata()).ordinal());
|
||||
|
||||
List<EntityLivingBase> entities = source.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, coord.offset(side).getBoundingBox());
|
||||
boolean latched = false;
|
||||
|
||||
@@ -47,7 +47,7 @@ import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants.NBT;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -524,7 +524,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
else {
|
||||
if(pos.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
Coord4D coord = new Coord4D(pos.blockX, pos.blockY, pos.blockZ, world.provider.dimensionId);
|
||||
Coord4D coord = new Coord4D(pos.blockX, pos.blockY, pos.blockZ, world.provider.getDimensionId());
|
||||
|
||||
if(!world.canMineBlock(entityplayer, coord.xCoord, coord.yCoord, coord.zCoord))
|
||||
{
|
||||
@@ -570,7 +570,7 @@ public class ItemBlockMachine extends ItemBlock implements IEnergizedItem, ISpec
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
Coord4D trans = coord.offset(ForgeDirection.getOrientation(pos.sideHit));
|
||||
Coord4D trans = coord.offset(EnumFacing.getFront(pos.sideHit));
|
||||
|
||||
if(!entityplayer.canPlayerEdit(trans.xCoord, trans.yCoord, trans.zCoord, pos.sideHit, itemstack))
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import cofh.api.item.IToolHammer;
|
||||
import net.minecraftforge.fml.common.Optional.Interface;
|
||||
@@ -173,8 +173,8 @@ public class ItemConfigurator extends ItemEnergized implements IMekWrench, ITool
|
||||
}
|
||||
else if(getState(stack) == ConfiguratorMode.ROTATE) //Rotate
|
||||
{
|
||||
ForgeDirection axis = ForgeDirection.getOrientation(side);
|
||||
List<ForgeDirection> l = Arrays.asList(block.getValidRotations(world, x, y, z));
|
||||
EnumFacing axis = EnumFacing.getFront(side);
|
||||
List<EnumFacing> l = Arrays.asList(block.getValidRotations(world, x, y, z));
|
||||
|
||||
if(!player.isSneaking() && l.contains(axis))
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class ItemNetworkReader extends ItemEnergized
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public class ItemNetworkReader extends ItemEnergized
|
||||
|
||||
Set<DynamicNetwork> iteratedNetworks = new HashSet<>();
|
||||
|
||||
for(ForgeDirection iterSide : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing iterSide : EnumFacing.VALUES)
|
||||
{
|
||||
Coord4D coord = Coord4D.get(tileEntity).offset(iterSide);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ItemPortableTeleporter extends ItemEnergized
|
||||
|
||||
int neededEnergy = 1000;
|
||||
|
||||
if(entity.worldObj.provider.dimensionId != coords.dimensionId)
|
||||
if(entity.worldObj.provider.getDimensionId() != coords.dimensionId)
|
||||
{
|
||||
neededEnergy+=10000;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class ItemRobit extends ItemEnergized implements ISustainedInventory
|
||||
|
||||
robit.setHome(Coord4D.get(chargepad));
|
||||
robit.setEnergy(getEnergy(itemstack));
|
||||
robit.setOwner(entityplayer.getCommandSenderName());
|
||||
robit.setOwner(entityplayer.getName());
|
||||
robit.setInventory(getInventory(itemstack));
|
||||
robit.setName(getName(itemstack));
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ public class MultiblockManager<T extends SynchronizedData<T>>
|
||||
|
||||
for(Coord4D obj : entry.getValue().locations)
|
||||
{
|
||||
if(obj.dimensionId == world.provider.dimensionId && obj.exists(world))
|
||||
if(obj.dimensionId == world.provider.getDimensionId() && obj.exists(world))
|
||||
{
|
||||
TileEntity tileEntity = obj.getTileEntity(world);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import mekanism.common.tile.TileEntityMultiblock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public abstract class UpdateProtocol<T extends SynchronizedData<T>>
|
||||
{
|
||||
@@ -157,7 +157,7 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
|
||||
break;
|
||||
}
|
||||
else {
|
||||
innerNodes.add(new Coord4D(origX+x, origY+y, origZ+z, pointer.getWorldObj().provider.dimensionId));
|
||||
innerNodes.add(new Coord4D(origX+x, origY+y, origZ+z, pointer.getWorldObj().provider.getDimensionId()));
|
||||
}
|
||||
|
||||
volume++;
|
||||
@@ -212,7 +212,7 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
|
||||
innerNodes.clear();
|
||||
iteratedNodes.add(tile);
|
||||
|
||||
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
TileEntity tileEntity = Coord4D.get(tile).offset(side).getTileEntity(tile.getWorldObj());
|
||||
|
||||
@@ -231,34 +231,34 @@ public abstract class UpdateProtocol<T extends SynchronizedData<T>>
|
||||
return true;
|
||||
}
|
||||
|
||||
public ForgeDirection getSide(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
|
||||
public EnumFacing getSide(Coord4D obj, int xmin, int xmax, int ymin, int ymax, int zmin, int zmax)
|
||||
{
|
||||
if(obj.xCoord == xmin)
|
||||
{
|
||||
return ForgeDirection.WEST;
|
||||
return EnumFacing.WEST;
|
||||
}
|
||||
else if(obj.xCoord == xmax)
|
||||
{
|
||||
return ForgeDirection.EAST;
|
||||
return EnumFacing.EAST;
|
||||
}
|
||||
else if(obj.yCoord == ymin)
|
||||
{
|
||||
return ForgeDirection.DOWN;
|
||||
return EnumFacing.DOWN;
|
||||
}
|
||||
else if(obj.yCoord == ymax)
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
return EnumFacing.UP;
|
||||
}
|
||||
else if(obj.zCoord == zmin)
|
||||
{
|
||||
return ForgeDirection.NORTH;
|
||||
return EnumFacing.NORTH;
|
||||
}
|
||||
else if(obj.zCoord == zmax)
|
||||
{
|
||||
return ForgeDirection.SOUTH;
|
||||
return EnumFacing.SOUTH;
|
||||
}
|
||||
|
||||
return ForgeDirection.UNKNOWN;
|
||||
return EnumFacing.null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -168,7 +168,7 @@ public class PacketConfigSync implements IMessageHandler<ConfigSyncMessage, IMes
|
||||
usage.gasCentrifugeUsage = dataStream.readDouble();
|
||||
usage.heavyWaterElectrolysisUsage = dataStream.readDouble();
|
||||
|
||||
Tier.readConfig(dataStream);
|
||||
//TODO: Tier.readConfig(dataStream);
|
||||
|
||||
try {
|
||||
for(IModule module : Mekanism.modulesLoaded)
|
||||
|
||||
@@ -19,7 +19,7 @@ import mekanism.common.util.TransporterUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -74,7 +74,7 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
|
||||
}
|
||||
else if(message.packetType == ConfigurationPacket.INPUT_COLOR)
|
||||
{
|
||||
ForgeDirection side = ForgeDirection.getOrientation(message.inputSide);
|
||||
EnumFacing side = EnumFacing.getFront(message.inputSide);
|
||||
|
||||
if(message.clickType == 0)
|
||||
{
|
||||
@@ -153,12 +153,8 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(packetType.ordinal());
|
||||
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
|
||||
coord4D.write(dataStream);
|
||||
|
||||
if(packetType != ConfigurationPacket.EJECT && packetType != ConfigurationPacket.STRICT_INPUT)
|
||||
{
|
||||
@@ -187,7 +183,7 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
|
||||
{
|
||||
packetType = ConfigurationPacket.values()[dataStream.readInt()];
|
||||
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
if(packetType == ConfigurationPacket.EJECT)
|
||||
{
|
||||
|
||||
@@ -46,10 +46,7 @@ public class PacketContainerEditMode implements IMessageHandler<ContainerEditMod
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(value.ordinal());
|
||||
}
|
||||
|
||||
@@ -71,17 +71,13 @@ public class PacketDataRequest implements IMessageHandler<DataRequestMessage, IM
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
@@ -56,11 +57,11 @@ public class PacketDigitalMinerGui implements IMessageHandler<DigitalMinerGuiMes
|
||||
try {
|
||||
if(message.packetType == MinerGuiPacket.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().showGuiScreen(DigitalMinerGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D.xCoord, message.coord4D.yCoord, message.coord4D.zCoord, -1));
|
||||
FMLCommonHandler.instance().showGuiScreen(DigitalMinerGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D, -1));
|
||||
}
|
||||
else if(message.packetType == MinerGuiPacket.CLIENT_INDEX)
|
||||
{
|
||||
FMLCommonHandler.instance().showGuiScreen(DigitalMinerGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D.xCoord, message.coord4D.yCoord, message.coord4D.zCoord, message.index));
|
||||
FMLCommonHandler.instance().showGuiScreen(DigitalMinerGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D, message.index));
|
||||
}
|
||||
|
||||
player.openContainer.windowId = message.windowId;
|
||||
@@ -114,22 +115,25 @@ public class PacketDigitalMinerGui implements IMessageHandler<DigitalMinerGuiMes
|
||||
Container container = null;
|
||||
|
||||
playerMP.closeContainer();
|
||||
|
||||
if(guiType == 0)
|
||||
|
||||
switch(guiType)
|
||||
{
|
||||
container = new ContainerNull(playerMP, (TileEntityContainerBlock)obj.getTileEntity(world));
|
||||
}
|
||||
else if(guiType == 4)
|
||||
{
|
||||
container = new ContainerDigitalMiner(playerMP.inventory, (TileEntityDigitalMiner)obj.getTileEntity(world));
|
||||
}
|
||||
else if(guiType == 5)
|
||||
{
|
||||
container = new ContainerNull(playerMP, (TileEntityContainerBlock)obj.getTileEntity(world));
|
||||
}
|
||||
else if(guiType == 1 || guiType == 2 || guiType == 3 || guiType == 6)
|
||||
{
|
||||
container = new ContainerFilter(playerMP.inventory, (TileEntityContainerBlock)obj.getTileEntity(world));
|
||||
case 0:
|
||||
container = new ContainerNull(playerMP, (TileEntityContainerBlock)obj.getTileEntity(world));
|
||||
break;
|
||||
case 4:
|
||||
container = new ContainerDigitalMiner(playerMP.inventory, (TileEntityDigitalMiner)obj.getTileEntity(world));
|
||||
break;
|
||||
case 5:
|
||||
container = new ContainerNull(playerMP, (TileEntityContainerBlock)obj.getTileEntity(world));
|
||||
break;
|
||||
// case 1:
|
||||
// case 2:
|
||||
// case 3:
|
||||
// case 6:
|
||||
default:
|
||||
container = new ContainerFilter(playerMP.inventory, (TileEntityContainerBlock)obj.getTileEntity(world));
|
||||
break;
|
||||
}
|
||||
|
||||
playerMP.getNextWindowId();
|
||||
@@ -146,7 +150,7 @@ public class PacketDigitalMinerGui implements IMessageHandler<DigitalMinerGuiMes
|
||||
|
||||
playerMP.openContainer = container;
|
||||
playerMP.openContainer.windowId = window;
|
||||
playerMP.openContainer.addCraftingToCrafters(playerMP);
|
||||
playerMP.openContainer.onCraftGuiOpened(playerMP);
|
||||
|
||||
if(guiType == 0)
|
||||
{
|
||||
@@ -160,57 +164,57 @@ public class PacketDigitalMinerGui implements IMessageHandler<DigitalMinerGuiMes
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static GuiScreen getGui(MinerGuiPacket packetType, int type, EntityPlayer player, World world, int x, int y, int z, int index)
|
||||
public static GuiScreen getGui(MinerGuiPacket packetType, int type, EntityPlayer player, World world, BlockPos pos, int index)
|
||||
{
|
||||
if(type == 0)
|
||||
{
|
||||
return new GuiDigitalMinerConfig(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z));
|
||||
return new GuiDigitalMinerConfig(player, (TileEntityDigitalMiner)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 4)
|
||||
{
|
||||
return new GuiDigitalMiner(player.inventory, (TileEntityDigitalMiner)world.getTileEntity(x, y, z));
|
||||
return new GuiDigitalMiner(player.inventory, (TileEntityDigitalMiner)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 5)
|
||||
{
|
||||
return new GuiMFilterSelect(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z));
|
||||
return new GuiMFilterSelect(player, (TileEntityDigitalMiner)world.getTileEntity(pos));
|
||||
}
|
||||
else {
|
||||
if(packetType == MinerGuiPacket.CLIENT)
|
||||
{
|
||||
if(type == 1)
|
||||
{
|
||||
return new GuiMItemStackFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z));
|
||||
return new GuiMItemStackFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 2)
|
||||
{
|
||||
return new GuiMOreDictFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z));
|
||||
return new GuiMOreDictFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 3)
|
||||
{
|
||||
return new GuiMMaterialFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z));
|
||||
return new GuiMMaterialFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 6)
|
||||
{
|
||||
return new GuiMModIDFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z));
|
||||
return new GuiMModIDFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos));
|
||||
}
|
||||
}
|
||||
else if(packetType == MinerGuiPacket.CLIENT_INDEX)
|
||||
{
|
||||
if(type == 1)
|
||||
{
|
||||
return new GuiMItemStackFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z), index);
|
||||
return new GuiMItemStackFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos), index);
|
||||
}
|
||||
else if(type == 2)
|
||||
{
|
||||
return new GuiMOreDictFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z), index);
|
||||
return new GuiMOreDictFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos), index);
|
||||
}
|
||||
else if(type == 3)
|
||||
{
|
||||
return new GuiMMaterialFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z), index);
|
||||
return new GuiMMaterialFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos), index);
|
||||
}
|
||||
else if(type == 6)
|
||||
{
|
||||
return new GuiMModIDFilter(player, (TileEntityDigitalMiner)world.getTileEntity(x, y, z), index);
|
||||
return new GuiMModIDFilter(player, (TileEntityDigitalMiner)world.getTileEntity(pos), index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -223,11 +227,7 @@ public class PacketDigitalMinerGui implements IMessageHandler<DigitalMinerGuiMes
|
||||
{
|
||||
dataStream.writeInt(packetType.ordinal());
|
||||
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(guiType);
|
||||
|
||||
@@ -247,7 +247,7 @@ public class PacketDigitalMinerGui implements IMessageHandler<DigitalMinerGuiMes
|
||||
{
|
||||
packetType = MinerGuiPacket.values()[dataStream.readInt()];
|
||||
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
guiType = dataStream.readInt();
|
||||
|
||||
|
||||
@@ -54,10 +54,7 @@ public class PacketDropperUse implements IMessageHandler<DropperUseMessage, IMes
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(mouseButton);
|
||||
dataStream.writeInt(tankId);
|
||||
@@ -66,7 +63,7 @@ public class PacketDropperUse implements IMessageHandler<DropperUseMessage, IMes
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
mouseButton = dataStream.readInt();
|
||||
tankId = dataStream.readInt();
|
||||
|
||||
@@ -168,11 +168,7 @@ public class PacketEditFilter implements IMessageHandler<EditFilterMessage, IMes
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeByte(type);
|
||||
|
||||
@@ -214,7 +210,7 @@ public class PacketEditFilter implements IMessageHandler<EditFilterMessage, IMes
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
type = dataStream.readByte();
|
||||
delete = dataStream.readBoolean();
|
||||
|
||||
@@ -14,6 +14,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -63,11 +64,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
else if(message.packetType == ElectricChestPacketType.CLIENT_OPEN)
|
||||
{
|
||||
try {
|
||||
int x = message.coord4D != null ? message.coord4D.xCoord : 0;
|
||||
int y = message.coord4D != null ? message.coord4D.yCoord : 0;
|
||||
int z = message.coord4D != null ? message.coord4D.zCoord : 0;
|
||||
|
||||
Mekanism.proxy.openElectricChest(player, message.guiType, message.windowId, message.isBlock, x, y, z);
|
||||
Mekanism.proxy.openElectricChest(player, message.guiType, message.windowId, message.isBlock, message.coord4D != null ? message.coord4D : BlockPos.ORIGIN);
|
||||
} catch(Exception e) {
|
||||
Mekanism.logger.error("Error while handling electric chest open packet.");
|
||||
e.printStackTrace();
|
||||
@@ -103,7 +100,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
{
|
||||
TileEntityElectricChest tileEntity = (TileEntityElectricChest)message.coord4D.getTileEntity(player.worldObj);
|
||||
tileEntity.locked = message.locked;
|
||||
player.worldObj.notifyBlocksOfNeighborChange(message.coord4D.xCoord, message.coord4D.yCoord, message.coord4D.zCoord, tileEntity.getBlockType());
|
||||
player.worldObj.notifyNeighborsOfStateChange(message.coord4D, tileEntity.getBlockType());
|
||||
}
|
||||
else {
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
@@ -205,10 +202,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -218,10 +212,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -232,10 +223,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -245,10 +233,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -267,7 +252,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
}
|
||||
}
|
||||
else if(packetType == ElectricChestPacketType.CLIENT_OPEN)
|
||||
@@ -278,7 +263,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
}
|
||||
}
|
||||
else if(packetType == ElectricChestPacketType.PASSWORD)
|
||||
@@ -288,7 +273,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
}
|
||||
}
|
||||
else if(packetType == ElectricChestPacketType.LOCK)
|
||||
@@ -298,7 +283,7 @@ public class PacketElectricChest implements IMessageHandler<ElectricChestMessage
|
||||
|
||||
if(isBlock)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PacketFlamethrowerData implements IMessageHandler<FlamethrowerDataM
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
{
|
||||
Mekanism.packetHandler.sendToDimension(new FlamethrowerDataMessage(FlamethrowerPacket.UPDATE, message.username, message.value), player.worldObj.provider.dimensionId);
|
||||
Mekanism.packetHandler.sendToDimension(new FlamethrowerDataMessage(FlamethrowerPacket.UPDATE, message.username, message.value), player.worldObj.provider.getDimensionId());
|
||||
}
|
||||
}
|
||||
else if(message.packetType == FlamethrowerPacket.MODE)
|
||||
|
||||
@@ -33,7 +33,7 @@ public class PacketJetpackData implements IMessageHandler<JetpackDataMessage, IM
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
{
|
||||
Mekanism.packetHandler.sendToDimension(new JetpackDataMessage(JetpackPacket.UPDATE, message.username, message.value), player.worldObj.provider.dimensionId);
|
||||
Mekanism.packetHandler.sendToDimension(new JetpackDataMessage(JetpackPacket.UPDATE, message.username, message.value), player.worldObj.provider.getDimensionId());
|
||||
}
|
||||
}
|
||||
else if(message.packetType == JetpackPacket.MODE)
|
||||
|
||||
@@ -19,6 +19,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
@@ -38,24 +39,24 @@ public class PacketLogisticalSorterGui implements IMessageHandler<LogisticalSort
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
{
|
||||
World worldServer = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(message.object3D.dimensionId);
|
||||
World worldServer = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(message.coord4D.dimensionId);
|
||||
|
||||
if(worldServer != null && message.object3D.getTileEntity(worldServer) instanceof TileEntityLogisticalSorter)
|
||||
if(worldServer != null && message.coord4D.getTileEntity(worldServer) instanceof TileEntityLogisticalSorter)
|
||||
{
|
||||
LogisticalSorterGuiMessage.openServerGui(message.packetType, message.guiType, worldServer, (EntityPlayerMP)player, message.object3D, message.index);
|
||||
LogisticalSorterGuiMessage.openServerGui(message.packetType, message.guiType, worldServer, (EntityPlayerMP)player, message.coord4D, message.index);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(message.object3D.getTileEntity(player.worldObj) instanceof TileEntityLogisticalSorter)
|
||||
if(message.coord4D.getTileEntity(player.worldObj) instanceof TileEntityLogisticalSorter)
|
||||
{
|
||||
try {
|
||||
if(message.packetType == SorterGuiPacket.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().showGuiScreen(LogisticalSorterGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.object3D.xCoord, message.object3D.yCoord, message.object3D.zCoord, -1));
|
||||
FMLCommonHandler.instance().showGuiScreen(LogisticalSorterGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D, -1));
|
||||
}
|
||||
else if(message.packetType == SorterGuiPacket.CLIENT_INDEX)
|
||||
{
|
||||
FMLCommonHandler.instance().showGuiScreen(LogisticalSorterGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.object3D.xCoord, message.object3D.yCoord, message.object3D.zCoord, message.index));
|
||||
FMLCommonHandler.instance().showGuiScreen(LogisticalSorterGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D, message.index));
|
||||
}
|
||||
|
||||
player.openContainer.windowId = message.windowId;
|
||||
@@ -70,7 +71,7 @@ public class PacketLogisticalSorterGui implements IMessageHandler<LogisticalSort
|
||||
|
||||
public static class LogisticalSorterGuiMessage implements IMessage
|
||||
{
|
||||
public Coord4D object3D;
|
||||
public Coord4D coord4D;
|
||||
|
||||
public SorterGuiPacket packetType;
|
||||
|
||||
@@ -86,7 +87,7 @@ public class PacketLogisticalSorterGui implements IMessageHandler<LogisticalSort
|
||||
{
|
||||
packetType = type;
|
||||
|
||||
object3D = coord;
|
||||
coord4D = coord;
|
||||
guiType = guiId;
|
||||
|
||||
if(packetType == SorterGuiPacket.CLIENT)
|
||||
@@ -137,57 +138,57 @@ public class PacketLogisticalSorterGui implements IMessageHandler<LogisticalSort
|
||||
|
||||
playerMP.openContainer = container;
|
||||
playerMP.openContainer.windowId = window;
|
||||
playerMP.openContainer.addCraftingToCrafters(playerMP);
|
||||
playerMP.openContainer.onCraftGuiOpened(playerMP);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static GuiScreen getGui(SorterGuiPacket packetType, int type, EntityPlayer player, World world, int x, int y, int z, int index)
|
||||
public static GuiScreen getGui(SorterGuiPacket packetType, int type, EntityPlayer player, World world, BlockPos pos, int index)
|
||||
{
|
||||
if(type == 0)
|
||||
{
|
||||
return new GuiLogisticalSorter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z));
|
||||
return new GuiLogisticalSorter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 4)
|
||||
{
|
||||
return new GuiTFilterSelect(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z));
|
||||
return new GuiTFilterSelect(player, (TileEntityLogisticalSorter)world.getTileEntity(pos));
|
||||
}
|
||||
else {
|
||||
if(packetType == SorterGuiPacket.CLIENT)
|
||||
{
|
||||
if(type == 1)
|
||||
{
|
||||
return new GuiTItemStackFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z));
|
||||
return new GuiTItemStackFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 2)
|
||||
{
|
||||
return new GuiTOreDictFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z));
|
||||
return new GuiTOreDictFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 3)
|
||||
{
|
||||
return new GuiTMaterialFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z));
|
||||
return new GuiTMaterialFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos));
|
||||
}
|
||||
else if(type == 5)
|
||||
{
|
||||
return new GuiTModIDFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z));
|
||||
return new GuiTModIDFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos));
|
||||
}
|
||||
}
|
||||
else if(packetType == SorterGuiPacket.CLIENT_INDEX)
|
||||
{
|
||||
if(type == 1)
|
||||
{
|
||||
return new GuiTItemStackFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z), index);
|
||||
return new GuiTItemStackFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos), index);
|
||||
}
|
||||
else if(type == 2)
|
||||
{
|
||||
return new GuiTOreDictFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z), index);
|
||||
return new GuiTOreDictFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos), index);
|
||||
}
|
||||
else if(type == 3)
|
||||
{
|
||||
return new GuiTMaterialFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z), index);
|
||||
return new GuiTMaterialFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos), index);
|
||||
}
|
||||
else if(type == 5)
|
||||
{
|
||||
return new GuiTModIDFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(x, y, z), index);
|
||||
return new GuiTModIDFilter(player, (TileEntityLogisticalSorter)world.getTileEntity(pos), index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,11 +201,7 @@ public class PacketLogisticalSorterGui implements IMessageHandler<LogisticalSort
|
||||
{
|
||||
dataStream.writeInt(packetType.ordinal());
|
||||
|
||||
dataStream.writeInt(object3D.xCoord);
|
||||
dataStream.writeInt(object3D.yCoord);
|
||||
dataStream.writeInt(object3D.zCoord);
|
||||
|
||||
dataStream.writeInt(object3D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(guiType);
|
||||
|
||||
@@ -224,7 +221,7 @@ public class PacketLogisticalSorterGui implements IMessageHandler<LogisticalSort
|
||||
{
|
||||
packetType = SorterGuiPacket.values()[dataStream.readInt()];
|
||||
|
||||
object3D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
guiType = dataStream.readInt();
|
||||
|
||||
|
||||
@@ -108,11 +108,7 @@ public class PacketNewFilter implements IMessageHandler<NewFilterMessage, IMessa
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeByte(type);
|
||||
|
||||
@@ -137,7 +133,7 @@ public class PacketNewFilter implements IMessageHandler<NewFilterMessage, IMessa
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
type = dataStream.readByte();
|
||||
|
||||
if(type == 0)
|
||||
|
||||
@@ -19,6 +19,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
@@ -49,11 +50,11 @@ public class PacketOredictionificatorGui implements IMessageHandler<Oredictionif
|
||||
try {
|
||||
if(message.packetType == OredictionificatorGuiPacket.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().showGuiScreen(OredictionificatorGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D.xCoord, message.coord4D.yCoord, message.coord4D.zCoord, -1));
|
||||
FMLCommonHandler.instance().showGuiScreen(OredictionificatorGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D, -1));
|
||||
}
|
||||
else if(message.packetType == OredictionificatorGuiPacket.CLIENT_INDEX)
|
||||
{
|
||||
FMLCommonHandler.instance().showGuiScreen(OredictionificatorGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D.xCoord, message.coord4D.yCoord, message.coord4D.zCoord, message.index));
|
||||
FMLCommonHandler.instance().showGuiScreen(OredictionificatorGuiMessage.getGui(message.packetType, message.guiType, player, player.worldObj, message.coord4D, message.index));
|
||||
}
|
||||
|
||||
player.openContainer.windowId = message.windowId;
|
||||
@@ -131,7 +132,7 @@ public class PacketOredictionificatorGui implements IMessageHandler<Oredictionif
|
||||
|
||||
playerMP.openContainer = container;
|
||||
playerMP.openContainer.windowId = window;
|
||||
playerMP.openContainer.addCraftingToCrafters(playerMP);
|
||||
playerMP.openContainer.onCraftGuiOpened(playerMP);
|
||||
|
||||
if(guiType == 0)
|
||||
{
|
||||
@@ -145,25 +146,25 @@ public class PacketOredictionificatorGui implements IMessageHandler<Oredictionif
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static GuiScreen getGui(OredictionificatorGuiPacket packetType, int type, EntityPlayer player, World world, int x, int y, int z, int index)
|
||||
public static GuiScreen getGui(OredictionificatorGuiPacket packetType, int type, EntityPlayer player, World world, BlockPos pos, int index)
|
||||
{
|
||||
if(type == 0)
|
||||
{
|
||||
return new GuiOredictionificator(player.inventory, (TileEntityOredictionificator)world.getTileEntity(x, y, z));
|
||||
return new GuiOredictionificator(player.inventory, (TileEntityOredictionificator)world.getTileEntity(pos));
|
||||
}
|
||||
else {
|
||||
if(packetType == OredictionificatorGuiPacket.CLIENT)
|
||||
{
|
||||
if(type == 1)
|
||||
{
|
||||
return new GuiOredictionificatorFilter(player, (TileEntityOredictionificator)world.getTileEntity(x, y, z));
|
||||
return new GuiOredictionificatorFilter(player, (TileEntityOredictionificator)world.getTileEntity(pos));
|
||||
}
|
||||
}
|
||||
else if(packetType == OredictionificatorGuiPacket.CLIENT_INDEX)
|
||||
{
|
||||
if(type == 1)
|
||||
{
|
||||
return new GuiOredictionificatorFilter(player, (TileEntityOredictionificator)world.getTileEntity(x, y, z), index);
|
||||
return new GuiOredictionificatorFilter(player, (TileEntityOredictionificator)world.getTileEntity(pos), index);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -176,11 +177,7 @@ public class PacketOredictionificatorGui implements IMessageHandler<Oredictionif
|
||||
{
|
||||
dataStream.writeInt(packetType.ordinal());
|
||||
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(guiType);
|
||||
|
||||
@@ -200,7 +197,7 @@ public class PacketOredictionificatorGui implements IMessageHandler<Oredictionif
|
||||
{
|
||||
packetType = OredictionificatorGuiPacket.values()[dataStream.readInt()];
|
||||
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
guiType = dataStream.readInt();
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public class PacketPortableTeleporter implements IMessageHandler<PortableTelepor
|
||||
Mekanism.proxy.handleTeleporterUpdate(message);
|
||||
break;
|
||||
case SET_FREQ:
|
||||
FrequencyManager manager1 = getManager(message.frequency.isPublic() ? null : player.getCommandSenderName(), world);
|
||||
FrequencyManager manager1 = getManager(message.frequency.isPublic() ? null : player.getName(), world);
|
||||
Frequency toUse = null;
|
||||
|
||||
for(Frequency freq : manager1.getFrequencies())
|
||||
@@ -62,7 +62,7 @@ public class PacketPortableTeleporter implements IMessageHandler<PortableTelepor
|
||||
|
||||
if(toUse == null)
|
||||
{
|
||||
toUse = new Frequency(message.frequency.name, player.getCommandSenderName()).setPublic(message.frequency.isPublic());
|
||||
toUse = new Frequency(message.frequency.name, player.getName()).setPublic(message.frequency.isPublic());
|
||||
manager1.addFrequency(toUse);
|
||||
}
|
||||
|
||||
@@ -70,12 +70,12 @@ public class PacketPortableTeleporter implements IMessageHandler<PortableTelepor
|
||||
|
||||
break;
|
||||
case DEL_FREQ:
|
||||
FrequencyManager manager = getManager(message.frequency.isPublic() ? null : player.getCommandSenderName(), world);
|
||||
manager.remove(message.frequency.name, player.getCommandSenderName());
|
||||
FrequencyManager manager = getManager(message.frequency.isPublic() ? null : player.getName(), world);
|
||||
manager.remove(message.frequency.name, player.getName());
|
||||
|
||||
break;
|
||||
case TELEPORT:
|
||||
FrequencyManager manager2 = getManager(message.frequency.isPublic() ? null : player.getCommandSenderName(), world);
|
||||
FrequencyManager manager2 = getManager(message.frequency.isPublic() ? null : player.getName(), world);
|
||||
Frequency found = null;
|
||||
|
||||
for(Frequency freq : manager2.getFrequencies())
|
||||
@@ -139,7 +139,7 @@ public class PacketPortableTeleporter implements IMessageHandler<PortableTelepor
|
||||
|
||||
List<Frequency> privateFreqs = new ArrayList<Frequency>();
|
||||
|
||||
for(Frequency f : getManager(player.getCommandSenderName(), world).getFrequencies())
|
||||
for(Frequency f : getManager(player.getName(), world).getFrequencies())
|
||||
{
|
||||
privateFreqs.add(f);
|
||||
}
|
||||
@@ -148,7 +148,7 @@ public class PacketPortableTeleporter implements IMessageHandler<PortableTelepor
|
||||
|
||||
if(given != null)
|
||||
{
|
||||
FrequencyManager manager = given.isPublic() ? getManager(null, world) : getManager(player.getCommandSenderName(), world);
|
||||
FrequencyManager manager = given.isPublic() ? getManager(null, world) : getManager(player.getName(), world);
|
||||
boolean found = false;
|
||||
|
||||
for(Frequency iterFreq : manager.getFrequencies())
|
||||
|
||||
@@ -7,6 +7,7 @@ import mekanism.common.PacketHandler;
|
||||
import mekanism.common.network.PacketPortalFX.PortalFXMessage;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -24,8 +25,8 @@ public class PacketPortalFX implements IMessageHandler<PortalFXMessage, IMessage
|
||||
|
||||
for(int i = 0; i < 50; i++)
|
||||
{
|
||||
player.worldObj.spawnParticle("portal", message.coord4D.xCoord + random.nextFloat(), message.coord4D.yCoord + random.nextFloat(), message.coord4D.zCoord + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
player.worldObj.spawnParticle("portal", message.coord4D.xCoord + random.nextFloat(), message.coord4D.yCoord + 1 + random.nextFloat(), message.coord4D.zCoord + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
player.worldObj.spawnParticle(EnumParticleTypes.PORTAL, message.coord4D.getX() + random.nextFloat(), message.coord4D.getY() + random.nextFloat(), message.coord4D.getZ() + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
player.worldObj.spawnParticle(EnumParticleTypes.PORTAL, message.coord4D.getX() + random.nextFloat(), message.coord4D.getY() + 1 + random.nextFloat(), message.coord4D.getZ() + random.nextFloat(), 0.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -45,16 +46,13 @@ public class PacketPortalFX implements IMessageHandler<PortalFXMessage, IMessage
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,10 +46,7 @@ public class PacketRedstoneControl implements IMessageHandler<RedstoneControlMes
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(value.ordinal());
|
||||
}
|
||||
|
||||
@@ -57,10 +57,7 @@ public class PacketRemoveUpgrade implements IMessageHandler<RemoveUpgradeMessage
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(upgradeType);
|
||||
}
|
||||
@@ -68,7 +65,7 @@ public class PacketRemoveUpgrade implements IMessageHandler<RemoveUpgradeMessage
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
upgradeType = dataStream.readInt();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class PacketScubaTankData implements IMessageHandler<ScubaTankDataMessage
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
{
|
||||
Mekanism.packetHandler.sendToDimension(new ScubaTankDataMessage(ScubaTankPacket.UPDATE, message.username, message.value), player.worldObj.provider.dimensionId);
|
||||
Mekanism.packetHandler.sendToDimension(new ScubaTankDataMessage(ScubaTankPacket.UPDATE, message.username, message.value), player.worldObj.provider.getDimensionId());
|
||||
}
|
||||
}
|
||||
else if(message.packetType == ScubaTankPacket.MODE)
|
||||
|
||||
@@ -79,25 +79,21 @@ public class PacketSimpleGui implements IMessageHandler<SimpleGuiMessage, IMessa
|
||||
|
||||
Mekanism.packetHandler.sendTo(new SimpleGuiMessage(obj, id, window), playerMP);
|
||||
|
||||
playerMP.openContainer = Mekanism.proxy.getServerGui(id, playerMP, world, obj.xCoord, obj.yCoord, obj.zCoord);
|
||||
playerMP.openContainer = Mekanism.proxy.getServerGui(id, playerMP, world, obj);
|
||||
playerMP.openContainer.windowId = window;
|
||||
playerMP.openContainer.addCraftingToCrafters(playerMP);
|
||||
playerMP.openContainer.onCraftGuiOpened(playerMP);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static GuiScreen getGui(int id, EntityPlayer player, World world, Coord4D obj)
|
||||
{
|
||||
return (GuiScreen)Mekanism.proxy.getClientGui(id, player, world, obj.xCoord, obj.yCoord, obj.zCoord);
|
||||
return (GuiScreen)Mekanism.proxy.getClientGui(id, player, world, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
dataStream.writeInt(guiId);
|
||||
dataStream.writeInt(windowId);
|
||||
@@ -106,7 +102,7 @@ public class PacketSimpleGui implements IMessageHandler<SimpleGuiMessage, IMessa
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
guiId = dataStream.readInt();
|
||||
windowId = dataStream.readInt();
|
||||
|
||||
@@ -56,10 +56,7 @@ public class PacketTileEntity implements IMessageHandler<TileEntityMessage, IMes
|
||||
@Override
|
||||
public void toBytes(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||
|
||||
@@ -75,7 +72,7 @@ public class PacketTileEntity implements IMessageHandler<TileEntityMessage, IMes
|
||||
@Override
|
||||
public void fromBytes(ByteBuf dataStream)
|
||||
{
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
storedBuffer = dataStream.copy();
|
||||
}
|
||||
|
||||
@@ -180,10 +180,7 @@ public class PacketTransmitterUpdate implements IMessageHandler<TransmitterUpdat
|
||||
{
|
||||
dataStream.writeInt(packetType.ordinal());
|
||||
|
||||
dataStream.writeInt(coord4D.xCoord);
|
||||
dataStream.writeInt(coord4D.yCoord);
|
||||
dataStream.writeInt(coord4D.zCoord);
|
||||
dataStream.writeInt(coord4D.dimensionId);
|
||||
coord4D.write(dataStream);
|
||||
|
||||
PacketHandler.log("Sending '" + packetType + "' update message from coordinate " + coord4D);
|
||||
|
||||
@@ -222,7 +219,7 @@ public class PacketTransmitterUpdate implements IMessageHandler<TransmitterUpdat
|
||||
{
|
||||
packetType = PacketType.values()[dataStream.readInt()];
|
||||
|
||||
coord4D = new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
coord4D = Coord4D.read(dataStream);
|
||||
|
||||
if(packetType == PacketType.UPDATE)
|
||||
{
|
||||
|
||||
@@ -138,7 +138,7 @@ public class BinRecipe implements IRecipe
|
||||
|
||||
ItemStack testRemove = inv.removeStack();
|
||||
|
||||
bin.stackTagCompound.setInteger("newCount", size-(testRemove != null ? testRemove.stackSize : 0));
|
||||
bin.getTagCompound().setInteger("newCount", size-(testRemove != null ? testRemove.stackSize : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,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;
|
||||
|
||||
@InterfaceList({
|
||||
@Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"),
|
||||
@@ -157,7 +157,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int slotID)
|
||||
public int[] getSlotsForFace(int slotID)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -186,7 +186,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction)
|
||||
public boolean acceptsEnergyFrom(TileEntity emitter, EnumFacing direction)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -198,7 +198,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
|
||||
@Override
|
||||
@Method(modid = "CoFHCore")
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate)
|
||||
public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -210,7 +210,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
|
||||
@Override
|
||||
@Method(modid = "CoFHCore")
|
||||
public int extractEnergy(ForgeDirection from, int maxExtract, boolean simulate)
|
||||
public int extractEnergy(EnumFacing from, int maxExtract, boolean simulate)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -222,7 +222,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
|
||||
@Override
|
||||
@Method(modid = "CoFHCore")
|
||||
public boolean canConnectEnergy(ForgeDirection from)
|
||||
public boolean canConnectEnergy(EnumFacing from)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -234,7 +234,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
|
||||
@Override
|
||||
@Method(modid = "CoFHCore")
|
||||
public int getEnergyStored(ForgeDirection from)
|
||||
public int getEnergyStored(EnumFacing from)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -246,7 +246,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
|
||||
@Override
|
||||
@Method(modid = "CoFHCore")
|
||||
public int getMaxEnergyStored(ForgeDirection from)
|
||||
public int getMaxEnergyStored(EnumFacing from)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -290,7 +290,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public double transferEnergyToAcceptor(ForgeDirection side, double amount)
|
||||
public double transferEnergyToAcceptor(EnumFacing side, double amount)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -301,7 +301,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveEnergy(ForgeDirection side)
|
||||
public boolean canReceiveEnergy(EnumFacing side)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -325,7 +325,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
|
||||
@Override
|
||||
@Method(modid = "IC2")
|
||||
public double injectEnergy(ForgeDirection directionFrom, double amount, double voltage)
|
||||
public double injectEnergy(EnumFacing directionFrom, double amount, double voltage)
|
||||
{
|
||||
if(getInv() == null)
|
||||
{
|
||||
@@ -354,7 +354,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
return null;
|
||||
}
|
||||
|
||||
TileEntity tile = new Coord4D(mainX, mainY, mainZ, worldObj.provider.dimensionId).getTileEntity(worldObj);
|
||||
TileEntity tile = new Coord4D(mainX, mainY, mainZ, worldObj.provider.getDimensionId()).getTileEntity(worldObj);
|
||||
|
||||
if(!(tile instanceof IAdvancedBoundingBlock))
|
||||
{
|
||||
@@ -362,7 +362,7 @@ public class TileEntityAdvancedBoundingBlock extends TileEntityBoundingBlock imp
|
||||
return null;
|
||||
}
|
||||
|
||||
return (IAdvancedBoundingBlock)new Coord4D(mainX, mainY, mainZ, worldObj.provider.dimensionId).getTileEntity(worldObj);
|
||||
return (IAdvancedBoundingBlock)new Coord4D(mainX, mainY, mainZ, worldObj.provider.getDimensionId()).getTileEntity(worldObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,7 +24,7 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.common.util.StatUtils;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -372,43 +372,43 @@ public abstract class TileEntityAdvancedElectricMachine<RECIPE extends AdvancedM
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
public int receiveGas(EnumFacing side, GasStack stack)
|
||||
{
|
||||
return receiveGas(side, stack, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
|
||||
public GasStack drawGas(EnumFacing side, int amount, boolean doTransfer)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
public GasStack drawGas(EnumFacing side, int amount)
|
||||
{
|
||||
return drawGas(side, amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
public boolean canDrawGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import mekanism.common.recipe.inputs.IntegerInput;
|
||||
import mekanism.common.recipe.machines.AmbientGasRecipe;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
@@ -37,9 +37,9 @@ public class TileEntityAmbientAccumulator extends TileEntityContainerBlock imple
|
||||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(cachedRecipe == null || worldObj.provider.dimensionId != cachedDimensionId)
|
||||
if(cachedRecipe == null || worldObj.provider.getDimensionId() != cachedDimensionId)
|
||||
{
|
||||
cachedDimensionId = worldObj.provider.dimensionId;
|
||||
cachedDimensionId = worldObj.provider.getDimensionId();
|
||||
cachedRecipe = RecipeHandler.getDimensionGas(new IntegerInput(cachedDimensionId));
|
||||
}
|
||||
|
||||
@@ -52,43 +52,43 @@ public class TileEntityAmbientAccumulator extends TileEntityContainerBlock imple
|
||||
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
public int receiveGas(EnumFacing side, GasStack stack)
|
||||
{
|
||||
return receiveGas(side, stack, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
|
||||
public GasStack drawGas(EnumFacing side, int amount, boolean doTransfer)
|
||||
{
|
||||
return collectedGas.draw(amount, doTransfer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
public GasStack drawGas(EnumFacing side, int amount)
|
||||
{
|
||||
return drawGas(side, amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
public boolean canDrawGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return type == collectedGas.getGasType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import mekanism.common.tile.component.TileComponentUpgrade;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
@@ -116,7 +116,7 @@ public abstract class TileEntityBasicMachine<INPUT extends MachineInput<INPUT>,
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getConsumingSides()
|
||||
public EnumSet<EnumFacing> getConsumingSides()
|
||||
{
|
||||
return configComponent.getSidesForData(TransmissionType.ENERGY, facing, 1);
|
||||
}
|
||||
@@ -228,7 +228,7 @@ public abstract class TileEntityBasicMachine<INPUT extends MachineInput<INPUT>,
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(int side)
|
||||
{
|
||||
return configComponent.getOutput(TransmissionType.ITEM, side, facing).availableSlots;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,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.fml.common.Optional.Interface;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
@@ -191,7 +191,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
||||
{
|
||||
if(bottomStack != null && isActive)
|
||||
{
|
||||
TileEntity tile = Coord4D.get(this).offset(ForgeDirection.getOrientation(0)).getTileEntity(worldObj);
|
||||
TileEntity tile = Coord4D.get(this).offset(EnumFacing.getFront(0)).getTileEntity(worldObj);
|
||||
|
||||
if(tile instanceof ITransporterTile)
|
||||
{
|
||||
@@ -457,7 +457,7 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(int side)
|
||||
{
|
||||
if(side == 1)
|
||||
{
|
||||
|
||||
@@ -12,28 +12,25 @@ import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
{
|
||||
public int mainX;
|
||||
public int mainY;
|
||||
public int mainZ;
|
||||
public BlockPos mainPos;
|
||||
|
||||
public boolean receivedCoords;
|
||||
|
||||
public boolean prevPower;
|
||||
public int prevPower;
|
||||
|
||||
public void setMainLocation(int x, int y, int z)
|
||||
public void setMainLocation(BlockPos pos)
|
||||
{
|
||||
receivedCoords = true;
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
mainX = x;
|
||||
mainY = y;
|
||||
mainZ = z;
|
||||
mainPos = pos;
|
||||
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
@@ -50,25 +47,19 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canUpdate()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onNeighborChange(Block block)
|
||||
{
|
||||
TileEntity tile = worldObj.getTileEntity(mainX, mainY, mainZ);
|
||||
TileEntity tile = worldObj.getTileEntity(mainPos);
|
||||
|
||||
if(tile instanceof TileEntityBasicBlock)
|
||||
{
|
||||
TileEntityBasicBlock tileEntity = (TileEntityBasicBlock)tile;
|
||||
|
||||
boolean power = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord);
|
||||
int power = worldObj.isBlockIndirectlyGettingPowered(getPos());
|
||||
|
||||
if(prevPower != power)
|
||||
{
|
||||
if(power)
|
||||
if(power > 0)
|
||||
{
|
||||
onPower();
|
||||
}
|
||||
@@ -89,10 +80,8 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
@Override
|
||||
public void handlePacketData(ByteBuf dataStream)
|
||||
{
|
||||
mainX = dataStream.readInt();
|
||||
mainY = dataStream.readInt();
|
||||
mainZ = dataStream.readInt();
|
||||
prevPower = dataStream.readBoolean();
|
||||
mainPos = new BlockPos(dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
prevPower = dataStream.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -100,10 +89,8 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
{
|
||||
super.readFromNBT(nbtTags);
|
||||
|
||||
mainX = nbtTags.getInteger("mainX");
|
||||
mainY = nbtTags.getInteger("mainY");
|
||||
mainZ = nbtTags.getInteger("mainZ");
|
||||
prevPower = nbtTags.getBoolean("prevPower");
|
||||
mainPos = new BlockPos(nbtTags.getInteger("mainX"), nbtTags.getInteger("mainY"), nbtTags.getInteger("mainZ"));
|
||||
prevPower = nbtTags.getInteger("prevPower");
|
||||
receivedCoords = nbtTags.getBoolean("receivedCoords");
|
||||
}
|
||||
|
||||
@@ -112,19 +99,19 @@ public class TileEntityBoundingBlock extends TileEntity implements ITileNetwork
|
||||
{
|
||||
super.writeToNBT(nbtTags);
|
||||
|
||||
nbtTags.setInteger("mainX", mainX);
|
||||
nbtTags.setInteger("mainY", mainY);
|
||||
nbtTags.setInteger("mainZ", mainZ);
|
||||
nbtTags.setBoolean("prevPower", prevPower);
|
||||
nbtTags.setInteger("mainX", mainPos.getX());
|
||||
nbtTags.setInteger("mainY", mainPos.getY());
|
||||
nbtTags.setInteger("mainZ", mainPos.getZ());
|
||||
nbtTags.setInteger("prevPower", prevPower);
|
||||
nbtTags.setBoolean("receivedCoords", receivedCoords);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList getNetworkedData(ArrayList data)
|
||||
{
|
||||
data.add(mainX);
|
||||
data.add(mainY);
|
||||
data.add(mainZ);
|
||||
data.add(mainPos.getX());
|
||||
data.add(mainPos.getY());
|
||||
data.add(mainPos.getZ());
|
||||
data.add(prevPower);
|
||||
|
||||
return data;
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -142,9 +142,9 @@ public class TileEntityChargepad extends TileEntityNoisyElectricBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<ForgeDirection> getConsumingSides()
|
||||
public EnumSet<EnumFacing> getConsumingSides()
|
||||
{
|
||||
return EnumSet.of(ForgeDirection.DOWN, ForgeDirection.getOrientation(facing).getOpposite());
|
||||
return EnumSet.of(EnumFacing.DOWN, EnumFacing.getFront(facing).getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,7 +24,7 @@ import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -302,13 +302,13 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0) && inputTank.canReceive(type) &&
|
||||
RecipeHandler.Recipe.CHEMICAL_CRYSTALLIZER.containsRecipe(type);
|
||||
@@ -334,7 +334,7 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
if(canReceiveGas(side, stack.getGas()))
|
||||
{
|
||||
@@ -345,25 +345,25 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
public int receiveGas(EnumFacing side, GasStack stack)
|
||||
{
|
||||
return receiveGas(side, stack, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
|
||||
public GasStack drawGas(EnumFacing side, int amount, boolean doTransfer)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
public GasStack drawGas(EnumFacing side, int amount)
|
||||
{
|
||||
return drawGas(side, amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
public boolean canDrawGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -404,7 +404,7 @@ public class TileEntityChemicalCrystallizer extends TileEntityNoisyElectricBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(int side)
|
||||
{
|
||||
return configComponent.getOutput(TransmissionType.ITEM, side, facing).availableSlots;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import mekanism.common.util.StatUtils;
|
||||
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;
|
||||
|
||||
public class TileEntityChemicalDissolutionChamber extends TileEntityNoisyElectricBlock implements ITubeConnection, IRedstoneControl, IGasHandler, IUpgradeTile, ISustainedData, ITankManager
|
||||
{
|
||||
@@ -200,7 +200,7 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityNoisyElectri
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(int side)
|
||||
{
|
||||
if(side == MekanismUtils.getLeft(facing).ordinal() || side == 1)
|
||||
{
|
||||
@@ -380,7 +380,7 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityNoisyElectri
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return side == MekanismUtils.getLeft(facing) || side == MekanismUtils.getRight(facing);
|
||||
}
|
||||
@@ -405,7 +405,7 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityNoisyElectri
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
if(canReceiveGas(side, stack.getGas()))
|
||||
{
|
||||
@@ -416,31 +416,31 @@ public class TileEntityChemicalDissolutionChamber extends TileEntityNoisyElectri
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
public int receiveGas(EnumFacing side, GasStack stack)
|
||||
{
|
||||
return receiveGas(side, stack, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
|
||||
public GasStack drawGas(EnumFacing side, int amount, boolean doTransfer)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
public GasStack drawGas(EnumFacing side, int amount)
|
||||
{
|
||||
return drawGas(side, amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return side == MekanismUtils.getLeft(facing) && type == GasRegistry.getGas("sulfuricAcid");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
public boolean canDrawGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
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;
|
||||
|
||||
public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock implements IGasHandler, ITubeConnection, IRedstoneControl, ISustainedData, IUpgradeTile, IUpgradeInfoHandler, ITankManager
|
||||
{
|
||||
@@ -143,13 +143,13 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
{
|
||||
GasStack toSend = new GasStack(centerTank.getGas().getGas(), Math.min(centerTank.getStored(), gasOutput));
|
||||
|
||||
TileEntity tileEntity = Coord4D.get(this).offset(ForgeDirection.getOrientation(facing)).getTileEntity(worldObj);
|
||||
TileEntity tileEntity = Coord4D.get(this).offset(EnumFacing.getFront(facing)).getTileEntity(worldObj);
|
||||
|
||||
if(tileEntity instanceof IGasHandler)
|
||||
{
|
||||
if(((IGasHandler)tileEntity).canReceiveGas(ForgeDirection.getOrientation(facing).getOpposite(), centerTank.getGas().getGas()))
|
||||
if(((IGasHandler)tileEntity).canReceiveGas(EnumFacing.getFront(facing).getOpposite(), centerTank.getGas().getGas()))
|
||||
{
|
||||
centerTank.draw(((IGasHandler)tileEntity).receiveGas(ForgeDirection.getOrientation(facing).getOpposite(), toSend, true), true);
|
||||
centerTank.draw(((IGasHandler)tileEntity).receiveGas(EnumFacing.getFront(facing).getOpposite(), toSend, true), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
return i != 0 && i != 1;
|
||||
}
|
||||
|
||||
public GasTank getTank(ForgeDirection side)
|
||||
public GasTank getTank(EnumFacing side)
|
||||
{
|
||||
if(side == MekanismUtils.getLeft(facing))
|
||||
{
|
||||
@@ -332,7 +332,7 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
{
|
||||
return rightTank;
|
||||
}
|
||||
else if(side == ForgeDirection.getOrientation(facing))
|
||||
else if(side == EnumFacing.getFront(facing))
|
||||
{
|
||||
return centerTank;
|
||||
}
|
||||
@@ -373,13 +373,13 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return side == MekanismUtils.getLeft(facing) || side == MekanismUtils.getRight(facing) || side == ForgeDirection.getOrientation(facing);
|
||||
return side == MekanismUtils.getLeft(facing) || side == MekanismUtils.getRight(facing) || side == EnumFacing.getFront(facing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return getTank(side) != null && getTank(side) != centerTank ? getTank(side).canReceive(type) : false;
|
||||
}
|
||||
@@ -404,7 +404,7 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
if(canReceiveGas(side, stack != null ? stack.getGas() : null))
|
||||
{
|
||||
@@ -415,13 +415,13 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
public int receiveGas(EnumFacing side, GasStack stack)
|
||||
{
|
||||
return receiveGas(side, stack, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount, boolean doTransfer)
|
||||
public GasStack drawGas(EnumFacing side, int amount, boolean doTransfer)
|
||||
{
|
||||
if(canDrawGas(side, null))
|
||||
{
|
||||
@@ -432,13 +432,13 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
public GasStack drawGas(EnumFacing side, int amount)
|
||||
{
|
||||
return drawGas(side, amount, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
public boolean canDrawGas(EnumFacing side, Gas type)
|
||||
{
|
||||
return getTank(side) != null && getTank(side) == centerTank ? getTank(side).canDraw(type) : false;
|
||||
}
|
||||
@@ -474,7 +474,7 @@ public class TileEntityChemicalInfuser extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(int side)
|
||||
{
|
||||
if(side == MekanismUtils.getLeft(facing).ordinal())
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ import mekanism.common.util.InventoryUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectricMachine<InjectionRecipe>
|
||||
{
|
||||
@@ -54,7 +54,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack, boolean doTransfer)
|
||||
public int receiveGas(EnumFacing side, GasStack stack, boolean doTransfer)
|
||||
{
|
||||
if(canReceiveGas(side, stack.getGas()))
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
public boolean canReceiveGas(EnumFacing side, Gas type)
|
||||
{
|
||||
if(configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0))
|
||||
{
|
||||
@@ -95,7 +95,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return configComponent.getOutput(TransmissionType.GAS, side.ordinal(), facing).hasSlot(0);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import mekanism.common.util.MekanismUtils;
|
||||
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;
|
||||
|
||||
public class TileEntityChemicalOxidizer extends TileEntityNoisyElectricBlock implements ITubeConnection, IRedstoneControl, IUpgradeTile, ISustainedData, ITankManager
|
||||
{
|
||||
@@ -178,7 +178,7 @@ public class TileEntityChemicalOxidizer extends TileEntityNoisyElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
public int[] getSlotsForFace(int side)
|
||||
{
|
||||
if(side == MekanismUtils.getLeft(facing).ordinal())
|
||||
{
|
||||
@@ -333,7 +333,7 @@ public class TileEntityChemicalOxidizer extends TileEntityNoisyElectricBlock imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
public boolean canTubeConnect(EnumFacing side)
|
||||
{
|
||||
return side == MekanismUtils.getRight(facing);
|
||||
}
|
||||
|
||||
Loaded 100 of 189 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user