Setting up for merge with RI

This commit is contained in:
DarkGuardsman 2014-01-08 07:07:26 -05:00
parent ef6a38c578
commit 7e9a6fb510
78 changed files with 503 additions and 184 deletions

View file

@ -16,6 +16,10 @@ import net.minecraftforge.oredict.OreDictionary;
import org.modstats.ModstatInfo; import org.modstats.ModstatInfo;
import org.modstats.Modstats; import org.modstats.Modstats;
import calclavia.lib.network.PacketHandler;
import calclavia.lib.ore.OreGenReplaceStone;
import calclavia.lib.ore.OreGenerator;
import com.builtbroken.assemblyline.api.coding.TaskRegistry; import com.builtbroken.assemblyline.api.coding.TaskRegistry;
import com.builtbroken.assemblyline.armbot.BlockArmbot; import com.builtbroken.assemblyline.armbot.BlockArmbot;
import com.builtbroken.assemblyline.armbot.command.TaskBreak; import com.builtbroken.assemblyline.armbot.command.TaskBreak;
@ -49,6 +53,7 @@ import com.builtbroken.assemblyline.entities.EntityFarmEgg;
import com.builtbroken.assemblyline.entities.EnumBird; import com.builtbroken.assemblyline.entities.EnumBird;
import com.builtbroken.assemblyline.entities.prefab.EntityTestCar; import com.builtbroken.assemblyline.entities.prefab.EntityTestCar;
import com.builtbroken.assemblyline.entities.prefab.ItemVehicleSpawn; import com.builtbroken.assemblyline.entities.prefab.ItemVehicleSpawn;
import com.builtbroken.assemblyline.fluid.EnumGas;
import com.builtbroken.assemblyline.fluid.pipes.BlockPipe; import com.builtbroken.assemblyline.fluid.pipes.BlockPipe;
import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial;
import com.builtbroken.assemblyline.fluid.pipes.ItemBlockPipe; import com.builtbroken.assemblyline.fluid.pipes.ItemBlockPipe;
@ -88,6 +93,7 @@ import com.builtbroken.assemblyline.machine.belt.BlockConveyorBelt;
import com.builtbroken.assemblyline.machine.encoder.BlockEncoder; import com.builtbroken.assemblyline.machine.encoder.BlockEncoder;
import com.builtbroken.assemblyline.machine.encoder.ItemDisk; import com.builtbroken.assemblyline.machine.encoder.ItemDisk;
import com.builtbroken.assemblyline.machine.processor.BlockProcessor; import com.builtbroken.assemblyline.machine.processor.BlockProcessor;
import com.builtbroken.assemblyline.network.PacketIDTile;
import com.builtbroken.assemblyline.redstone.BlockAdvancedHopper; import com.builtbroken.assemblyline.redstone.BlockAdvancedHopper;
import com.builtbroken.assemblyline.transmit.BlockWire; import com.builtbroken.assemblyline.transmit.BlockWire;
import com.builtbroken.assemblyline.transmit.ItemBlockWire; import com.builtbroken.assemblyline.transmit.ItemBlockWire;
@ -95,12 +101,13 @@ import com.builtbroken.minecraft.CoreRegistry;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.EnumMaterial; import com.builtbroken.minecraft.EnumMaterial;
import com.builtbroken.minecraft.EnumOrePart; import com.builtbroken.minecraft.EnumOrePart;
import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.LaserEntityDamageSource;
import com.builtbroken.minecraft.TranslationHelper; import com.builtbroken.minecraft.TranslationHelper;
import com.builtbroken.minecraft.fluid.EnumGas; import com.builtbroken.minecraft.helpers.PlayerKeyHandler;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.ItemBlockHolder; import com.builtbroken.minecraft.prefab.ItemBlockHolder;
import com.builtbroken.minecraft.worldgen.OreGenReplaceStone; import com.builtbroken.minecraft.save.SaveManager;
import com.builtbroken.minecraft.worldgen.OreGenerator; import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler;
import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Loader;
@ -117,12 +124,20 @@ import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
@ModstatInfo(prefix = "asmline") @ModstatInfo(prefix = "asmline")
@Mod(modid = AssemblyLine.MOD_ID, name = AssemblyLine.MOD_NAME, version = AssemblyLine.VERSION, useMetadata = true) @Mod(modid = AssemblyLine.MOD_ID, name = AssemblyLine.MOD_NAME, version = AssemblyLine.VERSION, useMetadata = true)
@NetworkMod(channels = { DarkCore.CHANNEL }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class) @NetworkMod(channels = { AssemblyLine.CHANNEL }, clientSideRequired = true, serverSideRequired = false, packetHandler = PacketHandler.class)
public class AssemblyLine public class AssemblyLine
{ {
public static final String TEXTURE_DIRECTORY = "textures/";
public static final String BLOCK_DIRECTORY = TEXTURE_DIRECTORY + "blocks/";
public static final String ITEM_DIRECTORY = TEXTURE_DIRECTORY + "items/";
public static final String MODEL_DIRECTORY = TEXTURE_DIRECTORY + "models/";
public static final String GUI_DIRECTORY = TEXTURE_DIRECTORY + "gui/";
public static final String CHANNEL = "ALChannel";
public static final String MAJOR_VERSION = "@MAJOR@"; public static final String MAJOR_VERSION = "@MAJOR@";
public static final String MINOR_VERSION = "@MINOR@"; public static final String MINOR_VERSION = "@MINOR@";
@ -160,6 +175,17 @@ public class AssemblyLine
public static int entitiesIds = 60; public static int entitiesIds = 60;
private static PacketIDTile tilePacket;
public static PacketIDTile getTilePacket()
{
if (tilePacket == null)
{
tilePacket = new PacketIDTile(AssemblyLine.CHANNEL);
}
return tilePacket;
}
@EventHandler @EventHandler
public void preInit(FMLPreInitializationEvent event) public void preInit(FMLPreInitializationEvent event)
{ {
@ -169,6 +195,11 @@ public class AssemblyLine
DarkCore.instance().preLoad(); DarkCore.instance().preLoad();
Modstats.instance().getReporter().registerMod(this); Modstats.instance().getReporter().registerMod(this);
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(new FluidHelper());
MinecraftForge.EVENT_BUS.register(SaveManager.instance());
TickRegistry.registerTickHandler(NetworkUpdateHandler.instance(), Side.SERVER);
TickRegistry.registerScheduledTickHandler(new PlayerKeyHandler(AssemblyLine.CHANNEL), Side.CLIENT);
MinecraftForge.EVENT_BUS.register(new LaserEntityDamageSource(null));
NetworkRegistry.instance().registerGuiHandler(this, proxy); NetworkRegistry.instance().registerGuiHandler(this, proxy);
TaskRegistry.registerCommand(new TaskDrop()); TaskRegistry.registerCommand(new TaskDrop());

View file

@ -11,8 +11,10 @@ import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.api.IArmbot; import com.builtbroken.assemblyline.api.IArmbot;
import com.builtbroken.assemblyline.api.coding.IProgram; import com.builtbroken.assemblyline.api.coding.IProgram;
import com.builtbroken.assemblyline.api.coding.ProgramHelper; import com.builtbroken.assemblyline.api.coding.ProgramHelper;
@ -29,7 +31,6 @@ import com.builtbroken.minecraft.helpers.HelperMethods;
import com.builtbroken.minecraft.helpers.MathHelper; import com.builtbroken.minecraft.helpers.MathHelper;
import com.builtbroken.minecraft.interfaces.IBlockActivated; import com.builtbroken.minecraft.interfaces.IBlockActivated;
import com.builtbroken.minecraft.interfaces.IMultiBlock; import com.builtbroken.minecraft.interfaces.IMultiBlock;
import com.builtbroken.minecraft.network.PacketHandler;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLCommonHandler;
@ -108,7 +109,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
this.programHelper.onUpdate(this.worldObj, new Vector3(this)); this.programHelper.onUpdate(this.worldObj, new Vector3(this));
if (this.targetYaw != preYaw || this.targetPitch != prePitch) if (this.targetYaw != preYaw || this.targetPitch != prePitch)
{ {
PacketHandler.instance().sendPacketToClients(this.getDescriptionPacket(), worldObj, new Vector3(this).translate(new Vector3(.5f, 1f, .5f)), 64); PacketHandler.sendPacketToClients(this.getDescriptionPacket(), worldObj, new Vector3(this).translate(new Vector3(.5f, 1f, .5f)), 64);
} }
} }
this.updateRotation(); this.updateRotation();
@ -299,18 +300,18 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
@Override @Override
public Packet getDescriptionPacket() public Packet getDescriptionPacket()
{ {
return PacketHandler.instance().getTilePacket(this.getChannel(), "armbot", this, this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch); return AssemblyLine.getTilePacket().getPacket(this, "armbot", this.functioning, this.targetYaw, this.targetPitch, this.actualYaw, this.actualPitch);
} }
public void sendGrabItemToClient() public void sendGrabItemToClient()
{ {
if (this.grabbedObject instanceof ItemStack) if (this.grabbedObject instanceof ItemStack)
{ {
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(this.getChannel(), "armbotItem", this, true, ((ItemStack) this.grabbedObject).writeToNBT(new NBTTagCompound())), worldObj, new Vector3(this), 64); PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "armbotItem", true, ((ItemStack) this.grabbedObject).writeToNBT(new NBTTagCompound())), worldObj, new Vector3(this), 64);
} }
else else
{ {
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(this.getChannel(), "armbotItem", this, false), worldObj, new Vector3(this), 64); PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "armbotItem", false), worldObj, new Vector3(this), 64);
} }
} }
@ -334,7 +335,7 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
{ {
if (dis.readBoolean()) if (dis.readBoolean())
{ {
this.grabbedObject = ItemStack.loadItemStackFromNBT(PacketHandler.instance().readNBTTagCompound(dis)); this.grabbedObject = ItemStack.loadItemStackFromNBT(PacketHandler.readNBTTagCompound(dis));
} }
else else
{ {
@ -537,5 +538,4 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
{ {
return this.location; return this.location;
} }
} }

View file

@ -23,8 +23,8 @@ import universalelectricity.api.vector.Vector3;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.IndustryTabs; import com.builtbroken.assemblyline.IndustryTabs;
import com.builtbroken.assemblyline.fluid.EnumGas;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.fluid.EnumGas;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;

View file

@ -14,6 +14,7 @@ import net.minecraft.util.Icon;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import calclavia.lib.ore.OreGenReplaceStone;
import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
@ -21,7 +22,6 @@ import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.EnumMaterial; import com.builtbroken.minecraft.EnumMaterial;
import com.builtbroken.minecraft.IExtraInfo.IExtraBlockInfo; import com.builtbroken.minecraft.IExtraInfo.IExtraBlockInfo;
import com.builtbroken.minecraft.worldgen.OreGenReplaceStone;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;

View file

@ -13,7 +13,6 @@ import universalelectricity.api.energy.UnitDisplay.Unit;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.machine.ContainerBatteryBox; import com.builtbroken.assemblyline.machine.ContainerBatteryBox;
import com.builtbroken.assemblyline.machine.TileEntityBatteryBox; import com.builtbroken.assemblyline.machine.TileEntityBatteryBox;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -21,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiBatteryBox extends GuiContainer public class GuiBatteryBox extends GuiContainer
{ {
private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "battery_box.png"); private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "battery_box.png");
private TileEntityBatteryBox tileEntity; private TileEntityBatteryBox tileEntity;

View file

@ -13,7 +13,6 @@ import universalelectricity.api.vector.Vector2;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.api.coding.ITask; import com.builtbroken.assemblyline.api.coding.ITask;
import com.builtbroken.assemblyline.api.coding.args.ArgumentData; import com.builtbroken.assemblyline.api.coding.args.ArgumentData;
import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.prefab.invgui.GuiBase; import com.builtbroken.minecraft.prefab.invgui.GuiBase;
import com.builtbroken.minecraft.prefab.invgui.GuiMessageBox; import com.builtbroken.minecraft.prefab.invgui.GuiMessageBox;
import com.builtbroken.minecraft.prefab.invgui.IMessageBoxDialog; import com.builtbroken.minecraft.prefab.invgui.IMessageBoxDialog;
@ -23,7 +22,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
public class GuiEditTask extends GuiBase implements IMessageBoxDialog public class GuiEditTask extends GuiBase implements IMessageBoxDialog
{ {
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_task_edit.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_task_edit.png");
protected GuiEncoderCoder gui; protected GuiEncoderCoder gui;
protected ITask task, editTask; protected ITask task, editTask;

View file

@ -5,11 +5,10 @@ import net.minecraft.util.ResourceLocation;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.machine.encoder.TileEntityEncoder; import com.builtbroken.assemblyline.machine.encoder.TileEntityEncoder;
import com.builtbroken.minecraft.DarkCore;
public class GuiEncoderHelp extends GuiEncoderBase public class GuiEncoderHelp extends GuiEncoderBase
{ {
public static final ResourceLocation TEXTURE_CODE_BACK = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_encoder_coder.png"); public static final ResourceLocation TEXTURE_CODE_BACK = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_encoder_coder.png");
public GuiEncoderHelp(InventoryPlayer player, TileEntityEncoder tileEntity) public GuiEncoderHelp(InventoryPlayer player, TileEntityEncoder tileEntity)
{ {

View file

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.machine.encoder.ContainerEncoder; import com.builtbroken.assemblyline.machine.encoder.ContainerEncoder;
import com.builtbroken.assemblyline.machine.encoder.TileEntityEncoder; import com.builtbroken.assemblyline.machine.encoder.TileEntityEncoder;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -17,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiEncoderInventory extends GuiEncoderBase public class GuiEncoderInventory extends GuiEncoderBase
{ {
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_encoder_slot.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_encoder_slot.png");
public GuiEncoderInventory(InventoryPlayer inventoryPlayer, TileEntityEncoder tileEntity) public GuiEncoderInventory(InventoryPlayer inventoryPlayer, TileEntityEncoder tileEntity)
{ {

View file

@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.imprinter.ContainerImprinter; import com.builtbroken.assemblyline.imprinter.ContainerImprinter;
import com.builtbroken.assemblyline.imprinter.TileEntityImprinter; import com.builtbroken.assemblyline.imprinter.TileEntityImprinter;
import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.TranslationHelper; import com.builtbroken.minecraft.TranslationHelper;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -42,7 +41,7 @@ public class GuiImprinter extends GuiContainer
@Override @Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
{ {
this.mc.renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.GUI_DIRECTORY + "gui_imprinter.png")); this.mc.renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.GUI_DIRECTORY + "gui_imprinter.png"));
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.containerWidth = (this.width - this.xSize) / 2; this.containerWidth = (this.width - this.xSize) / 2;
this.containerHeight = (this.height - this.ySize) / 2; this.containerHeight = (this.height - this.ySize) / 2;

View file

@ -1,19 +0,0 @@
package com.builtbroken.assemblyline.client.gui;
import net.minecraft.entity.player.EntityPlayer;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.minecraft.prefab.TileEntityMachine;
import com.builtbroken.minecraft.prefab.invgui.GuiMachineBase;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class GuiManipulator extends GuiMachineBase
{
public GuiManipulator(EntityPlayer player, TileEntityMachine tileEntity)
{
super(AssemblyLine.instance, player, tileEntity);
}
}

View file

@ -10,7 +10,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.machine.processor.ContainerProcessor; import com.builtbroken.assemblyline.machine.processor.ContainerProcessor;
import com.builtbroken.assemblyline.machine.processor.TileEntityProcessor; import com.builtbroken.assemblyline.machine.processor.TileEntityProcessor;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -18,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class GuiProcessor extends GuiContainer public class GuiProcessor extends GuiContainer
{ {
private static final ResourceLocation gui_texture = new ResourceLocation(AssemblyLine.instance.PREFIX + DarkCore.GUI_DIRECTORY + "processor.png"); private static final ResourceLocation gui_texture = new ResourceLocation(AssemblyLine.instance.PREFIX + AssemblyLine.GUI_DIRECTORY + "processor.png");
private TileEntityProcessor tileEntity; private TileEntityProcessor tileEntity;
public GuiProcessor(InventoryPlayer par1InventoryPlayer, TileEntityProcessor par2TileEntityFurnace) public GuiProcessor(InventoryPlayer par1InventoryPlayer, TileEntityProcessor par2TileEntityFurnace)

View file

@ -7,9 +7,9 @@ import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.api.coding.IRedirectTask; import com.builtbroken.assemblyline.api.coding.IRedirectTask;
import com.builtbroken.assemblyline.api.coding.ITask; import com.builtbroken.assemblyline.api.coding.ITask;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -18,7 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class GuiTask extends Gui public class GuiTask extends Gui
{ {
boolean isLeft = false; boolean isLeft = false;
private ResourceLocation gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "gui@.png"); private ResourceLocation gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "gui@.png");
/** Button width in pixels */ /** Button width in pixels */
protected int width; protected int width;
@ -54,16 +54,16 @@ public class GuiTask extends Gui
switch (task.getType()) switch (task.getType())
{ {
case DATA: case DATA:
gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/DATA.png"); gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/DATA.png");
break; break;
case PROCESS: case PROCESS:
gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/PROCESS.png"); gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/PROCESS.png");
break; break;
case DEFINEDPROCESS: case DEFINEDPROCESS:
gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/DEFINEDPROCESS.png"); gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/DEFINEDPROCESS.png");
break; break;
case DECISION: case DECISION:
gui_pic = new ResourceLocation(DarkCore.GUI_DIRECTORY + "logic/IF.png"); gui_pic = new ResourceLocation(AssemblyLine.GUI_DIRECTORY + "logic/IF.png");
break; break;
} }
} }

View file

@ -14,7 +14,6 @@ import com.builtbroken.assemblyline.client.model.ModelGearRod;
import com.builtbroken.assemblyline.client.model.ModelGenerator; import com.builtbroken.assemblyline.client.model.ModelGenerator;
import com.builtbroken.assemblyline.client.model.ModelPump; import com.builtbroken.assemblyline.client.model.ModelPump;
import com.builtbroken.assemblyline.client.model.ModelSink; import com.builtbroken.assemblyline.client.model.ModelSink;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
@ -42,7 +41,7 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler
GL11.glTranslatef(0.0F, 1.1F, 0.0F); GL11.glTranslatef(0.0F, 1.1F, 0.0F);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pumps/WaterPump.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pumps/WaterPump.png"));
modelPump.render(0.0725F); modelPump.render(0.0725F);
modelPump.renderMotion(0.0725F, 0); modelPump.renderMotion(0.0725F, 0);
} }
@ -50,21 +49,21 @@ public class BlockRenderHelper implements ISimpleBlockRenderingHandler
{ {
GL11.glTranslatef(0.0F, .8F, 0.0F); GL11.glTranslatef(0.0F, .8F, 0.0F);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Sink.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Sink.png"));
sink.render(0.0565F); sink.render(0.0565F);
} }
else if (ALRecipeLoader.blockRod != null && block.blockID == ALRecipeLoader.blockRod.blockID) else if (ALRecipeLoader.blockRod != null && block.blockID == ALRecipeLoader.blockRod.blockID)
{ {
GL11.glTranslatef(0.0F, 1.5F, 0.0F); GL11.glTranslatef(0.0F, 1.5F, 0.0F);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "mechanical/GearRod.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "mechanical/GearRod.png"));
modelRod.render(0.0825F, 0); modelRod.render(0.0825F, 0);
} }
else if (ALRecipeLoader.blockConPump != null && block.blockID == ALRecipeLoader.blockConPump.blockID && metadata < 4) else if (ALRecipeLoader.blockConPump != null && block.blockID == ALRecipeLoader.blockConPump.blockID && metadata < 4)
{ {
GL11.glTranslatef(0.0F, 1.2F, 0.0F); GL11.glTranslatef(0.0F, 1.2F, 0.0F);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ConstructionPump.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ConstructionPump.png"));
conPump.render(0.0725F); conPump.render(0.0725F);
conPump.renderMotor(0.0725F); conPump.renderMotor(0.0725F);

View file

@ -17,7 +17,6 @@ import com.builtbroken.assemblyline.client.model.ModelManipulator;
import com.builtbroken.assemblyline.client.model.ModelRejectorPiston; import com.builtbroken.assemblyline.client.model.ModelRejectorPiston;
import com.builtbroken.assemblyline.client.model.ModelSolarPanel; import com.builtbroken.assemblyline.client.model.ModelSolarPanel;
import com.builtbroken.assemblyline.redstone.BlockAdvancedHopper; import com.builtbroken.assemblyline.redstone.BlockAdvancedHopper;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
@ -45,13 +44,13 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 1.5F, 0.0F); GL11.glTranslatef(0.0F, 1.5F, 0.0F);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "belt/frame0.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "belt/frame0.png"));
modelConveyorBelt.render(0.0625F, 0, false, false, false, false); modelConveyorBelt.render(0.0625F, 0, false, false, false, false);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }
else if (ALRecipeLoader.blockRejector != null && block.blockID == ALRecipeLoader.blockRejector.blockID) else if (ALRecipeLoader.blockRejector != null && block.blockID == ALRecipeLoader.blockRejector.blockID)
{ {
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "rejector.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "rejector.png"));
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0.6F, 1.5F, 0.6F); GL11.glTranslatef(0.6F, 1.5F, 0.6F);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
@ -62,7 +61,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
} }
else if (ALRecipeLoader.blockManipulator != null && block.blockID == ALRecipeLoader.blockManipulator.blockID) else if (ALRecipeLoader.blockManipulator != null && block.blockID == ALRecipeLoader.blockManipulator.blockID)
{ {
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "manipulator1.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator1.png"));
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0.6F, 1.5F, 0.6F); GL11.glTranslatef(0.6F, 1.5F, 0.6F);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
@ -72,7 +71,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
} }
else if (ALRecipeLoader.blockArmbot != null && block.blockID == ALRecipeLoader.blockArmbot.blockID) else if (ALRecipeLoader.blockArmbot != null && block.blockID == ALRecipeLoader.blockArmbot.blockID)
{ {
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + RenderArmbot.TEXTURE)); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + RenderArmbot.TEXTURE));
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0.4f, 0.8f, 0f); GL11.glTranslatef(0.4f, 0.8f, 0f);
GL11.glScalef(0.7f, 0.7f, 0.7f); GL11.glScalef(0.7f, 0.7f, 0.7f);
@ -83,7 +82,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
} }
else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 0) else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 0)
{ {
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "CrusherBlock.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "CrusherBlock.png"));
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0f, 1f, 0f); GL11.glTranslatef(0f, 1f, 0f);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);
@ -94,7 +93,7 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler
} }
else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 4) else if (ALRecipeLoader.processorMachine != null && block.blockID == ALRecipeLoader.processorMachine.blockID && metadata == 4)
{ {
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "GrinderBlock.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "GrinderBlock.png"));
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef(0f, 1f, 0f); GL11.glTranslatef(0f, 1f, 0f);
GL11.glRotatef(180f, 0f, 0f, 1f); GL11.glRotatef(180f, 0f, 0f, 1f);

View file

@ -10,7 +10,6 @@ import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelReleaseValve; import com.builtbroken.assemblyline.client.model.ModelReleaseValve;
import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -70,7 +69,7 @@ public class ItemPipeRenderer implements IItemRenderer
} }
if (ALRecipeLoader.blockReleaseValve != null && item.itemID == ALRecipeLoader.blockReleaseValve.blockID) if (ALRecipeLoader.blockReleaseValve != null && item.itemID == ALRecipeLoader.blockReleaseValve.blockID)
{ {
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ReleaseValve.png")); FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ReleaseValve.png"));
valve.render(); valve.render();
} }
GL11.glPopMatrix(); GL11.glPopMatrix();

