Auto-Sync

This commit is contained in:
DarkGuardsman 2013-10-25 03:15:58 -04:00
parent ec93256cd2
commit 7478369e13
26 changed files with 87 additions and 92 deletions

View file

@ -4,7 +4,6 @@ import java.util.HashMap;
import java.util.List;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ResourceLocation;
import universalelectricity.core.vector.Vector2;
import dark.api.al.coding.args.ArgumentData;

View file

@ -8,13 +8,13 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import calclavia.lib.gui.GuiBase;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.CommonProxy;
import dark.assembly.common.machine.encoder.TileEntityEncoder;
import dark.core.prefab.invgui.GuiBase;
import dark.core.prefab.invgui.GuiButtonImage;
/** A base class for all ICBM Sentry GUIs.
@ -33,7 +33,7 @@ public abstract class GuiEncoderBase extends GuiBase
{
this.tileEntity = tileEntity;
this.entityPlayer = player;
this.ySize = 380 / 2;
this.guiSize.y = 380 / 2;
}
@Override
@ -42,11 +42,11 @@ public abstract class GuiEncoderBase extends GuiBase
super.initGui();
this.buttonList.clear();
// Inventory
this.buttonList.add(new GuiButtonImage(0, (this.width - this.xSize) / 2 - 22, (this.height - this.ySize) / 2 + 0, 3));
this.buttonList.add(new GuiButtonImage(0, (this.width - this.guiSize.intX()) / 2 - 22, (this.height - this.guiSize.intY()) / 2 + 0, 3));
// Coding
this.buttonList.add(new GuiButtonImage(1, (this.width - this.xSize) / 2 - 22, (this.height - this.ySize) / 2 + 22, 0));
this.buttonList.add(new GuiButtonImage(1, (this.width - this.guiSize.intX()) / 2 - 22, (this.height - this.guiSize.intY()) / 2 + 22, 0));
// Help
this.buttonList.add(new GuiButtonImage(2, (this.width - this.xSize) / 2 - 22, (this.height - this.ySize) / 2 + 44, 2));
this.buttonList.add(new GuiButtonImage(2, (this.width - this.guiSize.intX()) / 2 - 22, (this.height - this.guiSize.intY()) / 2 + 44, 2));
}
@ -77,19 +77,19 @@ public abstract class GuiEncoderBase extends GuiBase
@Override
protected void drawForegroundLayer(int x, int y, float var1)
{
this.fontRenderer.drawString("\u00a77" + "Encoder", (int) (this.xSize / 2 - 7 * 2.5), 4, 4210752);
this.fontRenderer.drawString("\u00a77" + "Encoder", (int) (this.guiSize.intX() / 2 - 7 * 2.5), 4, 4210752);
/** Render Tool Tips */
if (((GuiButtonImage) this.buttonList.get(0)).isIntersect(x, y))
{
this.drawTooltip(x - this.guiLeft, y - this.guiTop + 10, "Inventory");
this.drawTooltip(x - this.guiTopLeftCorner.intX(), y - this.guiTopLeftCorner.intY() + 10, "Inventory");
}
else if (((GuiButtonImage) this.buttonList.get(1)).isIntersect(x, y))
{
this.drawTooltip(x - this.guiLeft, y - this.guiTop + 10, "Coder");
this.drawTooltip(x - this.guiTopLeftCorner.intX(), y - this.guiTopLeftCorner.intY() + 10, "Coder");
}
else if (((GuiButtonImage) this.buttonList.get(2)).isIntersect(x, y))
{
this.drawTooltip(x - this.guiLeft, y - this.guiTop + 10, "Help");
this.drawTooltip(x - this.guiTopLeftCorner.intX(), y - this.guiTopLeftCorner.intY() + 10, "Help");
}
}
@ -101,9 +101,9 @@ public abstract class GuiEncoderBase extends GuiBase
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
int containerWidth = (this.width - this.xSize) / 2;
int containerHeight = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, this.xSize, this.ySize);
int containerWidth = (this.width - this.guiSize.intX()) / 2;
int containerHeight = (this.height - this.guiSize.intY()) / 2;
this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, this.guiSize.intX(), this.guiSize.intY());
}
@Override
@ -139,9 +139,9 @@ public abstract class GuiEncoderBase extends GuiBase
var9 += 2 + (toolTips.length - 1) * 10;
}
if (this.guiTop + var7 + var9 + 6 > this.height)
if (this.guiTopLeftCorner.intY() + var7 + var9 + 6 > this.height)
{
var7 = this.height - var9 - this.guiTop - 6;
var7 = this.height - var9 - this.guiTopLeftCorner.intY() - 6;
}
this.zLevel = 300.0F;

