Moved textures and fixed build file
4
Include Resources.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
@echo off
|
||||
cd resources
|
||||
"..\..\7za.exe" a "..\jars\bin\minecraft.jar" "*"
|
||||
pause
|
1
buildnumber.txt
Normal file
|
@ -0,0 +1 @@
|
|||
0
|
0
info.txt
Normal file
|
@ -9,7 +9,7 @@ set /a BUILD_NUMBER=%CurrentBuild%+1
|
|||
echo %BUILD_NUMBER% >buildnumber.txt
|
||||
|
||||
set FILE_NAME=AssemblyLine_v%MODVERSION%.%BUILD_NUMBER%.jar
|
||||
set API_NAME=AssemblyLine_v%MODVERSION%.%BUILD_NUMBER%_api.zip
|
||||
::set API_NAME=AssemblyLine_v%MODVERSION%.%BUILD_NUMBER%_api.zip
|
||||
set BACKUP_NAME=AssemblyLine_v%MODVERSION%.%BUILD_NUMBER%_backup.zip
|
||||
|
||||
echo Starting to build %FILE_NAME%
|
||||
|
@ -27,14 +27,14 @@ cd ..\..\
|
|||
|
||||
cd resources\
|
||||
"..\..\7za.exe" a "..\builds\%FILE_NAME%" "*"
|
||||
"..\..\7za.exe" a "..\builds\%BACKUP_NAME%" "*" -pcalclavia
|
||||
"..\..\7za.exe" a "..\builds\%BACKUP_NAME%" "*" -pdarkguardsman
|
||||
cd ..\
|
||||
cd src\
|
||||
"..\..\7za.exe" a "..\builds\%BACKUP_NAME%" "*\assemblyline\" -pcalclavia
|
||||
"..\..\7za.exe" a "..\builds\%BACKUP_NAME%" "*\assemblyline\" -pdarkguardsman
|
||||
::"..\..\7za.exe" a "..\builds\%API_NAME%" "*\atomicscience\api\"
|
||||
cd ..\
|
||||
|
||||
::UPDATE INFO FILE %API_NAME%
|
||||
::UPDATE INFO FILE
|
||||
echo %PROMOTION% %FILE_NAME%>>info.txt
|
||||
|
||||
::GENERATE FTP Script
|
||||
|
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 373 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 791 B After Width: | Height: | Size: 791 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 401 B |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 397 B After Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 407 B |
Before Width: | Height: | Size: 534 B After Width: | Height: | Size: 534 B |
Before Width: | Height: | Size: 950 B After Width: | Height: | Size: 950 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 957 B After Width: | Height: | Size: 957 B |
|
@ -5,7 +5,7 @@ import net.minecraft.src.TileEntity;
|
|||
import net.minecraft.src.World;
|
||||
import assemblyline.gui.GuiEjectorSettings;
|
||||
import assemblyline.interaction.ContainerEjector;
|
||||
import assemblyline.interaction.TileEntityEjector;
|
||||
import assemblyline.interaction.TileEntitySorter;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public class ALCommonProxy implements IGuiHandler
|
||||
|
@ -32,7 +32,7 @@ public class ALCommonProxy implements IGuiHandler
|
|||
{
|
||||
switch(ID)
|
||||
{
|
||||
case 0: return new GuiEjectorSettings(player.inventory, ((TileEntityEjector)tileEntity));
|
||||
case 0: return new GuiEjectorSettings(player.inventory, ((TileEntitySorter)tileEntity));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ public class ALCommonProxy implements IGuiHandler
|
|||
{
|
||||
switch(ID)
|
||||
{
|
||||
case 0: return new ContainerEjector(player.inventory, ((TileEntityEjector)tileEntity));
|
||||
case 0: return new ContainerEjector(player.inventory, ((TileEntitySorter)tileEntity));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ import assemblyline.belts.TileEntityConveyorBelt;
|
|||
import assemblyline.interaction.BlockInteraction;
|
||||
import assemblyline.interaction.BlockInteraction.MachineType;
|
||||
import assemblyline.interaction.ItemBlockInteraction;
|
||||
import assemblyline.interaction.TileEntityEjector;
|
||||
import assemblyline.interaction.TileEntityInjector;
|
||||
import assemblyline.interaction.TileEntitySorter;
|
||||
import assemblyline.interaction.TileEntityManipulator;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
|
@ -68,13 +68,13 @@ public class AssemblyLine
|
|||
public void load(FMLInitializationEvent evt)
|
||||
{
|
||||
GameRegistry.registerTileEntity(TileEntityConveyorBelt.class, "belt");
|
||||
GameRegistry.registerTileEntity(TileEntityEjector.class, "ejector");
|
||||
GameRegistry.registerTileEntity(TileEntityInjector.class, "scop");
|
||||
GameRegistry.registerTileEntity(TileEntitySorter.class, "ejector");
|
||||
GameRegistry.registerTileEntity(TileEntityManipulator.class, "scop");
|
||||
proxy.init();
|
||||
// Names
|
||||
LanguageRegistry.addName(new ItemStack(blockConveyorBelt, 1), "Coneveyor Belt");
|
||||
LanguageRegistry.addName(new ItemStack(blockInteraction, 1, MachineType.EJECTOR.metadata), MachineType.EJECTOR.name);
|
||||
LanguageRegistry.addName(new ItemStack(blockInteraction, 1, MachineType.INJECTOR.metadata), MachineType.EJECTOR.name);
|
||||
LanguageRegistry.addName(new ItemStack(blockInteraction, 1, MachineType.SORTER.metadata), MachineType.SORTER.name);
|
||||
LanguageRegistry.addName(new ItemStack(blockInteraction, 1, MachineType.MANIPULATOR.metadata), MachineType.SORTER.name);
|
||||
LanguageRegistry.addName(new ItemStack(blockInteraction, 1, 8), "FutureBlock");
|
||||
LanguageRegistry.addName(new ItemStack(blockInteraction, 1, 12), "FutureBlock");
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import net.minecraft.src.Material;
|
|||
import net.minecraft.src.MathHelper;
|
||||
import net.minecraft.src.TileEntity;
|
||||
import net.minecraft.src.World;
|
||||
import universalelectricity.core.UniversalElectricity;
|
||||
import universalelectricity.prefab.BlockMachine;
|
||||
import assemblyline.render.RenderHelper;
|
||||
|
||||
|
@ -18,10 +19,8 @@ public class BlockConveyorBelt extends BlockMachine
|
|||
{
|
||||
public BlockConveyorBelt(int id)
|
||||
{
|
||||
super("Conveyor Belt", id, Material.wood);
|
||||
super("Conveyor Belt", id, UniversalElectricity.machine);
|
||||
this.setBlockBounds(0, 0, 0, 1, 0.3f, 1);
|
||||
this.setTextureFile("/textures/items.png");
|
||||
this.blockIndexInTexture = 0;
|
||||
this.setCreativeTab(CreativeTabs.tabTransport);
|
||||
}
|
||||
@Override
|
||||
|
@ -57,12 +56,13 @@ public class BlockConveyorBelt extends BlockMachine
|
|||
* Returns the TileEntity used by this block.
|
||||
*/
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World var1,int meta)
|
||||
public TileEntity createNewTileEntity(World var1, int metadata)
|
||||
{
|
||||
if(meta >=0 && meta < 4)
|
||||
if(metadata >=0 && metadata < 4)
|
||||
{
|
||||
return new TileEntityConveyorBelt();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -77,10 +77,10 @@ public class BlockConveyorBelt extends BlockMachine
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import net.minecraft.src.Packet250CustomPayload;
|
|||
import net.minecraft.src.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import universalelectricity.core.Vector3;
|
||||
import universalelectricity.electricity.ElectricInfo;
|
||||
import universalelectricity.implement.IConductor;
|
||||
import universalelectricity.prefab.TileEntityElectricityReceiver;
|
||||
import universalelectricity.prefab.network.IPacketReceiver;
|
||||
|
@ -24,9 +25,16 @@ import com.google.common.io.ByteArrayDataInput;
|
|||
|
||||
public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implements IPacketReceiver
|
||||
{
|
||||
public double electricityStored = 0;
|
||||
public final double electricityRequired = 0.1f;
|
||||
public final double energyMax = 10;
|
||||
/**
|
||||
* Joules required to run this thing.
|
||||
*/
|
||||
public static final int JOULES_REQUIRED = 5;
|
||||
|
||||
/**
|
||||
* The amount of watts received.
|
||||
*/
|
||||
public double wattsReceived = 0;
|
||||
|
||||
private float speed = -0.05F;
|
||||
public float wheelRotation = 0;
|
||||
public boolean running = false;
|
||||
|
@ -39,23 +47,28 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
public boolean connected = false;
|
||||
public List<Entity> entityIgnoreList = new ArrayList<Entity>();
|
||||
|
||||
// Checks Adjacent belt to see if there
|
||||
// powered. Reduces need for wire per belt
|
||||
public boolean powerNeighbor()
|
||||
/**
|
||||
* Powers nearby conveyor belts.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean searchNeighborBelts()
|
||||
{
|
||||
for (int n = 2; n < 6; n++)
|
||||
for (int i = 2; i < 6; i++)
|
||||
{
|
||||
ForgeDirection d = ForgeDirection.getOrientation(n);
|
||||
TileEntity ent = worldObj.getBlockTileEntity(xCoord - d.offsetX, yCoord, zCoord - d.offsetZ);
|
||||
if (ent instanceof TileEntityConveyorBelt)
|
||||
ForgeDirection direction = ForgeDirection.getOrientation(i);
|
||||
TileEntity tileEntity = worldObj.getBlockTileEntity(xCoord - direction.offsetX, yCoord, zCoord - direction.offsetZ);
|
||||
|
||||
if (tileEntity instanceof TileEntityConveyorBelt)
|
||||
{
|
||||
adjBelts[n - 2] = (TileEntityConveyorBelt) ent;
|
||||
adjBelts[i - 2] = (TileEntityConveyorBelt) tileEntity;
|
||||
}
|
||||
else
|
||||
{
|
||||
adjBelts[n - 2] = null;
|
||||
adjBelts[i - 2] = null;
|
||||
}
|
||||
}
|
||||
|
||||
int rr = 0;
|
||||
for (int b = 0; b < 4; b++)
|
||||
{
|
||||
|
@ -64,7 +77,7 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
TileEntityConveyorBelt belt = (TileEntityConveyorBelt) adjBelts[b];
|
||||
if (belt.range > rr)
|
||||
{
|
||||
rr = belt.getRange();
|
||||
rr = belt.range;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,17 +85,12 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
return false;
|
||||
}
|
||||
|
||||
public int getRange()
|
||||
{
|
||||
return this.range;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
super.updateEntity();
|
||||
|
||||
if (this.ticks % 10 == 0)
|
||||
if (this.ticks % 20 == 0)
|
||||
{
|
||||
if (worldObj.getBlockTileEntity(xCoord, yCoord - 1, zCoord) instanceof IConductor)
|
||||
{
|
||||
|
@ -93,19 +101,21 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
this.connected = false;
|
||||
}
|
||||
|
||||
if (this.electricityStored >= this.electricityRequired)
|
||||
if (this.wattsReceived >= JOULES_REQUIRED)
|
||||
{
|
||||
this.electricityStored = Math.max(this.electricityStored - this.electricityRequired, 0);
|
||||
this.wattsReceived = Math.max(this.wattsReceived - JOULES_REQUIRED, 0);
|
||||
this.range = 20;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.range = 0;
|
||||
}
|
||||
|
||||
if (!this.connected)
|
||||
{
|
||||
powerNeighbor();
|
||||
searchNeighborBelts();
|
||||
}
|
||||
|
||||
if (this.range > 0)
|
||||
{
|
||||
this.running = true;
|
||||
|
@ -117,10 +127,7 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
Packet packet = PacketManager.getPacket("asmLine", this, new Object[]
|
||||
{ running, range });
|
||||
PacketManager.sendPacketToClients(packet, worldObj, new Vector3(xCoord, yCoord, zCoord), 40);
|
||||
|
||||
PacketManager.sendPacketToClients(this.getDescriptionPacket(), this.worldObj, Vector3.get(this), 15);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -189,10 +196,22 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket()
|
||||
{
|
||||
return PacketManager.getPacket(AssemblyLine.CHANNEL, this, this.running, this.range);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double wattRequest()
|
||||
{
|
||||
return energyMax - electricityStored;
|
||||
return JOULES_REQUIRED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(TileEntity sender, double amps, double voltage, ForgeDirection side)
|
||||
{
|
||||
this.wattsReceived += ElectricInfo.getWatts(amps, voltage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -289,13 +308,6 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(TileEntity sender, double amps, double voltage, ForgeDirection side)
|
||||
{
|
||||
this.electricityStored += (amps * voltage);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to tell the belt not to apply velocity
|
||||
* to some Entity in case they are being
|
||||
|
@ -304,7 +316,7 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
*
|
||||
* @param entity
|
||||
*/
|
||||
public void ignore(Entity entity)
|
||||
public void ignoreEntity(Entity entity)
|
||||
{
|
||||
if (!this.entityIgnoreList.contains(entity))
|
||||
{
|
||||
|
@ -312,21 +324,4 @@ public class TileEntityConveyorBelt extends TileEntityElectricityReceiver implem
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.readFromNBT(nbt);
|
||||
this.electricityStored = nbt.getDouble("energy");
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a tile entity to NBT.
|
||||
*/
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt)
|
||||
{
|
||||
super.writeToNBT(nbt);
|
||||
nbt.setDouble("energy", this.electricityStored);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,15 +12,15 @@ import assemblyline.render.RenderHelper;
|
|||
|
||||
/**
|
||||
* A metadata block containing a bunch of machines with direction.
|
||||
* @author Darkguardsman
|
||||
* @author Darkguardsman, Calclavia
|
||||
*
|
||||
*/
|
||||
public class BlockInteraction extends BlockMachine
|
||||
{
|
||||
public static enum MachineType
|
||||
{
|
||||
EJECTOR("Ejector", 0, TileEntityEjector.class),
|
||||
INJECTOR("Injector", 4, TileEntityInjector.class),
|
||||
SORTER("Sorter", 0, TileEntitySorter.class),
|
||||
MANIPULATOR("Manipulator", 4, TileEntityManipulator.class),
|
||||
INVALID_1("Invalid", 8, null),
|
||||
INVALID_2("Invalid", 12, null);
|
||||
|
||||
|
@ -73,6 +73,9 @@ public class BlockInteraction extends BlockMachine
|
|||
return currentDirection + this.metadata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new TIleEntity.
|
||||
*/
|
||||
public TileEntity instantiateTileEntity()
|
||||
{
|
||||
try
|
||||
|
|
|
@ -9,9 +9,9 @@ import net.minecraft.src.Slot;
|
|||
|
||||
public class ContainerEjector extends Container
|
||||
{
|
||||
private TileEntityEjector tileEntity;
|
||||
private TileEntitySorter tileEntity;
|
||||
|
||||
public ContainerEjector(InventoryPlayer par1InventoryPlayer, TileEntityEjector tileEntity)
|
||||
public ContainerEjector(InventoryPlayer par1InventoryPlayer, TileEntitySorter tileEntity)
|
||||
{
|
||||
this.tileEntity = tileEntity;
|
||||
for(int i = 0; i < 4; i++)
|
||||
|
|
|
@ -19,7 +19,7 @@ import universalelectricity.prefab.network.IPacketReceiver;
|
|||
|
||||
import com.google.common.io.ByteArrayDataInput;
|
||||
|
||||
public class TileEntityInjector extends TileEntityElectricityReceiver implements IPacketReceiver, IInventory
|
||||
public class TileEntityManipulator extends TileEntityElectricityReceiver implements IPacketReceiver, IInventory
|
||||
{
|
||||
public float energyReq = .1f;
|
||||
public float energyMax = 10f;
|
|
@ -23,7 +23,7 @@ import assemblyline.TileEntityBase;
|
|||
import assemblyline.belts.TileEntityConveyorBelt;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class TileEntityEjector extends TileEntityBase implements IElectricityReceiver, IPacketReceiver
|
||||
public class TileEntitySorter extends TileEntityBase implements IElectricityReceiver, IPacketReceiver
|
||||
{
|
||||
/**
|
||||
* Joules required per tick.
|
||||
|
@ -107,7 +107,7 @@ public class TileEntityEjector extends TileEntityBase implements IElectricityRec
|
|||
this.firePiston = true;
|
||||
if (this.beltSide != null)
|
||||
{
|
||||
this.beltSide.ignore(entity);
|
||||
this.beltSide.ignoreEntity(entity);
|
||||
|
||||
}
|
||||
entity.motionX = (double) side.offsetX * 0.1;
|
|
@ -4,12 +4,12 @@ import net.minecraftforge.client.MinecraftForgeClient;
|
|||
import assemblyline.AssemblyLine;
|
||||
import assemblyline.ALCommonProxy;
|
||||
import assemblyline.belts.TileEntityConveyorBelt;
|
||||
import assemblyline.interaction.TileEntityEjector;
|
||||
import assemblyline.interaction.TileEntityInjector;
|
||||
import assemblyline.render.RenderEjector;
|
||||
import assemblyline.interaction.TileEntitySorter;
|
||||
import assemblyline.interaction.TileEntityManipulator;
|
||||
import assemblyline.render.RenderSorter;
|
||||
import assemblyline.render.RenderHelper;
|
||||
import assemblyline.render.RenderConveyorBelt;
|
||||
import assemblyline.render.RenderInjector;
|
||||
import assemblyline.render.RenderManipulator;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
|
@ -28,8 +28,8 @@ public class ALClientProxy extends ALCommonProxy
|
|||
// ClientRegistry.registerTileEntity(TileEntityConveyorBelt.class,
|
||||
// "belt", new RenderConveyorBelt());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityConveyorBelt.class, new RenderConveyorBelt());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEjector.class, new RenderEjector());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityInjector.class, new RenderInjector());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySorter.class, new RenderSorter());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityManipulator.class, new RenderManipulator());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,16 +8,16 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import assemblyline.AssemblyLine;
|
||||
import assemblyline.interaction.ContainerEjector;
|
||||
import assemblyline.interaction.TileEntityEjector;
|
||||
import assemblyline.interaction.TileEntitySorter;
|
||||
|
||||
public class GuiEjectorSettings extends GuiContainer
|
||||
{
|
||||
private TileEntityEjector tileEntity;
|
||||
private TileEntitySorter tileEntity;
|
||||
|
||||
private int containerWidth;
|
||||
private int containerHeight;
|
||||
|
||||
public GuiEjectorSettings(InventoryPlayer par1InventoryPlayer, TileEntityEjector tileEntity)
|
||||
public GuiEjectorSettings(InventoryPlayer par1InventoryPlayer, TileEntitySorter tileEntity)
|
||||
{
|
||||
super(new ContainerEjector(par1InventoryPlayer, tileEntity));
|
||||
this.tileEntity = tileEntity;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.src.Entity;
|
|||
import net.minecraft.src.ModelBase;
|
||||
import net.minecraft.src.ModelRenderer;
|
||||
|
||||
public class ModelInjector extends ModelBase
|
||||
public class ModelManipulator extends ModelBase
|
||||
{
|
||||
// fields
|
||||
ModelRenderer bBELTLong;
|
||||
|
@ -28,7 +28,7 @@ public class ModelInjector extends ModelBase
|
|||
ModelRenderer RCPanel;
|
||||
ModelRenderer LCPanel;
|
||||
|
||||
public ModelInjector()
|
||||
public ModelManipulator()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
|
@ -10,7 +10,7 @@ import net.minecraft.src.Entity;
|
|||
import net.minecraft.src.ModelBase;
|
||||
import net.minecraft.src.ModelRenderer;
|
||||
|
||||
public class ModelEjector extends ModelBase
|
||||
public class ModelSorter extends ModelBase
|
||||
{
|
||||
// fields
|
||||
ModelRenderer Base;
|
||||
|
@ -24,7 +24,7 @@ public class ModelEjector extends ModelBase
|
|||
ModelRenderer PistonShaft;
|
||||
ModelRenderer PistonFace;
|
||||
|
||||
public ModelEjector()
|
||||
public ModelSorter()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
|
@ -1,43 +0,0 @@
|
|||
package assemblyline.render;
|
||||
|
||||
import net.minecraft.src.TileEntity;
|
||||
import net.minecraft.src.TileEntitySpecialRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import assemblyline.AssemblyLine;
|
||||
import assemblyline.interaction.TileEntityInjector;
|
||||
import assemblyline.model.ModelDropBox;
|
||||
|
||||
public class RenderDropBox extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelDropBox model = new ModelDropBox();
|
||||
|
||||
public void renderAModelAt(TileEntityInjector tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
int face = tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
|
||||
bindTextureByName(AssemblyLine.TEXTURE_PATH+"DropBox.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
|
||||
switch(face)
|
||||
{
|
||||
case 4: GL11.glRotatef(180f, 0f, 1f, 0f); break;
|
||||
case 6: GL11.glRotatef(0f, 0f, 1f, 0f); break;
|
||||
case 5: GL11.glRotatef(270f, 0f, 1f, 0f); break;
|
||||
case 7: GL11.glRotatef(90f, 0f, 1f, 0f); break;
|
||||
}
|
||||
System.out.println("RENDERIN DROP BOX");
|
||||
model.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.renderAModelAt((TileEntityInjector)tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
|
||||
}
|
|
@ -9,8 +9,8 @@ import org.lwjgl.opengl.GL11;
|
|||
import assemblyline.AssemblyLine;
|
||||
import assemblyline.interaction.BlockInteraction.MachineType;
|
||||
import assemblyline.model.ModelConveyorBelt;
|
||||
import assemblyline.model.ModelEjector;
|
||||
import assemblyline.model.ModelInjector;
|
||||
import assemblyline.model.ModelSorter;
|
||||
import assemblyline.model.ModelManipulator;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
@ -20,8 +20,8 @@ public class RenderHelper implements ISimpleBlockRenderingHandler
|
|||
public static RenderHelper instance = new RenderHelper();
|
||||
public static final int BLOCK_RENDER_ID = RenderingRegistry.getNextAvailableRenderId();
|
||||
private ModelConveyorBelt modelConveyorBelt = new ModelConveyorBelt();
|
||||
private ModelEjector modelEjector = new ModelEjector();
|
||||
private ModelInjector modelInjector = new ModelInjector();
|
||||
private ModelSorter modelEjector = new ModelSorter();
|
||||
private ModelManipulator modelInjector = new ModelManipulator();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
|
@ -37,7 +37,7 @@ public class RenderHelper implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
else if (block.blockID == AssemblyLine.blockInteraction.blockID)
|
||||
{
|
||||
if(metadata == MachineType.EJECTOR.metadata)
|
||||
if(metadata == MachineType.SORTER.metadata)
|
||||
{
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(AssemblyLine.TEXTURE_PATH+"ejector.png"));
|
||||
GL11.glPushMatrix();
|
||||
|
@ -48,7 +48,7 @@ public class RenderHelper implements ISimpleBlockRenderingHandler
|
|||
modelEjector.renderPiston(0.0625F, 1);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if(metadata == MachineType.INJECTOR.metadata)
|
||||
else if(metadata == MachineType.MANIPULATOR.metadata)
|
||||
{
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, FMLClientHandler.instance().getClient().renderEngine.getTexture(AssemblyLine.TEXTURE_PATH+"injector.png"));
|
||||
GL11.glPushMatrix();
|
||||
|
|
|
@ -7,14 +7,14 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import assemblyline.AssemblyLine;
|
||||
import assemblyline.belts.TileEntityConveyorBelt;
|
||||
import assemblyline.interaction.TileEntityInjector;
|
||||
import assemblyline.model.ModelInjector;
|
||||
import assemblyline.interaction.TileEntityManipulator;
|
||||
import assemblyline.model.ModelManipulator;
|
||||
|
||||
public class RenderInjector extends TileEntitySpecialRenderer
|
||||
public class RenderManipulator extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelInjector model = new ModelInjector();
|
||||
private ModelManipulator model = new ModelManipulator();
|
||||
|
||||
public void renderAModelAt(TileEntityInjector tileEntity, double x, double y, double z, float f)
|
||||
public void renderAModelAt(TileEntityManipulator tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
String flip = "";//if(tileEntity.flip){flip = "F";}
|
||||
int face = tileEntity.getBeltDirection();
|
||||
|
@ -40,7 +40,7 @@ public class RenderInjector extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.renderAModelAt((TileEntityInjector)tileEntity, var2, var4, var6, var8);
|
||||
this.renderAModelAt((TileEntityManipulator)tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
|
||||
}
|
|
@ -6,14 +6,14 @@ import net.minecraft.src.TileEntitySpecialRenderer;
|
|||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import assemblyline.AssemblyLine;
|
||||
import assemblyline.interaction.TileEntityEjector;
|
||||
import assemblyline.model.ModelEjector;
|
||||
import assemblyline.interaction.TileEntitySorter;
|
||||
import assemblyline.model.ModelSorter;
|
||||
|
||||
public class RenderEjector extends TileEntitySpecialRenderer
|
||||
public class RenderSorter extends TileEntitySpecialRenderer
|
||||
{
|
||||
private ModelEjector model = new ModelEjector();
|
||||
private ModelSorter model = new ModelSorter();
|
||||
|
||||
public void renderAModelAt(TileEntityEjector tileEntity, double x, double y, double z, float f)
|
||||
public void renderAModelAt(TileEntitySorter tileEntity, double x, double y, double z, float f)
|
||||
{
|
||||
boolean fire = tileEntity.firePiston;
|
||||
int face = tileEntity.getDirection(tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord));
|
||||
|
@ -36,7 +36,7 @@ public class RenderEjector extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double var2, double var4, double var6, float var8)
|
||||
{
|
||||
this.renderAModelAt((TileEntityEjector)tileEntity, var2, var4, var6, var8);
|
||||
this.renderAModelAt((TileEntitySorter)tileEntity, var2, var4, var6, var8);
|
||||
}
|
||||
|
||||
}
|