View file

@ -12,7 +12,6 @@ import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelSmallFluidCan; import com.builtbroken.assemblyline.client.model.ModelSmallFluidCan;
import com.builtbroken.assemblyline.machine.ItemFluidCan; import com.builtbroken.assemblyline.machine.ItemFluidCan;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -23,7 +22,7 @@ public class ItemRenderFluidCan implements IItemRenderer
{ {
public static final ModelSmallFluidCan CAN_MODEL = new ModelSmallFluidCan(); public static final ModelSmallFluidCan CAN_MODEL = new ModelSmallFluidCan();
public static final ResourceLocation CAN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "FluidCanA.png"); public static final ResourceLocation CAN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "FluidCanA.png");
@Override @Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) public boolean handleRenderType(ItemStack item, ItemRenderType type)

View file

@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelAdvancedHopper; import com.builtbroken.assemblyline.client.model.ModelAdvancedHopper;
import com.builtbroken.assemblyline.redstone.TileEntityAdvancedHopper; import com.builtbroken.assemblyline.redstone.TileEntityAdvancedHopper;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -18,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class RenderAdvancedHopper extends RenderImprintable public class RenderAdvancedHopper extends RenderImprintable
{ {
private static final ModelAdvancedHopper MODEL = new ModelAdvancedHopper(); private static final ModelAdvancedHopper MODEL = new ModelAdvancedHopper();
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.instance.DOMAIN, DarkCore.MODEL_DIRECTORY + "AdvancedHopper.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.instance.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "AdvancedHopper.png");
private void renderAModelAt(TileEntityAdvancedHopper tileEntity, double x, double y, double z, float f) private void renderAModelAt(TileEntityAdvancedHopper tileEntity, double x, double y, double z, float f)
{ {

View file

@ -19,7 +19,6 @@ import universalelectricity.api.vector.Vector3;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.armbot.TileEntityArmbot; import com.builtbroken.assemblyline.armbot.TileEntityArmbot;
import com.builtbroken.assemblyline.client.model.ModelArmbot; import com.builtbroken.assemblyline.client.model.ModelArmbot;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -49,7 +48,7 @@ public class RenderArmbot extends TileEntitySpecialRenderer
} }
} }
} }
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + TEXTURE); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + TEXTURE);
bindTexture(name); bindTexture(name);
GL11.glPushMatrix(); GL11.glPushMatrix();