View file

@ -1,13 +1,13 @@
package dark.assembly.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.client.FMLClientHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.machine.encoder.TileEntityEncoder;
import dark.core.prefab.invgui.GuiButtonImage;
public class GuiEncoderCoder extends GuiEncoderBase
{
@ -31,10 +31,10 @@ public class GuiEncoderCoder extends GuiEncoderBase
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
int containerWidth = (this.width - this.xSize) / 2;
int containerHeight = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, this.xSize, this.ySize);
taskListGui.drawConsole(this.mc, (this.width - this.xSize) / 2 + 15, (this.height - this.ySize) / 2 + 20);
int containerWidth = (this.width - this.guiSize.intX()) / 2;
int containerHeight = (this.height - this.guiSize.intY()) / 2;
this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, this.guiSize.intX(), this.guiSize.intY());
taskListGui.drawConsole(this.mc, (this.width - this.guiSize.intX()) / 2 + 15, (this.height - this.guiSize.intY()) / 2 + 20);
}
}

View file

@ -19,7 +19,6 @@ import dark.assembly.common.machine.encoder.ContainerEncoder;
import dark.assembly.common.machine.encoder.TileEntityEncoder;
import dark.core.prefab.invgui.GuiButtonImage;
@SideOnly(Side.CLIENT)
public abstract class GuiEncoderContainer extends GuiContainer
{

View file

@ -19,6 +19,6 @@ public class GuiEncoderHelp extends GuiEncoderBase
protected void drawForegroundLayer(int x, int y, float var1)
{
String out = "Help for using the encoder is currently not ready";
this.fontRenderer.drawString("\u00a77" + out, (int) (this.xSize / 2 - out.length() * 2.5), 20, 4210752);
this.fontRenderer.drawString("\u00a77" + out, (int) (this.guiSize.intX() / 2 - out.length() * 2.5), 20, 4210752);
}
}

View file

@ -12,6 +12,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import dark.api.al.coding.IRedirectTask;
import dark.api.al.coding.ITask;
import dark.core.common.DarkMain;
import dark.core.prefab.ModPrefab;
@SideOnly(Side.CLIENT)
public class GuiTask extends Gui
@ -53,21 +54,20 @@ public class GuiTask extends Gui
switch (task.getType())
{
case DATA:
gui_pic = new ResourceLocation(DarkMain.GUI_DIRECTORY + "logic/DATA.png");
gui_pic = new ResourceLocation(ModPrefab.GUI_DIRECTORY + "logic/DATA.png");
break;
case PROCESS:
gui_pic = new ResourceLocation(DarkMain.GUI_DIRECTORY + "logic/PROCESS.png");
gui_pic = new ResourceLocation(ModPrefab.GUI_DIRECTORY + "logic/PROCESS.png");
break;
case DEFINEDPROCESS:
gui_pic = new ResourceLocation(DarkMain.GUI_DIRECTORY + "logic/DEFINEDPROCESS.png");
gui_pic = new ResourceLocation(ModPrefab.GUI_DIRECTORY + "logic/DEFINEDPROCESS.png");
break;
case DECISION:
gui_pic = new ResourceLocation(DarkMain.GUI_DIRECTORY + "logic/IF.png");
gui_pic = new ResourceLocation(ModPrefab.GUI_DIRECTORY + "logic/IF.png");
break;
}
}
public void drawTask(Minecraft par1Minecraft, int par2, int par3)
{
if (this.drawButton)

View file

@ -271,7 +271,7 @@ public class GuiTaskList extends Gui implements IScroll
vv = 128;
break;
}
FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.TEXTURE_PROCESS);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(GuiTaskList.TEXTURE_PROCESS);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
Vector2 center = new Vector2((x + 35 - (xx / 2)) * sW + (spacingX * j), (y + 25 - (yy / 2)) * sh + (spacingY * i));
this.drawTexturedModalRect(center.intX(), center.intY(), uu, vv, xx, yy);

View file

