Added Architect's Table

This commit is contained in:
Henry Mao 2012-11-07 21:10:06 -08:00
parent bde67ef14d
commit ee30aad996
4 changed files with 37 additions and 20 deletions

View file

@ -10,6 +10,7 @@ import cpw.mods.fml.common.network.IGuiHandler;
public class ALCommonProxy implements IGuiHandler
{
public static final int GUI_ARCHITECHT_TABLE = 4;
public void preInit()
{
@ -21,23 +22,6 @@ public class ALCommonProxy implements IGuiHandler
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
if (tileEntity != null)
{
switch (ID)
{
case 0:
return new GuiSorter(player.inventory, ((TileEntityRejector) tileEntity));
}
}
return null;
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
@ -54,4 +38,10 @@ public class ALCommonProxy implements IGuiHandler
return null;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
return null;
}
}

View file

@ -3,6 +3,7 @@ package assemblyline;
import java.io.File;
import net.minecraft.src.Block;
import net.minecraft.src.BlockArchitectTable;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraftforge.common.Configuration;
@ -41,7 +42,7 @@ public class AssemblyLine
@Instance("AssemblyLine")
public static AssemblyLine instance;
public static final String VERSION = "0.1.0";
public static final String VERSION = "0.1.1";
public static final String CHANNEL = "AssemblyLine";
@ -52,6 +53,7 @@ public class AssemblyLine
public static final int BLOCK_ID_PREFIX = 3003;
public static final Block blockConveyorBelt = new BlockConveyorBelt(UEConfig.getBlockConfigID(CONFIGURATION, "Conveyor Belt", BLOCK_ID_PREFIX));
public static final Block blockInteraction = new BlockMulti(UEConfig.getBlockConfigID(CONFIGURATION, "Machine", BLOCK_ID_PREFIX + 1));
public static final Block blockArchitectTable = new BlockArchitectTable(UEConfig.getBlockConfigID(CONFIGURATION, "Architect's Table", BLOCK_ID_PREFIX + 2));
@PreInit
public void preInit(FMLPreInitializationEvent event)
@ -59,6 +61,7 @@ public class AssemblyLine
instance = this;
NetworkRegistry.instance().registerGuiHandler(this, this.proxy);
GameRegistry.registerBlock(blockConveyorBelt);
GameRegistry.registerBlock(blockArchitectTable);
GameRegistry.registerBlock(blockInteraction, ItemBlockMulti.class);
proxy.preInit();
}
@ -74,6 +77,7 @@ public class AssemblyLine
// Add Names
LanguageRegistry.addName(new ItemStack(blockConveyorBelt, 1), "Conveyor Belt");
LanguageRegistry.addName(blockArchitectTable, "Architect's Table");
for (MachineType type : MachineType.values())
{

View file

@ -166,7 +166,7 @@ public class TileEntityManipulator extends TileEntityElectricityReceiver impleme
/**
* Throws the items from the manipulator into
* the world
* the world.
*
* @param outputPosition
* @param items

View file

@ -1,7 +1,11 @@
package assemblyline;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import net.minecraftforge.client.MinecraftForgeClient;
import assemblyline.belts.TileEntityConveyorBelt;
import assemblyline.gui.GuiSorter;
import assemblyline.machines.TileEntityManipulator;
import assemblyline.machines.TileEntityRejector;
import assemblyline.render.RenderConveyorBelt;
@ -30,4 +34,23 @@ public class ALClientProxy extends ALCommonProxy
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityManipulator.class, new RenderManipulator());
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
if (tileEntity != null)
{
switch (ID)
{
case 0:
return new GuiSorter(player.inventory, ((TileEntityRejector) tileEntity));
case GUI_ARCHITECHT_TABLE:
return null;
}
}
return null;
}
}