View file

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelSolarPanel; import com.builtbroken.assemblyline.client.model.ModelSolarPanel;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -16,7 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderBlockSolarPanel extends TileEntitySpecialRenderer public class RenderBlockSolarPanel extends TileEntitySpecialRenderer
{ {
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "SolarPanel.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "SolarPanel.png");
public static final ModelSolarPanel model = new ModelSolarPanel(); public static final ModelSolarPanel model = new ModelSolarPanel();

View file

@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelConstructionPump; import com.builtbroken.assemblyline.client.model.ModelConstructionPump;
import com.builtbroken.assemblyline.fluid.pump.TileEntityConstructionPump; import com.builtbroken.assemblyline.fluid.pump.TileEntityConstructionPump;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -19,7 +18,7 @@ public class RenderConstructionPump extends TileEntitySpecialRenderer
{ {
int type = 0; int type = 0;
private ModelConstructionPump model; private ModelConstructionPump model;
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ConstructionPump.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ConstructionPump.png");
public RenderConstructionPump() public RenderConstructionPump()
{ {

View file

@ -11,7 +11,6 @@ import com.builtbroken.assemblyline.client.model.ModelAngledBelt;
import com.builtbroken.assemblyline.client.model.ModelConveyorBelt; import com.builtbroken.assemblyline.client.model.ModelConveyorBelt;
import com.builtbroken.assemblyline.machine.belt.TileEntityConveyorBelt; import com.builtbroken.assemblyline.machine.belt.TileEntityConveyorBelt;
import com.builtbroken.assemblyline.machine.belt.TileEntityConveyorBelt.SlantType; import com.builtbroken.assemblyline.machine.belt.TileEntityConveyorBelt.SlantType;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -53,7 +52,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer
if (slantType == SlantType.UP) if (slantType == SlantType.UP)
{ {
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png"); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png");
bindTexture(name); bindTexture(name);
GL11.glTranslatef(0f, 0.8f, -0.8f); GL11.glTranslatef(0f, 0.8f, -0.8f);
@ -75,7 +74,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer
} }
else if (slantType == SlantType.DOWN) else if (slantType == SlantType.DOWN)
{ {
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png"); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "slantedbelt/frame" + frame + ".png");
bindTexture(name); bindTexture(name);
GL11.glRotatef(180f, 0f, 1f, 0f); GL11.glRotatef(180f, 0f, 1f, 0f);
boolean slantAdjust = false; boolean slantAdjust = false;
@ -96,7 +95,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer
} }
else else
{ {
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "belt/frame" + frame + ".png"); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "belt/frame" + frame + ".png");
bindTexture(name); bindTexture(name);
GL11.glRotatef(180, 0f, 1f, 0f); GL11.glRotatef(180, 0f, 1f, 0f);
GL11.glTranslatef(0f, -0.68f, 0f); GL11.glTranslatef(0f, -0.68f, 0f);
@ -120,7 +119,7 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer
GL11.glRotatef(90f, 0f, 1f, 0f); GL11.glRotatef(90f, 0f, 1f, 0f);
break; break;
} }
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "belt/frame" + frame + ".png"); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "belt/frame" + frame + ".png");
bindTexture(name); bindTexture(name);
MODEL.render(0.0625F, (float) Math.toRadians(tileEntity.wheelRotation), false, false, false, true); MODEL.render(0.0625F, (float) Math.toRadians(tileEntity.wheelRotation), false, false, false, true);

View file

@ -8,14 +8,13 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelFrackingPipe; import com.builtbroken.assemblyline.client.model.ModelFrackingPipe;
import com.builtbroken.minecraft.DarkCore;
/** @author Archadia */ /** @author Archadia */
public class RenderFrackingPipe extends TileEntitySpecialRenderer public class RenderFrackingPipe extends TileEntitySpecialRenderer
{ {
public static final ModelFrackingPipe model = new ModelFrackingPipe(); public static final ModelFrackingPipe model = new ModelFrackingPipe();
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "frackingpipe.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "frackingpipe.png");
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f)

View file

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelFurnace; import com.builtbroken.assemblyline.client.model.ModelFurnace;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -18,7 +17,7 @@ public class RenderFurnace extends TileEntitySpecialRenderer
{ {
int type = 0; int type = 0;
private ModelFurnace model; private ModelFurnace model;
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Furnace.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Furnace.png");
public RenderFurnace() public RenderFurnace()
{ {

View file

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelGearPiston; import com.builtbroken.assemblyline.client.model.ModelGearPiston;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -17,7 +16,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class RenderGearPiston extends TileEntitySpecialRenderer public class RenderGearPiston extends TileEntitySpecialRenderer
{ {
private ModelGearPiston model; private ModelGearPiston model;
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "GearShaftPiston.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "GearShaftPiston.png");
public RenderGearPiston() public RenderGearPiston()
{ {

View file

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelManipulator; import com.builtbroken.assemblyline.client.model.ModelManipulator;
import com.builtbroken.assemblyline.machine.TileEntityManipulator; import com.builtbroken.assemblyline.machine.TileEntityManipulator;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -28,12 +27,12 @@ public class RenderManipulator extends RenderImprintable
if (tileEntity.isOutput()) if (tileEntity.isOutput())
{ {
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "manipulator1.png"); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator1.png");
bindTexture(name); bindTexture(name);
} }
else else
{ {
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "manipulator2.png"); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "manipulator2.png");
bindTexture(name); bindTexture(name);
} }

View file

@ -9,14 +9,13 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelLaserTile; import com.builtbroken.assemblyline.client.model.ModelLaserTile;
import com.builtbroken.assemblyline.machine.TileLaserSentry; import com.builtbroken.assemblyline.machine.TileLaserSentry;
import com.builtbroken.minecraft.DarkCore;
/** @author Darkguardsman */ /** @author Darkguardsman */
public class RenderMiningLaser extends TileEntitySpecialRenderer public class RenderMiningLaser extends TileEntitySpecialRenderer
{ {
public static final ModelLaserTile model = new ModelLaserTile(); public static final ModelLaserTile model = new ModelLaserTile();
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "LaserTile.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "LaserTile.png");
@Override @Override
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f) public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float f)

View file

@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelMiningLaserGun; import com.builtbroken.assemblyline.client.model.ModelMiningLaserGun;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -20,7 +19,7 @@ public class RenderMiningLaserGun implements IItemRenderer
{ {
private static final ModelMiningLaserGun MODEL = new ModelMiningLaserGun(); private static final ModelMiningLaserGun MODEL = new ModelMiningLaserGun();
private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "LaserGun.png"); private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "LaserGun.png");
@Override @Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) public boolean handleRenderType(ItemStack item, ItemRenderType type)

View file

@ -16,7 +16,6 @@ import com.builtbroken.assemblyline.fluid.pipes.EnumPipeType;
import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial;
import com.builtbroken.assemblyline.fluid.pipes.TileEntityPipe; import com.builtbroken.assemblyline.fluid.pipes.TileEntityPipe;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -27,7 +26,7 @@ public class RenderPipe extends TileEntitySpecialRenderer
public static ModelLargePipe MODEL_PIPE = new ModelLargePipe(); public static ModelLargePipe MODEL_PIPE = new ModelLargePipe();
public static ModelOpenTrough MODEL_TROUGH_PIPE = new ModelOpenTrough(); public static ModelOpenTrough MODEL_TROUGH_PIPE = new ModelOpenTrough();
private static HashMap<Pair<FluidPartsMaterial, Integer>, ResourceLocation> TEXTURES = new HashMap<Pair<FluidPartsMaterial, Integer>, ResourceLocation>(); private static HashMap<Pair<FluidPartsMaterial, Integer>, ResourceLocation> TEXTURES = new HashMap<Pair<FluidPartsMaterial, Integer>, ResourceLocation>();
public static ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pipes/Pipe.png"); public static ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pipes/Pipe.png");
@Override @Override
public void renderTileEntityAt(TileEntity te, double d, double d1, double d2, float f) public void renderTileEntityAt(TileEntity te, double d, double d1, double d2, float f)
@ -168,7 +167,7 @@ public class RenderPipe extends TileEntitySpecialRenderer
{ {
pipeName = EnumPipeType.get(pipeID).getName(pipeID); pipeName = EnumPipeType.get(pipeID).getName(pipeID);
} }
TEXTURES.put(index, new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pipes/" + mat.matName + "/" + pipeName + "Pipe.png")); TEXTURES.put(index, new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pipes/" + mat.matName + "/" + pipeName + "Pipe.png"));
} }
return TEXTURES.get(index); return TEXTURES.get(index);
} }