@ -17,6 +17,7 @@ import dark.assembly.client.model.ModelCrusher;
import dark.assembly.client.model.ModelGrinder;
import dark.assembly.client.model.ModelManipulator;
import dark.assembly.client.model.ModelRejectorPiston;
import dark.assembly.common.ALRecipeLoader;
import dark.assembly.common.AssemblyLine;
import dark.core.prefab.ModPrefab;
@ -34,7 +35,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
@Override
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
{
if (AssemblyLine.recipeLoader.blockConveyorBelt != null && block.blockID == AssemblyLine.recipeLoader.blockConveyorBelt.blockID)
if (ALRecipeLoader.blockConveyorBelt != null && block.blockID == ALRecipeLoader.blockConveyorBelt.blockID)
{
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 1.5F, 0.0F);
@ -43,7 +44,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
modelConveyorBelt.render(0.0625F, 0, false, false, false, false);
GL11.glPopMatrix();
}
else if (AssemblyLine.recipeLoader.blockRejector != null && block.blockID == AssemblyLine.recipeLoader.blockRejector.blockID)
else if (ALRecipeLoader.blockRejector != null && block.blockID == ALRecipeLoader.blockRejector.blockID)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + "rejector.png"));
GL11.glPushMatrix();
@ -54,7 +55,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
modelEjector.renderPiston(0.0625F, 1);
GL11.glPopMatrix();
}
else if (AssemblyLine.recipeLoader.blockManipulator != null && block.blockID == AssemblyLine.recipeLoader.blockManipulator.blockID)
else if (ALRecipeLoader.blockManipulator != null && block.blockID == ALRecipeLoader.blockManipulator.blockID)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + "manipulator1.png"));
GL11.glPushMatrix();
@ -64,7 +65,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
modelInjector.render(0.0625F, true, 0);
GL11.glPopMatrix();
}
else if (AssemblyLine.recipeLoader.blockArmbot != null && block.blockID == AssemblyLine.recipeLoader.blockArmbot.blockID)
else if (ALRecipeLoader.blockArmbot != null && block.blockID == ALRecipeLoader.blockArmbot.blockID)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + RenderArmbot.TEXTURE));
GL11.glPushMatrix();
@ -75,7 +76,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
RenderArmbot.MODEL.render(0.0625F, 0, 0);
GL11.glPopMatrix();
}
else if (AssemblyLine.recipeLoader.processorMachine != null && block.blockID == AssemblyLine.recipeLoader.processorMachine.blockID && metadata == 0)
else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 0)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + "CrusherBlock.png"));
GL11.glPushMatrix();
@ -86,7 +87,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
this.modelCrushor.renderPiston(0.0625f, 4);
GL11.glPopMatrix();
}
else if (AssemblyLine.recipeLoader.processorMachine != null && block.blockID == AssemblyLine.recipeLoader.processorMachine.blockID && metadata == 4)
else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 4)
{
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.instance.DOMAIN, ModPrefab.MODEL_DIRECTORY + "GrinderBlock.png"));
GL11.glPushMatrix();

View file