View file

@ -11,7 +11,6 @@ import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelCrusher; import com.builtbroken.assemblyline.client.model.ModelCrusher;
import com.builtbroken.assemblyline.client.model.ModelGrinder; import com.builtbroken.assemblyline.client.model.ModelGrinder;
import com.builtbroken.assemblyline.machine.processor.TileEntityProcessor; import com.builtbroken.assemblyline.machine.processor.TileEntityProcessor;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -81,11 +80,11 @@ public class RenderProcessor extends TileEntitySpecialRenderer
int g = meta / 4; int g = meta / 4;
if (g == 0) if (g == 0)
{ {
return new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "CrusherBlock.png"); return new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "CrusherBlock.png");
} }
else if (g == 1) else if (g == 1)
{ {
return new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "GrinderBlock.png"); return new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "GrinderBlock.png");
} }
return null; return null;

View file

@ -9,7 +9,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelPump; import com.builtbroken.assemblyline.client.model.ModelPump;
import com.builtbroken.assemblyline.fluid.pump.TileEntityStarterPump; import com.builtbroken.assemblyline.fluid.pump.TileEntityStarterPump;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -19,7 +18,7 @@ public class RenderPump extends TileEntitySpecialRenderer
{ {
int type = 0; int type = 0;
private ModelPump model; private ModelPump model;
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "pumps/WaterPump.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "pumps/WaterPump.png");
public RenderPump() public RenderPump()
{ {

View file

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelRejectorPiston; import com.builtbroken.assemblyline.client.model.ModelRejectorPiston;
import com.builtbroken.assemblyline.machine.TileEntityRejector; import com.builtbroken.assemblyline.machine.TileEntityRejector;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -28,7 +27,7 @@ public class RenderRejector extends RenderImprintable
{ {
pos = 8; pos = 8;
} }
ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "rejector.png"); ResourceLocation name = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "rejector.png");
bindTexture(name); bindTexture(name);
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);

View file

@ -10,7 +10,6 @@ import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelLargePipe; import com.builtbroken.assemblyline.client.model.ModelLargePipe;
import com.builtbroken.assemblyline.client.model.ModelReleaseValve; import com.builtbroken.assemblyline.client.model.ModelReleaseValve;
import com.builtbroken.assemblyline.machine.TileEntityReleaseValve; import com.builtbroken.assemblyline.machine.TileEntityReleaseValve;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -22,7 +21,7 @@ public class RenderReleaseValve extends TileEntitySpecialRenderer
private ModelReleaseValve valve; private ModelReleaseValve valve;
private TileEntity[] ents = new TileEntity[6]; private TileEntity[] ents = new TileEntity[6];
public static final ResourceLocation VALVE_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "ReleaseValve.png"); public static final ResourceLocation VALVE_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "ReleaseValve.png");
public RenderReleaseValve() public RenderReleaseValve()
{ {

View file

@ -8,7 +8,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelSink; import com.builtbroken.assemblyline.client.model.ModelSink;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -19,7 +18,7 @@ public class RenderSink extends TileEntitySpecialRenderer
int type = 0; int type = 0;
private ModelSink model; private ModelSink model;
public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Sink.png"); public static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Sink.png");
public RenderSink() public RenderSink()
{ {

View file

@ -11,7 +11,6 @@ import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelMachine; import com.builtbroken.assemblyline.client.model.ModelMachine;
import com.builtbroken.assemblyline.client.model.ModelSteamGen; import com.builtbroken.assemblyline.client.model.ModelSteamGen;
import com.builtbroken.assemblyline.client.model.ModelSteamTurbine; import com.builtbroken.assemblyline.client.model.ModelSteamTurbine;
import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.prefab.TileEntityMachine; import com.builtbroken.minecraft.prefab.TileEntityMachine;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
@ -23,8 +22,8 @@ public class RenderSteamGen extends TileEntitySpecialRenderer
public static final ModelSteamTurbine TURBINE_MODEL = new ModelSteamTurbine(); public static final ModelSteamTurbine TURBINE_MODEL = new ModelSteamTurbine();
public static final ModelSteamGen STEAM_GEN_MODEL = new ModelSteamGen(); public static final ModelSteamGen STEAM_GEN_MODEL = new ModelSteamGen();
public static final ResourceLocation TURBINE_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "SmallSteamFan.png"); public static final ResourceLocation TURBINE_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "SmallSteamFan.png");
public static final ResourceLocation STEAM_GEN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "SteamGenerator.png"); public static final ResourceLocation STEAM_GEN_TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "SteamGenerator.png");
private static float rot1 = 0; private static float rot1 = 0;
@Override @Override