@ -4,7 +4,6 @@ import java.io.File;
import java.util.Arrays;
import java.util.logging.Logger;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration;
@ -91,8 +90,6 @@ public class AssemblyLine extends ModPrefab
public static boolean REQUIRE_NO_POWER = false;
public static boolean VINALLA_RECIPES = false;
@Override
@EventHandler
public void preInit(FMLPreInitializationEvent event)
@ -117,14 +114,14 @@ public class AssemblyLine extends ModPrefab
recipeLoader.loadRecipes();
//GameRegistry.registerBlock(recipeLoader.blockConveyorBelt, "ConveyorBelt");
GameRegistry.registerBlock(recipeLoader.blockCrate, ItemBlockCrate.class, "Crate");
GameRegistry.registerBlock(recipeLoader.blockManipulator, "Manipulator");
GameRegistry.registerBlock(recipeLoader.blockImprinter, "Imprinter");
GameRegistry.registerBlock(recipeLoader.blockEncoder, "Encoder");
GameRegistry.registerBlock(recipeLoader.blockDetector, "Detector");
GameRegistry.registerBlock(recipeLoader.blockRejector, "Rejector");
GameRegistry.registerBlock(recipeLoader.blockArmbot, "Armbot");
GameRegistry.registerBlock(recipeLoader.blockTurntable, "Turntable");
GameRegistry.registerBlock(ALRecipeLoader.blockCrate, ItemBlockCrate.class, "Crate");
GameRegistry.registerBlock(ALRecipeLoader.blockManipulator, "Manipulator");
GameRegistry.registerBlock(ALRecipeLoader.blockImprinter, "Imprinter");
GameRegistry.registerBlock(ALRecipeLoader.blockEncoder, "Encoder");
GameRegistry.registerBlock(ALRecipeLoader.blockDetector, "Detector");
GameRegistry.registerBlock(ALRecipeLoader.blockRejector, "Rejector");
GameRegistry.registerBlock(ALRecipeLoader.blockArmbot, "Armbot");
GameRegistry.registerBlock(ALRecipeLoader.blockTurntable, "Turntable");
GameRegistry.registerTileEntity(TileEntityConveyorBelt.class, "ALConveyorBelt");
GameRegistry.registerTileEntity(TileEntityRejector.class, "ALSorter");
@ -135,7 +132,7 @@ public class AssemblyLine extends ModPrefab
GameRegistry.registerTileEntity(TileEntityArmbot.class, "ALArmbot");
GameRegistry.registerTileEntity(TileEntityImprinter.class, "ALImprinter");
DMCreativeTab.tabAutomation.setIconItemStack(new ItemStack(recipeLoader.blockConveyorBelt));
DMCreativeTab.tabAutomation.setIconItemStack(new ItemStack(ALRecipeLoader.blockConveyorBelt));
}
@ -147,19 +144,19 @@ public class AssemblyLine extends ModPrefab
recipeLoader = new ALRecipeLoader();
}
CONFIGURATION.load();
recipeLoader.blockConveyorBelt = ModObjectRegistry.createNewBlock("ALBlockConveyor", AssemblyLine.MOD_ID, BlockConveyorBelt.class);
recipeLoader.blockManipulator = new BlockManipulator();
recipeLoader.blockCrate = new BlockCrate();
recipeLoader.blockImprinter = new BlockImprinter();
recipeLoader.blockDetector = new BlockDetector();
recipeLoader.blockRejector = new BlockRejector();
recipeLoader.blockEncoder = new BlockEncoder();
recipeLoader.blockArmbot = new BlockArmbot();
recipeLoader.blockTurntable = new BlockTurntable();
recipeLoader.processorMachine = ModObjectRegistry.createNewBlock("ALBlockProcessor", AssemblyLine.MOD_ID, BlockProcessor.class, ItemBlockHolder.class);
ALRecipeLoader.blockConveyorBelt = ModObjectRegistry.createNewBlock("ALBlockConveyor", AssemblyLine.MOD_ID, BlockConveyorBelt.class);
ALRecipeLoader.blockManipulator = new BlockManipulator();
ALRecipeLoader.blockCrate = new BlockCrate();
ALRecipeLoader.blockImprinter = new BlockImprinter();
ALRecipeLoader.blockDetector = new BlockDetector();
ALRecipeLoader.blockRejector = new BlockRejector();
ALRecipeLoader.blockEncoder = new BlockEncoder();
ALRecipeLoader.blockArmbot = new BlockArmbot();
ALRecipeLoader.blockTurntable = new BlockTurntable();
ALRecipeLoader.processorMachine = ModObjectRegistry.createNewBlock("ALBlockProcessor", AssemblyLine.MOD_ID, BlockProcessor.class, ItemBlockHolder.class);
recipeLoader.itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
recipeLoader.itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());
ALRecipeLoader.itemImprint = new ItemImprinter(CONFIGURATION.getItem("Imprint", ITEM_ID_PREFIX).getInt());
ALRecipeLoader.itemDisk = new ItemDisk(CONFIGURATION.getItem("Disk", ITEM_ID_PREFIX + 1).getInt());
AssemblyLine.VINALLA_RECIPES = CONFIGURATION.get("general", "Vinalla_Recipes", false).getBoolean(false);

View file

@ -30,7 +30,7 @@ import dan200.computer.api.IPeripheral;
import dark.api.al.coding.IArmbot;
import dark.api.al.coding.IProgram;
import dark.api.al.coding.ProgramHelper;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.ALRecipeLoader;
import dark.assembly.common.machine.TileEntityAssembly;
import dark.assembly.common.machine.encoder.ItemDisk;
import dark.core.common.DarkMain;
@ -477,7 +477,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
return itemstack != null && itemstack.itemID == AssemblyLine.recipeLoader.itemDisk.itemID;
return itemstack != null && itemstack.itemID == ALRecipeLoader.itemDisk.itemID;
}
@Override

View file

@ -5,7 +5,7 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.ALRecipeLoader;
import dark.core.prefab.invgui.ISlotWatcher;
import dark.core.prefab.invgui.SlotCraftingResult;
import dark.core.prefab.invgui.SlotRestricted;
@ -32,7 +32,7 @@ public class ContainerImprinter extends Container implements ISlotWatcher
}
// Imprint Input for Imprinting
this.addSlotToContainer(new SlotRestricted(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, new ItemStack(AssemblyLine.recipeLoader.itemImprint)));
this.addSlotToContainer(new SlotRestricted(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, new ItemStack(ALRecipeLoader.itemImprint)));
// Item to be imprinted
this.addSlotToContainer(new WatchedSlot(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START + 1, 92, 34, this));
// Result of Crafting/Imprinting

View file

@ -3,7 +3,6 @@ package dark.assembly.common.machine;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import dark.assembly.common.AssemblyLine;
import dark.core.common.DMCreativeTab;