View file

@ -11,7 +11,6 @@ import org.lwjgl.opengl.GL11;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelTestCar; import com.builtbroken.assemblyline.client.model.ModelTestCar;
import com.builtbroken.assemblyline.entities.prefab.EntityAdvanced; import com.builtbroken.assemblyline.entities.prefab.EntityAdvanced;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -19,7 +18,7 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderTestCar extends Render public class RenderTestCar extends Render
{ {
private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "TestCar.png"); private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "TestCar.png");
/** instance of ModelBoat for rendering */ /** instance of ModelBoat for rendering */
protected ModelBase modelBoat; protected ModelBase modelBoat;

View file

@ -10,7 +10,6 @@ import net.minecraft.util.ResourceLocation;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.client.model.ModelTurkey; import com.builtbroken.assemblyline.client.model.ModelTurkey;
import com.builtbroken.assemblyline.entities.EntityTurkey; import com.builtbroken.assemblyline.entities.EntityTurkey;
import com.builtbroken.minecraft.DarkCore;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -18,7 +17,7 @@ import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public class RenderTurkey extends RenderLiving public class RenderTurkey extends RenderLiving
{ {
private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, DarkCore.MODEL_DIRECTORY + "Turkey.png"); private static final ResourceLocation TEXTURE = new ResourceLocation(AssemblyLine.DOMAIN, AssemblyLine.MODEL_DIRECTORY + "Turkey.png");
public RenderTurkey() public RenderTurkey()
{ {

View file

@ -12,10 +12,8 @@ import net.minecraft.util.ChatMessageComponent;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
import net.minecraft.world.World; import net.minecraft.world.World;
import com.builtbroken.assemblyline.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.interfaces.IControlReceiver; import com.builtbroken.minecraft.interfaces.IControlReceiver;
import com.builtbroken.minecraft.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.network.PacketManagerEntity;
import com.builtbroken.minecraft.network.PacketManagerKeyEvent;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.client.FMLClientHandler; import cpw.mods.fml.client.FMLClientHandler;
@ -38,7 +36,7 @@ public abstract class EntityVehicle extends EntityAdvanced implements IControlRe
this.ignoreFrustumCheck = true; this.ignoreFrustumCheck = true;
this.isImmuneToFire = true; this.isImmuneToFire = true;
this.yOffset = 0.45f; this.yOffset = 0.45f;
PacketManagerKeyEvent.instance().register(this); //PacketManagerKeyEvent.instance().register(this);
} }
public EntityVehicle(World world, double xx, double yy, double zz) public EntityVehicle(World world, double xx, double yy, double zz)
@ -205,7 +203,7 @@ public abstract class EntityVehicle extends EntityAdvanced implements IControlRe
if (ticks % 5 == 0) if (ticks % 5 == 0)
{ {
if (worldObj.isRemote) if (worldObj.isRemote)
PacketManagerEntity.sendEntityUpdatePacket(this, this.worldObj.isRemote, "Desc", this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch, this.motionX, this.motionY, this.motionZ); // PacketManagerEntity.sendEntityUpdatePacket(this, this.worldObj.isRemote, "Desc", this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch, this.motionX, this.motionY, this.motionZ);
if (!this.worldObj.isRemote) if (!this.worldObj.isRemote)
{ {

View file

@ -0,0 +1,21 @@
package com.builtbroken.assemblyline.fluid;
import net.minecraftforge.fluids.Fluid;
/** Some common Fluid that other mods use
*
* @author DarkGuardsman */
public enum EnumFluid
{
FUEL(new Fluid("fuel").setUnlocalizedName("fluid.fuel.name")),
OIL(new Fluid("oil").setUnlocalizedName("fluid.oil.name").setDensity(1500).setViscosity(4700)),
BIOFUEL(new Fluid("biofuel").setUnlocalizedName("fluid.biofuel.name")),
WASTE(new Fluid("waste").setUnlocalizedName("fluid.waste.name").setDensity(1300).setViscosity(1800));
public final Fluid fluid;
private EnumFluid(Fluid fluid)
{
this.fluid = fluid;
}
}

View file

@ -0,0 +1,76 @@
package com.builtbroken.assemblyline.fluid;
import com.builtbroken.common.science.ChemElement;
import com.builtbroken.common.science.ChemicalCompound;
/** Enum of gases used to create all the gas fluids
*
* @author DarkGuardsman */
public enum EnumGas
{
CARBONDIOXIDE("Carbon DiOxide", false),
OXYGEN(ChemElement.Oxygen, 2f, true),
BUTANE(ChemicalCompound.BUTANE, true),
METHANE(ChemicalCompound.METHANE, true),
NATURAL_GAS("Natural Gas", false),
PROPANE("Propane", false);
/** Name used when creating this as a fluid */
public final String fluidName;
/** Name used to display to the players */
public final String name;
/** Object data reference that was used to create this gas, can be a ChemicalCompound, Element,
* or Fluid */
public final Object data;
public boolean enabled = false;
/** Only used for elements since when used as a gas they sometimes bind together */
private float molePerGasMolecule = 1.0f;
/** Local instance of the gas used when the getGas method is called */
private Gas gas;
private EnumGas(String name, boolean enabled)
{
this.fluidName = name.replace(" ", "").toLowerCase();
this.name = name;
data = null;
this.enabled = enabled;
}
private EnumGas(ChemicalCompound compound, boolean enabled)
{
this.fluidName = "gas:" + compound.compoundName.replace(" ", "").toLowerCase();
this.name = compound.compoundName;
data = compound;
this.enabled = enabled;
}
private EnumGas(ChemElement element, float molesPerGasMolecule, boolean enabled)
{
this.fluidName = "gas:" + element.elementName.replace(" ", "").toLowerCase();
this.name = element.elementName;
data = element;
this.enabled = enabled;
this.molePerGasMolecule = molesPerGasMolecule;
}
public Gas getGas()
{
if (gas == null)
{
gas = new Gas(fluidName);
if (data instanceof ChemElement)
{
gas.setDensity((int) ((ChemElement) data).density * 1000);
}
else if (data instanceof ChemicalCompound)
{
gas.setDensity((int) ((ChemicalCompound) data).density * 1000);
}
else
{
gas.setDensity(-1000);
}
}
return gas;
}
}

View file

@ -0,0 +1,58 @@
package com.builtbroken.assemblyline.fluid;
import java.util.ArrayList;
import java.util.List;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
/** Tank that has a filter on the fluid ids it will accept
*
* @author DarkGuardsman */
public class FilteredTank extends FluidTank
{
private List<Integer> fluidIds = new ArrayList<Integer>();
boolean gas = true;
boolean liquid = true;
public FilteredTank(int capacity, int... fluidIds)
{
this(capacity, true, true, fluidIds);
}
public FilteredTank(int capacity, boolean gas, boolean liquid, int... fluidIds)
{
super(capacity);
this.gas = gas;
this.liquid = liquid;
for (int id : fluidIds)
{
this.fluidIds.add(id);
}
}
public FilteredTank(FluidStack stack, int capacity)
{
super(stack, capacity);
}
public FilteredTank(Fluid fluid, int amount, int capacity)
{
super(fluid, amount, capacity);
}
@Override
public int fill(FluidStack resource, boolean doFill)
{
if (resource != null && resource.getFluid() != null && (!gas || gas && resource.getFluid().isGaseous()) && (!liquid || liquid && !resource.getFluid().isGaseous()))
{
if (fluidIds.contains(resource.fluidID))
{
return super.fill(resource, doFill);
}
}
return 0;
}
}

View file

@ -1,4 +1,4 @@
package com.builtbroken.assemblyline.fluid.network; package com.builtbroken.assemblyline.fluid;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -12,9 +12,10 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import com.builtbroken.assemblyline.fluid.network.FluidRecipeInfo.SimpleFluidRecipe; import com.builtbroken.assemblyline.fluid.network.FluidRecipeInfo.SimpleFluidRecipe;
import com.builtbroken.assemblyline.fluid.network.IFluidRecipeCrafter;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.common.Triple; import com.builtbroken.common.Triple;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
/** Handles all kinds of process involving mixing Fluids with other fluids and/or Items, Blocks, /** Handles all kinds of process involving mixing Fluids with other fluids and/or Items, Blocks,
* ItemStack, or Liquids * ItemStack, or Liquids

View file

@ -0,0 +1,17 @@
package com.builtbroken.assemblyline.fluid;
import net.minecraftforge.fluids.Fluid;
/** These is an extension of the Fluid system forcing it to be a gas on creation
*
* @author Archadia, DarkGuardsman */
public class Gas extends Fluid
{
public Gas(String name)
{
super(name);
this.isGaseous = true;
this.density = -1000;
}
}

View file

@ -0,0 +1,38 @@
package com.builtbroken.assemblyline.fluid;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
/** Version of the fluid tank that is restricted to gases only
*
* @author DarkGuardsman */
public class GasTank extends FluidTank
{
public GasTank(int capacity)
{
super(capacity);
}
public GasTank(FluidStack stack, int capacity)
{
super(stack, capacity);
}
public GasTank(Fluid fluid, int amount, int capacity)
{
super(fluid, amount, capacity);
}
@Override
public int fill(FluidStack resource, boolean doFill)
{
if (resource != null && resource.getFluid() != null && resource.getFluid().isGaseous())
{
return super.fill(resource, doFill);
}
return 0;
}
}

View file

@ -0,0 +1,38 @@
package com.builtbroken.assemblyline.fluid;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTank;
/** Version of the fluid tank that only supports liquids
*
* @author DarkGuardsman */
public class LiquidTank extends FluidTank
{
public LiquidTank(int capacity)
{
super(capacity);
}
public LiquidTank(FluidStack stack, int capacity)
{
super(stack, capacity);
}
public LiquidTank(Fluid fluid, int amount, int capacity)
{
super(fluid, amount, capacity);
}
@Override
public int fill(FluidStack resource, boolean doFill)
{
if (resource != null && resource.getFluid() != null && !resource.getFluid().isGaseous())
{
return super.fill(resource, doFill);
}
return 0;
}
}

View file

@ -8,7 +8,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart; import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.INetworkPart;
import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler; import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler;

View file

@ -14,7 +14,8 @@ import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart; import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.assemblyline.fluid.FluidCraftingHandler;
import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.INetworkPart;
import com.builtbroken.minecraft.tilenetwork.ITileNetwork; import com.builtbroken.minecraft.tilenetwork.ITileNetwork;
import com.builtbroken.minecraft.tilenetwork.prefab.NetworkTileEntities; import com.builtbroken.minecraft.tilenetwork.prefab.NetworkTileEntities;

View file

@ -9,7 +9,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.builtbroken.assemblyline.api.fluid.INetworkPipe; import com.builtbroken.assemblyline.api.fluid.INetworkPipe;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.INetworkPart;
import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler; import com.builtbroken.minecraft.tilenetwork.prefab.NetworkUpdateHandler;

View file

@ -20,7 +20,7 @@ import universalelectricity.api.vector.Vector3;
import com.builtbroken.assemblyline.blocks.BlockHydraulic; import com.builtbroken.assemblyline.blocks.BlockHydraulic;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.helpers.ColorCode; import com.builtbroken.minecraft.helpers.ColorCode;
import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded;

View file

@ -10,7 +10,7 @@ import universalelectricity.api.vector.Vector3;
import com.builtbroken.assemblyline.api.fluid.INetworkPipe; import com.builtbroken.assemblyline.api.fluid.INetworkPipe;
import com.builtbroken.assemblyline.fluid.network.NetworkPipes; import com.builtbroken.assemblyline.fluid.network.NetworkPipes;
import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidNetworkTile; import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidNetworkTile;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.helpers.ColorCode; import com.builtbroken.minecraft.helpers.ColorCode;
import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded;
import com.builtbroken.minecraft.tilenetwork.ITileConnector; import com.builtbroken.minecraft.tilenetwork.ITileConnector;

View file

@ -21,14 +21,14 @@ import net.minecraftforge.fluids.FluidTankInfo;
import org.bouncycastle.util.Arrays; import org.bouncycastle.util.Arrays;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.api.fluid.FluidMasterList; import com.builtbroken.assemblyline.api.fluid.FluidMasterList;
import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart; import com.builtbroken.assemblyline.api.fluid.INetworkFluidPart;
import com.builtbroken.assemblyline.fluid.network.NetworkFluidTiles; import com.builtbroken.assemblyline.fluid.network.NetworkFluidTiles;
import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial; import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.assemblyline.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.tilenetwork.INetworkPart; import com.builtbroken.minecraft.tilenetwork.INetworkPart;
import com.builtbroken.minecraft.tilenetwork.ITileNetwork; import com.builtbroken.minecraft.tilenetwork.ITileNetwork;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
@ -382,7 +382,7 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i
this.renderConnection[4] = data.readBoolean(); this.renderConnection[4] = data.readBoolean();
this.renderConnection[5] = data.readBoolean(); this.renderConnection[5] = data.readBoolean();
this.tank = new FluidTank(data.readInt()); this.tank = new FluidTank(data.readInt());
this.getTank().readFromNBT(PacketHandler.instance().readNBTTagCompound(data)); this.getTank().readFromNBT(PacketHandler.readNBTTagCompound(data));
this.internalTanksInfo[0] = this.getTank().getInfo(); this.internalTanksInfo[0] = this.getTank().getInfo();
return true; return true;
} }
@ -400,7 +400,7 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i
else if (id.equalsIgnoreCase("SingleTank")) else if (id.equalsIgnoreCase("SingleTank"))
{ {
this.tank = new FluidTank(data.readInt()); this.tank = new FluidTank(data.readInt());
this.getTank().readFromNBT(PacketHandler.instance().readNBTTagCompound(data)); this.getTank().readFromNBT(PacketHandler.readNBTTagCompound(data));
this.internalTanksInfo[0] = this.getTank().getInfo(); this.internalTanksInfo[0] = this.getTank().getInfo();
return true; return true;
} }
@ -428,7 +428,7 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i
data[6] = this.renderConnection[5]; data[6] = this.renderConnection[5];
data[7] = this.getTank().getCapacity(); data[7] = this.getTank().getCapacity();
data[8] = this.getTank().writeToNBT(new NBTTagCompound()); data[8] = this.getTank().writeToNBT(new NBTTagCompound());
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "DescriptionPacket", this, data); return AssemblyLine.getTilePacket().getPacket(this, "DescriptionPacket", data);
} }
public void sendRenderUpdate() public void sendRenderUpdate()
@ -441,14 +441,14 @@ public abstract class TileEntityFluidNetworkTile extends TileEntityFluidDevice i
data[4] = this.renderConnection[3]; data[4] = this.renderConnection[3];
data[5] = this.renderConnection[4]; data[5] = this.renderConnection[4];
data[6] = this.renderConnection[5]; data[6] = this.renderConnection[5];
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "RenderPacket", this, data)); PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "RenderPacket", data));
} }
public void sendTankUpdate(int index) public void sendTankUpdate(int index)
{ {
if (this.getTank() != null && index == 0) if (this.getTank() != null && index == 0)
{ {
PacketHandler.instance().sendPacketToClients(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "SingleTank", this, this.getTank().getCapacity(), this.getTank().writeToNBT(new NBTTagCompound())), this.worldObj, new Vector3(this), 60); PacketHandler.sendPacketToClients(AssemblyLine.getTilePacket().getPacket(this, "SingleTank", this.getTank().getCapacity(), this.getTank().writeToNBT(new NBTTagCompound())), this.worldObj, new Vector3(this), 60);
} }
} }

View file

@ -11,7 +11,7 @@ import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded;
public abstract class TileEntityFluidStorage extends TileEntityFluidDevice implements IFluidHandler, IColorCoded public abstract class TileEntityFluidStorage extends TileEntityFluidDevice implements IFluidHandler, IColorCoded

View file

@ -14,7 +14,7 @@ import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
/** A simpler path Finder used to find drainable or fillable tiles /** A simpler path Finder used to find drainable or fillable tiles
* *

View file

@ -20,7 +20,7 @@ import universalelectricity.api.vector.Vector3;
import com.builtbroken.assemblyline.api.fluid.IDrain; import com.builtbroken.assemblyline.api.fluid.IDrain;
import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidDevice; import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidDevice;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
public class TileEntityDrain extends TileEntityFluidDevice implements IFluidHandler, IDrain public class TileEntityDrain extends TileEntityFluidDevice implements IFluidHandler, IDrain
{ {

View file

@ -14,7 +14,7 @@ import universalelectricity.api.vector.Vector3;
import com.builtbroken.assemblyline.api.fluid.IDrain; import com.builtbroken.assemblyline.api.fluid.IDrain;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.interfaces.IToolReadOut; import com.builtbroken.minecraft.interfaces.IToolReadOut;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;
import com.builtbroken.minecraft.tilenetwork.ITileConnector; import com.builtbroken.minecraft.tilenetwork.ITileConnector;

View file

@ -6,10 +6,9 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.minecraft.prefab.invgui.ISlotWatcher; import com.builtbroken.minecraft.prefab.invgui.ISlotWatcher;
import com.builtbroken.minecraft.prefab.invgui.SlotCraftingResult; import com.builtbroken.minecraft.prefab.invgui.SlotCraftingResult;
import com.builtbroken.minecraft.prefab.invgui.SlotRestricted; import com.builtbroken.minecraft.prefab.invgui.SlotSpecific;
import com.builtbroken.minecraft.prefab.invgui.WatchedSlot; import com.builtbroken.minecraft.prefab.invgui.WatchedSlot;
public class ContainerImprinter extends Container implements ISlotWatcher public class ContainerImprinter extends Container implements ISlotWatcher
@ -33,7 +32,7 @@ public class ContainerImprinter extends Container implements ISlotWatcher
} }
// Imprint Input for Imprinting // Imprint Input for Imprinting
this.addSlotToContainer(new SlotRestricted(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, new ItemStack(ALRecipeLoader.itemImprint))); this.addSlotToContainer(new SlotSpecific(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START, 68, 34, ItemImprinter.class));
// Item to be imprinted // Item to be imprinted
this.addSlotToContainer(new WatchedSlot(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START + 1, 92, 34, this)); this.addSlotToContainer(new WatchedSlot(this.tileEntity, TileEntityImprinter.IMPRINTER_MATRIX_START + 1, 92, 34, this));
// Result of Crafting/Imprinting // Result of Crafting/Imprinting

View file

@ -27,7 +27,7 @@ import cofh.api.energy.IEnergyStorage;
import com.builtbroken.assemblyline.AssemblyLine; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.machine.TileEntityGenerator; import com.builtbroken.assemblyline.machine.TileEntityGenerator;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.interfaces.IToolReadOut; import com.builtbroken.minecraft.interfaces.IToolReadOut;
import com.builtbroken.minecraft.interfaces.IToolReadOut.EnumTools; import com.builtbroken.minecraft.interfaces.IToolReadOut.EnumTools;
import com.builtbroken.minecraft.prefab.ItemBasic; import com.builtbroken.minecraft.prefab.ItemBasic;

View file

@ -14,7 +14,7 @@ import net.minecraft.world.World;
import com.builtbroken.assemblyline.blocks.BlockHydraulic; import com.builtbroken.assemblyline.blocks.BlockHydraulic;
import com.builtbroken.assemblyline.client.render.BlockRenderHelper; import com.builtbroken.assemblyline.client.render.BlockRenderHelper;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.prefab.TileEntityAdvanced; import com.builtbroken.minecraft.prefab.TileEntityAdvanced;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;

View file

@ -20,7 +20,7 @@ import com.builtbroken.assemblyline.fluid.pipes.FluidPartsMaterial;
import com.builtbroken.assemblyline.fluid.pipes.ItemBlockPipe; import com.builtbroken.assemblyline.fluid.pipes.ItemBlockPipe;
import com.builtbroken.assemblyline.fluid.pipes.TileEntityPipe; import com.builtbroken.assemblyline.fluid.pipes.TileEntityPipe;
import com.builtbroken.common.Pair; import com.builtbroken.common.Pair;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.helpers.HelperMethods; import com.builtbroken.minecraft.helpers.HelperMethods;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;

View file

@ -6,8 +6,8 @@ import net.minecraft.inventory.Container;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.CompatibilityModule; import universalelectricity.api.CompatibilityModule;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
@ -31,7 +31,7 @@ public class TileEntityBatteryBox extends TileEntityEnergyMachine
{ {
super.updateEntity(); super.updateEntity();
if (!this.worldObj.isRemote && this.enabled && !this.isDisabled()) if (!this.worldObj.isRemote && this.enabled)
{ {
/** Recharges electric item. */ /** Recharges electric item. */
this.setEnergy(ForgeDirection.UNKNOWN, this.getEnergy(ForgeDirection.UNKNOWN) - CompatibilityModule.chargeItem(this.getStackInSlot(0), Math.min(10000, this.getEnergyStored()), true)); this.setEnergy(ForgeDirection.UNKNOWN, this.getEnergy(ForgeDirection.UNKNOWN) - CompatibilityModule.chargeItem(this.getStackInSlot(0), Math.min(10000, this.getEnergyStored()), true));