View file

@ -11,7 +11,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.vector.Vector3;
@ -112,7 +111,8 @@ public class BlockTurntable extends BlockAssembly
else if (Block.blocksList[blockID] instanceof IRotatableBlock)
{
currentDirection = ((IRotatableBlock) Block.blocksList[blockID]).getDirection(world, position.intX(), position.intY(), position.intZ());
}else if(Block.blocksList[blockID] != null)
}
else if (Block.blocksList[blockID] != null)
{
Block.blocksList[blockID].rotateBlock(world, x, y, z, direction.getOpposite());
}

View file

@ -13,7 +13,7 @@ import net.minecraftforge.common.ForgeDirection;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.ALRecipeLoader;
import dark.assembly.common.imprinter.prefab.TileEntityFilterable;
import dark.core.network.PacketHandler;
@ -66,13 +66,13 @@ public class TileEntityDetector extends TileEntityFilterable
if (powerCheck != this.powering)
{
this.powering = powerCheck;
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, ALRecipeLoader.blockDetector.blockID);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, ALRecipeLoader.blockDetector.blockID);
for (int x = this.xCoord - 1; x <= this.xCoord + 1; x++)
{
for (int z = this.zCoord - 1; z <= this.zCoord + 1; z++)
{
this.worldObj.notifyBlocksOfNeighborChange(x, this.yCoord + 1, z, AssemblyLine.recipeLoader.blockDetector.blockID);
this.worldObj.notifyBlocksOfNeighborChange(x, this.yCoord + 1, z, ALRecipeLoader.blockDetector.blockID);
}
}
@ -84,8 +84,8 @@ public class TileEntityDetector extends TileEntityFilterable
@Override
public void invalidate()
{
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, AssemblyLine.recipeLoader.blockDetector.blockID);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord, this.zCoord, ALRecipeLoader.blockDetector.blockID);
this.worldObj.notifyBlocksOfNeighborChange(this.xCoord, this.yCoord + 1, this.zCoord, ALRecipeLoader.blockDetector.blockID);
super.invalidate();
}

View file

@ -17,7 +17,7 @@ import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player;
import dark.api.al.IBelt;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.ALRecipeLoader;
import dark.assembly.common.machine.TileEntityAssembly;
import dark.core.common.DarkMain;
import dark.core.network.PacketHandler;
@ -72,7 +72,7 @@ public class TileEntityConveyorBelt extends TileEntityAssembly implements IBelt,
}
if (this.worldObj.isRemote && this.isFunctioning())
{
if (this.ticks % 10 == 0 && this.worldObj.isRemote && this.worldObj.getBlockId(this.xCoord - 1, this.yCoord, this.zCoord) != AssemblyLine.recipeLoader.blockConveyorBelt.blockID && this.worldObj.getBlockId(xCoord, yCoord, zCoord - 1) != AssemblyLine.recipeLoader.blockConveyorBelt.blockID)
if (this.ticks % 10 == 0 && this.worldObj.isRemote && this.worldObj.getBlockId(this.xCoord - 1, this.yCoord, this.zCoord) != ALRecipeLoader.blockConveyorBelt.blockID && this.worldObj.getBlockId(xCoord, yCoord, zCoord - 1) != ALRecipeLoader.blockConveyorBelt.blockID)
{
this.worldObj.playSound(this.xCoord, this.yCoord, this.zCoord, "mods.assemblyline.conveyor", 0.5f, 0.7f, true);
}

View file

@ -5,7 +5,7 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.ALRecipeLoader;
import dark.core.prefab.invgui.SlotRestricted;
public class ContainerEncoder extends Container
@ -20,7 +20,7 @@ public class ContainerEncoder extends Container
this.tileEntity = encoder;
// Disk
this.addSlotToContainer(new SlotRestricted(encoder, 0, 80, 24 + Y_OFFSET, new ItemStack(AssemblyLine.recipeLoader.itemDisk)));
this.addSlotToContainer(new SlotRestricted(encoder, 0, 80, 24 + Y_OFFSET, new ItemStack(ALRecipeLoader.itemDisk)));
int row;

View file

@ -3,7 +3,7 @@ package dark.assembly.common.machine.encoder;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import dark.assembly.common.AssemblyLine;
import dark.assembly.common.ALRecipeLoader;
public class SlotDisk extends Slot
{
@ -16,7 +16,7 @@ public class SlotDisk extends Slot
@Override
public boolean isItemValid(ItemStack itemStack)
{
return itemStack.itemID == AssemblyLine.recipeLoader.itemDisk.itemID;
return itemStack.itemID == ALRecipeLoader.itemDisk.itemID;
}
}