View file

@ -4,11 +4,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.interfaces.IExtendedStorage; import com.builtbroken.minecraft.interfaces.IExtendedStorage;
import com.builtbroken.minecraft.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityInv; import com.builtbroken.minecraft.prefab.TileEntityInv;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
@ -226,11 +226,11 @@ public class TileEntityCrate extends TileEntityInv implements ISimplePacketRecei
ItemStack stack = this.getSampleStack(); ItemStack stack = this.getSampleStack();
if (stack != null) if (stack != null)
{ {
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "InventoryItem", this, true, stack.writeToNBT(new NBTTagCompound()), stack.stackSize); return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "InventoryItem", this, true, stack.writeToNBT(new NBTTagCompound()), stack.stackSize);
} }
else else
{ {
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "InventoryItem", this, false); return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "InventoryItem", this, false);
} }
} }

View file

@ -9,10 +9,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable; import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable;
import com.builtbroken.minecraft.network.PacketHandler;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;

View file

@ -68,7 +68,7 @@ public abstract class TileEntityGenerator extends TileEntityEnergyMachine
@Override @Override
public boolean canFunction() public boolean canFunction()
{ {
return this.enabled && !this.isDisabled() && this.hasFuel(); return this.enabled && this.hasFuel();
} }
/** Does this generator have fuel time left to burn */ /** Does this generator have fuel time left to burn */

View file

@ -16,7 +16,7 @@ import net.minecraftforge.fluids.IFluidHandler;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import com.builtbroken.common.lang.TextHelper.TextColor; import com.builtbroken.common.lang.TextHelper.TextColor;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.interfaces.IBlockActivated; import com.builtbroken.minecraft.interfaces.IBlockActivated;
public class TileEntityInfFluid extends TileEntity implements IFluidHandler, IBlockActivated public class TileEntityInfFluid extends TileEntity implements IFluidHandler, IBlockActivated

View file

@ -9,13 +9,13 @@ import net.minecraft.network.packet.Packet;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.api.IManipulator; import com.builtbroken.assemblyline.api.IManipulator;
import com.builtbroken.assemblyline.imprinter.ItemImprinter; import com.builtbroken.assemblyline.imprinter.ItemImprinter;
import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable; import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable;
import com.builtbroken.minecraft.helpers.InvInteractionHelper; import com.builtbroken.minecraft.helpers.InvInteractionHelper;
import com.builtbroken.minecraft.interfaces.IRotatable; import com.builtbroken.minecraft.interfaces.IRotatable;
import com.builtbroken.minecraft.network.PacketHandler;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;

View file

@ -10,10 +10,10 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.api.IBelt; import com.builtbroken.assemblyline.api.IBelt;
import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable; import com.builtbroken.assemblyline.imprinter.prefab.TileEntityFilterable;
import com.builtbroken.minecraft.network.PacketHandler;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;
@ -35,7 +35,7 @@ public class TileEntityRejector extends TileEntityFilterable
{ {
super.updateEntity(); super.updateEntity();
/** Has to update a bit faster than a conveyer belt */ /** Has to update a bit faster than a conveyer belt */
if (this.ticks % 5 == 0 && !this.isDisabled()) if (this.ticks % 5 == 0)
{ {
this.firePiston = false; this.firePiston = false;

View file

@ -7,12 +7,12 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidStack;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidStorage; import com.builtbroken.assemblyline.fluid.prefab.TileEntityFluidStorage;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.assemblyline.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.helpers.ColorCode; import com.builtbroken.minecraft.helpers.ColorCode;
import com.builtbroken.minecraft.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.network.PacketHandler;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;
@ -45,7 +45,7 @@ public class TileEntitySink extends TileEntityFluidStorage implements ISimplePac
{ {
stack = this.getTank().getFluid(); stack = this.getTank().getFluid();
} }
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "FluidLevel", this, stack.writeToNBT(new NBTTagCompound())); return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "FluidLevel", this, stack.writeToNBT(new NBTTagCompound()));
} }
@Override @Override

View file

@ -11,9 +11,9 @@ import net.minecraftforge.fluids.IFluidHandler;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.minecraft.fluid.EnumGas; import com.builtbroken.assemblyline.fluid.EnumGas;
import com.builtbroken.minecraft.fluid.FluidHelper; import com.builtbroken.assemblyline.fluid.GasTank;
import com.builtbroken.minecraft.fluid.GasTank; import com.builtbroken.minecraft.FluidHelper;
import com.builtbroken.minecraft.interfaces.IBlockActivated; import com.builtbroken.minecraft.interfaces.IBlockActivated;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;

View file

@ -6,7 +6,7 @@ import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.builtbroken.minecraft.fluid.GasTank; import com.builtbroken.assemblyline.fluid.GasTank;
import com.builtbroken.minecraft.prefab.TileEntityMachine; import com.builtbroken.minecraft.prefab.TileEntityMachine;
/** @author Archadia */ /** @author Archadia */

View file

@ -8,8 +8,8 @@ import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler; import net.minecraftforge.fluids.IFluidHandler;
import com.builtbroken.minecraft.fluid.EnumGas; import com.builtbroken.assemblyline.fluid.EnumGas;
import com.builtbroken.minecraft.fluid.GasTank; import com.builtbroken.assemblyline.fluid.GasTank;
import com.builtbroken.minecraft.prefab.TileEntityAdvanced; import com.builtbroken.minecraft.prefab.TileEntityAdvanced;
import com.builtbroken.minecraft.tilenetwork.ITileConnector.Connection; import com.builtbroken.minecraft.tilenetwork.ITileConnector.Connection;

View file

@ -9,11 +9,11 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.minecraft.CoreRegistry; import com.builtbroken.minecraft.CoreRegistry;
import com.builtbroken.minecraft.LaserEvent; import com.builtbroken.minecraft.LaserEvent;
import com.builtbroken.minecraft.helpers.RayTraceHelper; import com.builtbroken.minecraft.helpers.RayTraceHelper;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;

View file

@ -9,11 +9,11 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.minecraft.CoreRegistry; import com.builtbroken.minecraft.CoreRegistry;
import com.builtbroken.minecraft.LaserEvent; import com.builtbroken.minecraft.LaserEvent;
import com.builtbroken.minecraft.helpers.RayTraceHelper; import com.builtbroken.minecraft.helpers.RayTraceHelper;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;

View file

@ -11,12 +11,12 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.assemblyline.ALRecipeLoader;
import com.builtbroken.assemblyline.api.IBelt; import com.builtbroken.assemblyline.api.IBelt;
import com.builtbroken.assemblyline.machine.TileEntityAssembly; import com.builtbroken.assemblyline.machine.TileEntityAssembly;
import com.builtbroken.minecraft.interfaces.IRotatable; import com.builtbroken.minecraft.interfaces.IRotatable;
import com.builtbroken.minecraft.network.PacketHandler;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player; import cpw.mods.fml.common.network.Player;

View file

@ -6,8 +6,7 @@ import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import com.builtbroken.assemblyline.ALRecipeLoader; import com.builtbroken.minecraft.prefab.invgui.SlotSpecific;
import com.builtbroken.minecraft.prefab.invgui.SlotRestricted;
public class ContainerEncoder extends Container public class ContainerEncoder extends Container
{ {
@ -21,7 +20,7 @@ public class ContainerEncoder extends Container
this.tileEntity = encoder; this.tileEntity = encoder;
// Disk // Disk
this.addSlotToContainer(new SlotRestricted(encoder, 0, 80, 24 + Y_OFFSET, new ItemStack(ALRecipeLoader.itemDisk))); this.addSlotToContainer(new SlotSpecific(encoder, 0, 80, 24 + Y_OFFSET, ItemDisk.class));
int row; int row;

View file

@ -8,14 +8,14 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import universalelectricity.api.vector.Vector2; import universalelectricity.api.vector.Vector2;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.api.coding.IProgram; import com.builtbroken.assemblyline.api.coding.IProgram;
import com.builtbroken.assemblyline.api.coding.ITask; import com.builtbroken.assemblyline.api.coding.ITask;
import com.builtbroken.assemblyline.api.coding.TaskRegistry; import com.builtbroken.assemblyline.api.coding.TaskRegistry;
import com.builtbroken.assemblyline.armbot.Program; import com.builtbroken.assemblyline.armbot.Program;
import com.builtbroken.assemblyline.armbot.command.TaskRotateTo; import com.builtbroken.assemblyline.armbot.command.TaskRotateTo;
import com.builtbroken.minecraft.DarkCore;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityMachine; import com.builtbroken.minecraft.prefab.TileEntityMachine;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
@ -184,7 +184,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
{ {
this.program.save(tag); this.program.save(tag);
} }
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.PROGRAM_PACKET_ID, this, exists, tag); return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.PROGRAM_PACKET_ID, this, exists, tag);
} }
@ -194,7 +194,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
{ {
if (this.worldObj.isRemote) if (this.worldObj.isRemote)
{ {
PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.REMOVE_TASK_PACKET_ID, this, vec.intX(), vec.intY())); PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.REMOVE_TASK_PACKET_ID, this, vec.intX(), vec.intY()));
} }
else else
{ {
@ -212,7 +212,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
{ {
NBTTagCompound nbt = new NBTTagCompound(); NBTTagCompound nbt = new NBTTagCompound();
editTask.save(nbt); editTask.save(nbt);
PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.PROGRAM_CHANGE_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt)); PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.PROGRAM_CHANGE_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt));
} }
else else
{ {
@ -230,7 +230,7 @@ public class TileEntityEncoder extends TileEntityMachine implements ISidedInvent
{ {
NBTTagCompound nbt = new NBTTagCompound(); NBTTagCompound nbt = new NBTTagCompound();
editTask.save(nbt); editTask.save(nbt);
PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, TileEntityEncoder.NEW_TASK_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt)); PacketDispatcher.sendPacketToServer(PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, TileEntityEncoder.NEW_TASK_PACKET_ID, this, editTask.getMethodName(), editTask.getCol(), editTask.getRow(), nbt));
} }
else else
{ {

View file

@ -5,10 +5,10 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.api.item.IEnergyItem; import universalelectricity.api.item.IEnergyItem;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.assemblyline.machine.processor.BlockProcessor.ProcessorData; import com.builtbroken.assemblyline.machine.processor.BlockProcessor.ProcessorData;
import com.builtbroken.minecraft.interfaces.IInvBox; import com.builtbroken.minecraft.interfaces.IInvBox;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine; import com.builtbroken.minecraft.prefab.TileEntityEnergyMachine;
import com.builtbroken.minecraft.prefab.invgui.InvChest; import com.builtbroken.minecraft.prefab.invgui.InvChest;
import com.builtbroken.minecraft.recipes.MachineRecipeHandler; import com.builtbroken.minecraft.recipes.MachineRecipeHandler;

View file

@ -0,0 +1,21 @@
package com.builtbroken.assemblyline.network;
import com.google.common.io.ByteArrayDataInput;
import cpw.mods.fml.common.network.Player;
/** Simplified version of IPackerReceiver for tiles that only need a packet ID, data, and player
* Reference
*
* @author DarkGuardsman */
public interface ISimplePacketReceiver
{
/** Simplified version of IPacketReceiver's HandlePacketData
*
* @param id - packet ID as a string
* @param data - data from the packet, after location has been read
* @param player - player that the packet was sent to or came from
* @return true if the packet was used */
public boolean simplePacket(String id, ByteArrayDataInput data, Player player);
}

View file

@ -0,0 +1,70 @@
package com.builtbroken.assemblyline.network;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.packet.Packet;
import net.minecraft.tileentity.TileEntity;
import calclavia.lib.network.IPacketReceiver;
import calclavia.lib.network.PacketType;
import com.google.common.io.ByteArrayDataInput;
/** Packet handler for blocks and tile entities.
*
* @author Calclavia */
public class PacketIDTile extends PacketType
{
public PacketIDTile(String channel)
{
super(channel);
}
public Packet getPacket(TileEntity tileEntity, String id, Object... args)
{
return this.getPacket(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, id, args);
}
public Packet getPacket(int x, int y, int z, String id, Object... args)
{
List newArgs = new ArrayList();
newArgs.add(x);
newArgs.add(y);
newArgs.add(z);
newArgs.add(id);
for (Object obj : args)
{
newArgs.add(obj);
}
return super.getPacket(newArgs.toArray());
}
@Override
public void receivePacket(ByteArrayDataInput data, EntityPlayer player)
{
int x = data.readInt();
int y = data.readInt();
int z = data.readInt();
String id = data.readUTF();
TileEntity tileEntity = player.worldObj.getBlockTileEntity(x, y, z);
if (tileEntity instanceof IPacketReceiver)
{
((IPacketReceiver) tileEntity).onReceivePacket(data, player);
}
else
{
int blockID = player.worldObj.getBlockId(x, y, z);
if (Block.blocksList[blockID] instanceof IPacketReceiver)
{
((IPacketReceiver) Block.blocksList[blockID]).onReceivePacket(data, player, x, y, z);
}
}
}
}

View file

@ -12,12 +12,12 @@ import universalelectricity.api.energy.IConductor;
import universalelectricity.api.energy.IEnergyNetwork; import universalelectricity.api.energy.IEnergyNetwork;
import universalelectricity.api.vector.Vector3; import universalelectricity.api.vector.Vector3;
import universalelectricity.api.vector.VectorHelper; import universalelectricity.api.vector.VectorHelper;
import calclavia.lib.network.PacketHandler;
import com.builtbroken.minecraft.DarkCore; import com.builtbroken.assemblyline.AssemblyLine;
import com.builtbroken.assemblyline.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.helpers.ColorCode; import com.builtbroken.minecraft.helpers.ColorCode;
import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded; import com.builtbroken.minecraft.helpers.ColorCode.IColorCoded;
import com.builtbroken.minecraft.network.ISimplePacketReceiver;
import com.builtbroken.minecraft.network.PacketHandler;
import com.builtbroken.minecraft.prefab.TileEntityAdvanced; import com.builtbroken.minecraft.prefab.TileEntityAdvanced;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
@ -113,7 +113,7 @@ public class TileEntityWire extends TileEntityAdvanced implements IConductor, IS
@Override @Override
public Packet getDescriptionPacket() public Packet getDescriptionPacket()
{ {
return PacketHandler.instance().getTilePacket(DarkCore.CHANNEL, "Wire", this, this.currentAcceptorConnections, this.getColor().ordinal()); return PacketHandler.instance().getTilePacket(AssemblyLine.CHANNEL, "Wire", this, this.currentAcceptorConnections, this.getColor().ordinal());
} }
@Override @Override