Pre for update.Archived 1.2.5 Code
|
@ -351,14 +351,20 @@ else if(entityBox instanceof TileEntityBoiler)
|
|||
// TODO Auto-generated method stub
|
||||
return "/eui/blocks.png";
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public boolean isOpaqueCube()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderAsNormalBlock()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getRenderType()
|
||||
{
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
public void addCreativeItems(ArrayList itemList) {
|
||||
itemList.add(new ItemStack(this, 1,1));//boiler
|
155
1.2.5/eui/boiler/ModelTank.java
Normal file
|
@ -0,0 +1,155 @@
|
|||
// Date: 8/14/2012 1:48:41 AM
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package net.minecraft.src.eui.boiler;
|
||||
|
||||
import net.minecraft.src.Entity;
|
||||
import net.minecraft.src.ModelBase;
|
||||
import net.minecraft.src.ModelRenderer;
|
||||
|
||||
public class ModelTank extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer TANK_WALL_1;
|
||||
ModelRenderer TANK_WALL_2;
|
||||
ModelRenderer TANK_WALL_3;
|
||||
ModelRenderer TANK_WALL_4;
|
||||
ModelRenderer TANK_SUPPORT_1;
|
||||
ModelRenderer TANK_TOP_1;
|
||||
ModelRenderer TANK_WALL_5;
|
||||
ModelRenderer TANK_SUPPORT_2;
|
||||
ModelRenderer TANK_SUPPORT_3;
|
||||
ModelRenderer TANK_WALL_6;
|
||||
ModelRenderer TANK_TOP_2;
|
||||
ModelRenderer TANK_TOP_3;
|
||||
ModelRenderer TANK_VALVE;
|
||||
|
||||
public ModelTank()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
TANK_WALL_1 = new ModelRenderer(this, 0, 49);
|
||||
TANK_WALL_1.addBox(0F, 0F, 0F, 1, 12, 8);
|
||||
TANK_WALL_1.setRotationPoint(6F, 12F, -4F);
|
||||
TANK_WALL_1.setTextureSize(128, 128);
|
||||
TANK_WALL_1.mirror = true;
|
||||
setRotation(TANK_WALL_1, 0F, 0F, 0F);
|
||||
TANK_WALL_2 = new ModelRenderer(this, 0, 70);
|
||||
TANK_WALL_2.addBox(0F, 0F, 0F, 1, 12, 7);
|
||||
TANK_WALL_2.setRotationPoint(-8F, 12F, -4F);
|
||||
TANK_WALL_2.setTextureSize(128, 128);
|
||||
TANK_WALL_2.mirror = true;
|
||||
setRotation(TANK_WALL_2, 0F, 0F, 0F);
|
||||
TANK_WALL_3 = new ModelRenderer(this, 0, 34);
|
||||
TANK_WALL_3.addBox(0F, 0F, 0F, 8, 12, 1);
|
||||
TANK_WALL_3.setRotationPoint(0F, 12F, 8F);
|
||||
TANK_WALL_3.setTextureSize(128, 128);
|
||||
TANK_WALL_3.mirror = true;
|
||||
setRotation(TANK_WALL_3, 0F, 2.617994F, 0F);
|
||||
TANK_WALL_4 = new ModelRenderer(this, 0, 34);
|
||||
TANK_WALL_4.addBox(0F, 0F, 0F, 8, 12, 1);
|
||||
TANK_WALL_4.setRotationPoint(0F, 12F, -8F);
|
||||
TANK_WALL_4.setTextureSize(128, 128);
|
||||
TANK_WALL_4.mirror = true;
|
||||
setRotation(TANK_WALL_4, 0F, -0.5235988F, 0F);
|
||||
TANK_SUPPORT_1 = new ModelRenderer(this, 43, 22);
|
||||
TANK_SUPPORT_1.addBox(-1F, 0F, -8F, 2, 14, 16);
|
||||
TANK_SUPPORT_1.setRotationPoint(0F, 10F, 0F);
|
||||
TANK_SUPPORT_1.setTextureSize(128, 128);
|
||||
TANK_SUPPORT_1.mirror = true;
|
||||
setRotation(TANK_SUPPORT_1, 0F, 0F, 0F);
|
||||
TANK_TOP_1 = new ModelRenderer(this, 43, 11);
|
||||
TANK_TOP_1.addBox(-8F, 0F, -4F, 16, 2, 8);
|
||||
TANK_TOP_1.setRotationPoint(0F, 10F, 0F);
|
||||
TANK_TOP_1.setTextureSize(128, 128);
|
||||
TANK_TOP_1.mirror = true;
|
||||
setRotation(TANK_TOP_1, 0F, 0F, 0F);
|
||||
TANK_WALL_5 = new ModelRenderer(this, 0, 34);
|
||||
TANK_WALL_5.addBox(0F, 0F, 0F, 8, 12, 1);
|
||||
TANK_WALL_5.setRotationPoint(0F, 12F, -7F);
|
||||
TANK_WALL_5.setTextureSize(128, 128);
|
||||
TANK_WALL_5.mirror = true;
|
||||
setRotation(TANK_WALL_5, 0F, -2.617994F, 0F);
|
||||
TANK_SUPPORT_2 = new ModelRenderer(this, 0, 0);
|
||||
TANK_SUPPORT_2.addBox(-1F, 0F, -9F, 2, 14, 18);
|
||||
TANK_SUPPORT_2.setRotationPoint(0F, 10F, 0F);
|
||||
TANK_SUPPORT_2.setTextureSize(128, 128);
|
||||
TANK_SUPPORT_2.mirror = true;
|
||||
setRotation(TANK_SUPPORT_2, 0F, 1.047198F, 0F);
|
||||
TANK_SUPPORT_3 = new ModelRenderer(this, 0, 0);
|
||||
TANK_SUPPORT_3.addBox(-1F, 0F, -9F, 2, 14, 18);
|
||||
TANK_SUPPORT_3.setRotationPoint(0F, 10F, 0F);
|
||||
TANK_SUPPORT_3.setTextureSize(128, 128);
|
||||
TANK_SUPPORT_3.mirror = true;
|
||||
setRotation(TANK_SUPPORT_3, 0F, -1.047198F, 0F);
|
||||
TANK_WALL_6 = new ModelRenderer(this, 0, 34);
|
||||
TANK_WALL_6.addBox(0F, 0F, 0F, 8, 12, 1);
|
||||
TANK_WALL_6.setRotationPoint(0F, 12F, 7F);
|
||||
TANK_WALL_6.setTextureSize(128, 128);
|
||||
TANK_WALL_6.mirror = true;
|
||||
setRotation(TANK_WALL_6, 0F, 0.5235988F, 0F);
|
||||
TANK_TOP_2 = new ModelRenderer(this, 43, 0);
|
||||
TANK_TOP_2.addBox(-6F, 0F, -4F, 12, 2, 8);
|
||||
TANK_TOP_2.setRotationPoint(0F, 10F, 0F);
|
||||
TANK_TOP_2.setTextureSize(128, 128);
|
||||
TANK_TOP_2.mirror = true;
|
||||
setRotation(TANK_TOP_2, 0F, 1.047198F, 0F);
|
||||
TANK_TOP_3 = new ModelRenderer(this, 43, 0);
|
||||
TANK_TOP_3.addBox(-6F, 0F, -4F, 12, 2, 8);
|
||||
TANK_TOP_3.setRotationPoint(0F, 10F, 0F);
|
||||
TANK_TOP_3.setTextureSize(128, 128);
|
||||
TANK_TOP_3.mirror = true;
|
||||
setRotation(TANK_TOP_3, 0F, -1.047198F, 0F);
|
||||
TANK_VALVE = new ModelRenderer(this, 84, 0);
|
||||
TANK_VALVE.addBox(0F, 0F, 0F, 2, 1, 2);
|
||||
TANK_VALVE.setRotationPoint(-1F, 9F, -1F);
|
||||
TANK_VALVE.setTextureSize(128, 128);
|
||||
TANK_VALVE.mirror = true;
|
||||
setRotation(TANK_VALVE, 0F, 0F, 0F);
|
||||
}
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
generalRender(f5);
|
||||
}
|
||||
public void generalRender(float f5)
|
||||
{
|
||||
TANK_WALL_1.render(f5);
|
||||
TANK_WALL_2.render(f5);
|
||||
TANK_WALL_3.render(f5);
|
||||
TANK_WALL_4.render(f5);
|
||||
TANK_SUPPORT_1.render(f5);
|
||||
TANK_TOP_1.render(f5);
|
||||
TANK_WALL_5.render(f5);
|
||||
TANK_SUPPORT_2.render(f5);
|
||||
TANK_SUPPORT_3.render(f5);
|
||||
TANK_WALL_6.render(f5);
|
||||
TANK_TOP_2.render(f5);
|
||||
TANK_TOP_3.render(f5);
|
||||
TANK_VALVE.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
}
|
||||
|
||||
}
|
27
1.2.5/eui/boiler/RenderBoiler.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package net.minecraft.src.eui.boiler;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.src.*;
|
||||
|
||||
public class RenderBoiler extends TileEntitySpecialRenderer
|
||||
{
|
||||
int type = 0;
|
||||
private ModelTank model;
|
||||
|
||||
public RenderBoiler()
|
||||
{
|
||||
model = new ModelTank();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float d3) {
|
||||
bindTextureByName("/eui/tankTexture.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
model.generalRender(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
82
1.2.5/eui/burner/FurnaceModel.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
// Date: 8/14/2012 3:02:31 AM
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package net.minecraft.src.eui.burner;
|
||||
|
||||
import net.minecraft.src.Entity;
|
||||
import net.minecraft.src.ModelBase;
|
||||
import net.minecraft.src.ModelRenderer;
|
||||
|
||||
public class FurnaceModel extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer Body;
|
||||
ModelRenderer top;
|
||||
ModelRenderer bottom;
|
||||
ModelRenderer Shape1;
|
||||
|
||||
public FurnaceModel()
|
||||
{
|
||||
textureWidth = 256;
|
||||
textureHeight = 256;
|
||||
|
||||
Body = new ModelRenderer(this, 0, 0);
|
||||
Body.addBox(-8F, -8F, -8F, 14, 14, 12);
|
||||
Body.setRotationPoint(1F, 18F, 1F);
|
||||
Body.setTextureSize(256, 256);
|
||||
Body.mirror = true;
|
||||
setRotation(Body, 0F, 0F, 0F);
|
||||
top = new ModelRenderer(this, 80, 20);
|
||||
top.addBox(-8F, 0F, -8F, 16, 2, 16);
|
||||
top.setRotationPoint(0F, 8F, 0F);
|
||||
top.setTextureSize(256, 256);
|
||||
top.mirror = true;
|
||||
setRotation(top, 0F, 0F, 0F);
|
||||
bottom = new ModelRenderer(this, 80, 0);
|
||||
bottom.addBox(-8F, 22F, -8F, 16, 2, 16);
|
||||
bottom.setRotationPoint(0F, 0F, 0F);
|
||||
bottom.setTextureSize(256, 256);
|
||||
bottom.mirror = true;
|
||||
setRotation(bottom, 0F, 0F, 0F);
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(-4F, -4F, 0F, 10, 8, 1);
|
||||
Shape1.setRotationPoint(-1F, 16F, 5F);
|
||||
Shape1.setTextureSize(256, 256);
|
||||
Shape1.mirror = true;
|
||||
setRotation(Shape1, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
genRender(f5);
|
||||
}
|
||||
public void genRender(float f5)
|
||||
{
|
||||
Body.render(f5);
|
||||
top.render(f5);
|
||||
bottom.render(f5);
|
||||
Shape1.render(f5);
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
}
|
||||
|
||||
}
|
27
1.2.5/eui/burner/RenderFurnace.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package net.minecraft.src.eui.burner;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.src.*;
|
||||
|
||||
public class RenderFurnace extends TileEntitySpecialRenderer
|
||||
{
|
||||
int type = 0;
|
||||
private FurnaceModel model;
|
||||
|
||||
public RenderFurnace()
|
||||
{
|
||||
model = new FurnaceModel();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float d3) {
|
||||
bindTextureByName("/eui/Furnace.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
model.genRender(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
|
@ -22,12 +22,15 @@ public class EntityRobot extends EntityCreature {
|
|||
@Override
|
||||
public void onEntityUpdate()
|
||||
{
|
||||
super.onEntityUpdate();
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
updateCount++;
|
||||
//used for emping of bot or empty battery
|
||||
isDisabled = true;
|
||||
if(disabled <=0)
|
||||
{
|
||||
super.onEntityUpdate();
|
||||
|
||||
isDisabled = false;
|
||||
}
|
||||
if(!isDisabled && updateCount >= 10)
|
||||
|
@ -37,6 +40,7 @@ public class EntityRobot extends EntityCreature {
|
|||
--battery;
|
||||
botUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//update function to control how fast the bot updates to reduce load
|
||||
|
@ -82,7 +86,7 @@ public class EntityRobot extends EntityCreature {
|
|||
}
|
||||
else
|
||||
{
|
||||
this.isLinked = false;
|
||||
this.isLinked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -216,21 +220,38 @@ public boolean harvest(Vector3 BlockLoc)
|
|||
if(PathToItem != null){
|
||||
this.setPathToEntity(PathToItem);
|
||||
this.moveSpeed = 1.0F;
|
||||
if(thisBot.distanceTo(BlockLoc) < 2)
|
||||
if(thisBot.distanceTo(BlockLoc) < 4)
|
||||
{
|
||||
int blockTargetc = worldObj.getBlockId(x, y, z);
|
||||
boolean harvested = worldObj.setBlock(x, y, z, 0);
|
||||
if(blockTargetc ==0)
|
||||
{
|
||||
harvested = true;
|
||||
}
|
||||
ModLoader.getMinecraftInstance().thePlayer.addChatMessage("Harvesting Block "+blockTargetc);
|
||||
if(blockTargetc > 0)
|
||||
if(blockTargetc > 0 && harvested)
|
||||
{
|
||||
EntityItem dropedItem = new EntityItem(worldObj, x, y - 0.3D, z, new ItemStack(blockTargetc,1,1));
|
||||
worldObj.spawnEntityInWorld(dropedItem);
|
||||
if(getController() != null)
|
||||
{
|
||||
getController().ClearFromList(BlockLoc);
|
||||
}
|
||||
}
|
||||
return harvested;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public TileEntityComp getController()
|
||||
{
|
||||
TileEntity comp = worldObj.getBlockTileEntity(this.linkFrq[0], this.linkFrq[1], this.linkFrq[2]);
|
||||
if(comp instanceof TileEntityComp)
|
||||
{
|
||||
return (TileEntityComp) comp;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public EntityItem findClosestItem(double par1, double par3, double par5, double par7)
|
||||
{
|
||||
double var9 = -1.0D;
|
|
@ -2,6 +2,7 @@ package net.minecraft.src.eui.robotics;
|
|||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -27,8 +28,11 @@ public class TileEntityComp extends TileEntityElectricUnit {
|
|||
int lastScanXDif=0;
|
||||
int lastScanYDif=0;
|
||||
int lastScanZDif=0;
|
||||
Vector3[] harvestList={null,null,null,null,null,null,null,null,null,null};
|
||||
public void onUpdate(float watts, float voltage, byte side)
|
||||
{
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
++updateCount;
|
||||
cleanList();
|
||||
for(int b =0;b<4;b++)
|
||||
|
@ -46,16 +50,16 @@ public class TileEntityComp extends TileEntityElectricUnit {
|
|||
BotList[b]=bot;
|
||||
}
|
||||
}
|
||||
if(updateCount >= 100 && worldObj.checkChunksExist(xCoord, yCoord, zCoord, xCoord+1, yCoord+1, zCoord+1))
|
||||
if(updateCount >= 50 && worldObj.checkChunksExist(xCoord, yCoord, zCoord, xCoord+1, yCoord+1, zCoord+1))
|
||||
{
|
||||
++scanCount;
|
||||
if(scanCount < 10){hasScanned = true;}else{scanCount = 0;hasScanned=false;}
|
||||
Vector3 thisBlock = new Vector3(this.xCoord,this.yCoord,this.zCoord);
|
||||
updateCount = 0;
|
||||
Vector3 targetVec = findBlock(thisBlock,Block.leaves,2,hasScanned);
|
||||
Vector3 targetVec = findBlock(thisBlock,Block.leaves,20,hasScanned);
|
||||
if(targetVec == null)
|
||||
{
|
||||
targetVec = findBlock(thisBlock,Block.wood,2,hasScanned);
|
||||
targetVec = findBlock(thisBlock,Block.wood,20,hasScanned);
|
||||
}
|
||||
if(targetVec != null)
|
||||
{
|
||||
|
@ -79,7 +83,7 @@ public class TileEntityComp extends TileEntityElectricUnit {
|
|||
ModLoader.getMinecraftInstance().thePlayer.addChatMessage("N/A");//nothing found from scan
|
||||
scanCount = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
@ -155,8 +159,16 @@ public class TileEntityComp extends TileEntityElectricUnit {
|
|||
if(blockTargetID == block.blockID)
|
||||
{
|
||||
Vector3 targetBlock = new Vector3(x,y,z);
|
||||
if(!onHarvestList(targetBlock))
|
||||
{
|
||||
//ModLoader.getMinecraftInstance().thePlayer.addChatMessage("Target Block Found");
|
||||
return targetBlock;
|
||||
boolean taskAdded = addHarvest(targetBlock);
|
||||
if(taskAdded)
|
||||
{
|
||||
return targetBlock;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
z += zChange;
|
||||
|
@ -173,6 +185,43 @@ public class TileEntityComp extends TileEntityElectricUnit {
|
|||
return null;
|
||||
|
||||
}
|
||||
private boolean addHarvest(Vector3 targetBlock) {
|
||||
for(int i = 0;i < 10;i++)
|
||||
{
|
||||
if(harvestList[i] != targetBlock)
|
||||
{
|
||||
harvestList[i]=targetBlock;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
private boolean onHarvestList(Vector3 targetBlock) {
|
||||
for(int i = 0;i < 10;i++)
|
||||
{
|
||||
if(harvestList[i] == targetBlock)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public boolean ClearFromList(Vector3 targetBlock) {
|
||||
for(int i = 0;i < 10;i++)
|
||||
{
|
||||
if(harvestList[i] == targetBlock)
|
||||
{
|
||||
harvestList[i] = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public EntityRobot[] getControlList()
|
||||
{
|
||||
return BotList;
|
242
1.2.5/eui/turbine/EngineSmallModel.java
Normal file
|
@ -0,0 +1,242 @@
|
|||
// Date: 8/14/2012 3:20:15 AM
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package net.minecraft.src.eui.turbine;
|
||||
|
||||
import net.minecraft.src.Entity;
|
||||
import net.minecraft.src.ModelBase;
|
||||
import net.minecraft.src.ModelRenderer;
|
||||
|
||||
public class EngineSmallModel extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer BASE;
|
||||
ModelRenderer PISTON_WALL_1;
|
||||
ModelRenderer PISTON_HEAD_MOVES;
|
||||
ModelRenderer PISTON_TURNER_MOVES;
|
||||
ModelRenderer PISTON_ARM_MOVES;
|
||||
ModelRenderer GEAR_A_NECK;
|
||||
ModelRenderer PISTON_WALL_2;
|
||||
ModelRenderer PISTON_WALL_3;
|
||||
ModelRenderer PISTON_WALL_4;
|
||||
ModelRenderer PISTON_SUPPORT_1;
|
||||
ModelRenderer PISTON_SUPPORT_2;
|
||||
ModelRenderer FORCE_CONDUCTOR_BOX;
|
||||
ModelRenderer GEAR_A_TEETH_1_ROTATES;
|
||||
ModelRenderer GEAR_A_TEETH_2_ROTATES;
|
||||
ModelRenderer GEAR_A_TEETH_3_ROTATES;
|
||||
ModelRenderer FORCE_TRANSMITTER_ROTATES;
|
||||
ModelRenderer GEAR_B_TEETH_1_ROTATES;
|
||||
ModelRenderer GEAR_B_TEETH_2_ROTATES;
|
||||
ModelRenderer GEAR_B_TEETH_3_ROTATES;
|
||||
ModelRenderer SUPPORT_PLATE;
|
||||
ModelRenderer ORNAMENT_1;
|
||||
ModelRenderer ORNAMENT_2;
|
||||
ModelRenderer LEVER_1_CAN_BE_TURNED;
|
||||
ModelRenderer LEVER_2_CAN_BE_TURNED;
|
||||
|
||||
public EngineSmallModel()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 128;
|
||||
|
||||
BASE = new ModelRenderer(this, 0, 0);
|
||||
BASE.addBox(0F, 0F, 0F, 16, 1, 16);
|
||||
BASE.setRotationPoint(-8F, 23F, -8F);
|
||||
BASE.setTextureSize(128, 128);
|
||||
BASE.mirror = true;
|
||||
setRotation(BASE, 0F, 0F, 0F);
|
||||
PISTON_WALL_1 = new ModelRenderer(this, 0, 18);
|
||||
PISTON_WALL_1.addBox(0F, 0F, 0F, 7, 1, 4);
|
||||
PISTON_WALL_1.setRotationPoint(0F, 22F, 1F);
|
||||
PISTON_WALL_1.setTextureSize(128, 128);
|
||||
PISTON_WALL_1.mirror = true;
|
||||
setRotation(PISTON_WALL_1, 1.570796F, 0F, 0F);
|
||||
PISTON_HEAD_MOVES = new ModelRenderer(this, 0, 24);
|
||||
PISTON_HEAD_MOVES.addBox(0F, -2F, -2F, 4, 4, 4);
|
||||
PISTON_HEAD_MOVES.setRotationPoint(0F, 20F, 4F);
|
||||
PISTON_HEAD_MOVES.setTextureSize(128, 128);
|
||||
PISTON_HEAD_MOVES.mirror = true;
|
||||
setRotation(PISTON_HEAD_MOVES, 0F, 0F, 0F);
|
||||
PISTON_TURNER_MOVES = new ModelRenderer(this, 0, 33);
|
||||
PISTON_TURNER_MOVES.addBox(0F, -1F, -1F, 1, 2, 2);
|
||||
PISTON_TURNER_MOVES.setRotationPoint(-1F, 20F, 4F);
|
||||
PISTON_TURNER_MOVES.setTextureSize(128, 128);
|
||||
PISTON_TURNER_MOVES.mirror = true;
|
||||
setRotation(PISTON_TURNER_MOVES, 0F, 0F, 0F);
|
||||
PISTON_ARM_MOVES = new ModelRenderer(this, 0, 38);
|
||||
PISTON_ARM_MOVES.addBox(0F, 0F, -1F, 4, 1, 1);
|
||||
PISTON_ARM_MOVES.setRotationPoint(-5F, 19F, 4F);
|
||||
PISTON_ARM_MOVES.setTextureSize(128, 128);
|
||||
PISTON_ARM_MOVES.mirror = true;
|
||||
setRotation(PISTON_ARM_MOVES, 0F, 0F, 0F);
|
||||
GEAR_A_NECK = new ModelRenderer(this, 65, 25);
|
||||
GEAR_A_NECK.addBox(-1F, -1F, 0F, 2, 2, 1);
|
||||
GEAR_A_NECK.setRotationPoint(-4F, 19F, -4F);
|
||||
GEAR_A_NECK.setTextureSize(128, 128);
|
||||
GEAR_A_NECK.mirror = true;
|
||||
setRotation(GEAR_A_NECK, 0F, 0F, 0F);
|
||||
PISTON_WALL_2 = new ModelRenderer(this, 0, 18);
|
||||
PISTON_WALL_2.addBox(0F, 0F, 0F, 7, 1, 4);
|
||||
PISTON_WALL_2.setRotationPoint(0F, 17F, 2F);
|
||||
PISTON_WALL_2.setTextureSize(128, 128);
|
||||
PISTON_WALL_2.mirror = true;
|
||||
setRotation(PISTON_WALL_2, 0F, 0F, 0F);
|
||||
PISTON_WALL_3 = new ModelRenderer(this, 0, 18);
|
||||
PISTON_WALL_3.addBox(0F, 0F, 0F, 7, 1, 4);
|
||||
PISTON_WALL_3.setRotationPoint(0F, 22F, 2F);
|
||||
PISTON_WALL_3.setTextureSize(128, 128);
|
||||
PISTON_WALL_3.mirror = true;
|
||||
setRotation(PISTON_WALL_3, 0F, 0F, 0F);
|
||||
PISTON_WALL_4 = new ModelRenderer(this, 0, 18);
|
||||
PISTON_WALL_4.addBox(0F, 0F, 0F, 7, 1, 4);
|
||||
PISTON_WALL_4.setRotationPoint(0F, 22F, 6F);
|
||||
PISTON_WALL_4.setTextureSize(128, 128);
|
||||
PISTON_WALL_4.mirror = true;
|
||||
setRotation(PISTON_WALL_4, 1.570796F, 0F, 0F);
|
||||
PISTON_SUPPORT_1 = new ModelRenderer(this, 0, 41);
|
||||
PISTON_SUPPORT_1.addBox(0F, 0F, 0F, 1, 8, 6);
|
||||
PISTON_SUPPORT_1.setRotationPoint(7F, 15F, 1F);
|
||||
PISTON_SUPPORT_1.setTextureSize(128, 128);
|
||||
PISTON_SUPPORT_1.mirror = true;
|
||||
setRotation(PISTON_SUPPORT_1, 0F, 0F, 0F);
|
||||
PISTON_SUPPORT_2 = new ModelRenderer(this, 0, 57);
|
||||
PISTON_SUPPORT_2.addBox(0F, 0F, 0F, 1, 4, 4);
|
||||
PISTON_SUPPORT_2.setRotationPoint(7F, 12F, 4F);
|
||||
PISTON_SUPPORT_2.setTextureSize(128, 128);
|
||||
PISTON_SUPPORT_2.mirror = true;
|
||||
setRotation(PISTON_SUPPORT_2, -0.7853982F, 0F, 0F);
|
||||
FORCE_CONDUCTOR_BOX = new ModelRenderer(this, 65, 0);
|
||||
FORCE_CONDUCTOR_BOX.addBox(0F, 0F, 0F, 4, 5, 6);
|
||||
FORCE_CONDUCTOR_BOX.setRotationPoint(-6F, 18F, -3F);
|
||||
FORCE_CONDUCTOR_BOX.setTextureSize(128, 128);
|
||||
FORCE_CONDUCTOR_BOX.mirror = true;
|
||||
setRotation(FORCE_CONDUCTOR_BOX, 0F, 0F, 0F);
|
||||
GEAR_A_TEETH_1_ROTATES = new ModelRenderer(this, 93, 0);
|
||||
GEAR_A_TEETH_1_ROTATES.addBox(-3F, -1F, 0F, 6, 2, 1);
|
||||
GEAR_A_TEETH_1_ROTATES.setRotationPoint(-4F, 19F, -5F);
|
||||
GEAR_A_TEETH_1_ROTATES.setTextureSize(128, 128);
|
||||
GEAR_A_TEETH_1_ROTATES.mirror = true;
|
||||
setRotation(GEAR_A_TEETH_1_ROTATES, 0F, 0F, 0F);
|
||||
GEAR_A_TEETH_2_ROTATES = new ModelRenderer(this, 93, 0);
|
||||
GEAR_A_TEETH_2_ROTATES.addBox(-3F, -1F, 0F, 6, 2, 1);
|
||||
GEAR_A_TEETH_2_ROTATES.setRotationPoint(-4F, 19F, -5F);
|
||||
GEAR_A_TEETH_2_ROTATES.setTextureSize(128, 128);
|
||||
GEAR_A_TEETH_2_ROTATES.mirror = true;
|
||||
setRotation(GEAR_A_TEETH_2_ROTATES, 0F, 0F, 1.047198F);
|
||||
GEAR_A_TEETH_3_ROTATES = new ModelRenderer(this, 93, 0);
|
||||
GEAR_A_TEETH_3_ROTATES.addBox(-3F, -1F, 0F, 6, 2, 1);
|
||||
GEAR_A_TEETH_3_ROTATES.setRotationPoint(-4F, 19F, -5F);
|
||||
GEAR_A_TEETH_3_ROTATES.setTextureSize(128, 128);
|
||||
GEAR_A_TEETH_3_ROTATES.mirror = true;
|
||||
setRotation(GEAR_A_TEETH_3_ROTATES, 0F, 0F, -1.047198F);
|
||||
FORCE_TRANSMITTER_ROTATES = new ModelRenderer(this, 65, 25);
|
||||
FORCE_TRANSMITTER_ROTATES.addBox(-1F, -1F, 0F, 2, 2, 1);
|
||||
FORCE_TRANSMITTER_ROTATES.setRotationPoint(0F, 17F, -8F);
|
||||
FORCE_TRANSMITTER_ROTATES.setTextureSize(128, 128);
|
||||
FORCE_TRANSMITTER_ROTATES.mirror = true;
|
||||
setRotation(FORCE_TRANSMITTER_ROTATES, 0F, 0F, 0F);
|
||||
GEAR_B_TEETH_1_ROTATES = new ModelRenderer(this, 93, 5);
|
||||
GEAR_B_TEETH_1_ROTATES.addBox(-3F, -1F, 0F, 6, 2, 3);
|
||||
GEAR_B_TEETH_1_ROTATES.setRotationPoint(0F, 17F, -7F);
|
||||
GEAR_B_TEETH_1_ROTATES.setTextureSize(128, 128);
|
||||
GEAR_B_TEETH_1_ROTATES.mirror = true;
|
||||
setRotation(GEAR_B_TEETH_1_ROTATES, 0F, 0F, 0F);
|
||||
GEAR_B_TEETH_2_ROTATES = new ModelRenderer(this, 93, 5);
|
||||
GEAR_B_TEETH_2_ROTATES.addBox(-3F, -1F, 0F, 6, 2, 3);
|
||||
GEAR_B_TEETH_2_ROTATES.setRotationPoint(0F, 17F, -7F);
|
||||
GEAR_B_TEETH_2_ROTATES.setTextureSize(128, 128);
|
||||
GEAR_B_TEETH_2_ROTATES.mirror = true;
|
||||
setRotation(GEAR_B_TEETH_2_ROTATES, 0F, 0F, 1.047198F);
|
||||
GEAR_B_TEETH_3_ROTATES = new ModelRenderer(this, 93, 5);
|
||||
GEAR_B_TEETH_3_ROTATES.addBox(-3F, -1F, 0F, 6, 2, 3);
|
||||
GEAR_B_TEETH_3_ROTATES.setRotationPoint(0F, 17F, -7F);
|
||||
GEAR_B_TEETH_3_ROTATES.setTextureSize(128, 128);
|
||||
GEAR_B_TEETH_3_ROTATES.mirror = true;
|
||||
setRotation(GEAR_B_TEETH_3_ROTATES, 0F, 0F, -1.047198F);
|
||||
SUPPORT_PLATE = new ModelRenderer(this, 65, 12);
|
||||
SUPPORT_PLATE.addBox(0F, 0F, 0F, 9, 8, 4);
|
||||
SUPPORT_PLATE.setRotationPoint(-1F, 15F, -4F);
|
||||
SUPPORT_PLATE.setTextureSize(128, 128);
|
||||
SUPPORT_PLATE.mirror = true;
|
||||
setRotation(SUPPORT_PLATE, 0F, 0F, 0F);
|
||||
ORNAMENT_1 = new ModelRenderer(this, 86, 0);
|
||||
ORNAMENT_1.addBox(0F, 0F, 0F, 1, 4, 2);
|
||||
ORNAMENT_1.setRotationPoint(6F, 19F, -5F);
|
||||
ORNAMENT_1.setTextureSize(128, 128);
|
||||
ORNAMENT_1.mirror = true;
|
||||
setRotation(ORNAMENT_1, -0.2094395F, 0F, 0F);
|
||||
ORNAMENT_2 = new ModelRenderer(this, 86, 0);
|
||||
ORNAMENT_2.addBox(0F, 0F, 0F, 1, 4, 2);
|
||||
ORNAMENT_2.setRotationPoint(4F, 19F, -5F);
|
||||
ORNAMENT_2.setTextureSize(128, 128);
|
||||
ORNAMENT_2.mirror = true;
|
||||
setRotation(ORNAMENT_2, -0.2094395F, 0F, 0F);
|
||||
LEVER_1_CAN_BE_TURNED = new ModelRenderer(this, 0, 0);
|
||||
LEVER_1_CAN_BE_TURNED.addBox(0F, -6F, 0F, 1, 6, 1);
|
||||
LEVER_1_CAN_BE_TURNED.setRotationPoint(6F, 16F, -3F);
|
||||
LEVER_1_CAN_BE_TURNED.setTextureSize(128, 128);
|
||||
LEVER_1_CAN_BE_TURNED.mirror = true;
|
||||
setRotation(LEVER_1_CAN_BE_TURNED, 0F, 0F, 0F);
|
||||
LEVER_2_CAN_BE_TURNED = new ModelRenderer(this, 0, 0);
|
||||
LEVER_2_CAN_BE_TURNED.addBox(0F, -6F, 0F, 1, 6, 1);
|
||||
LEVER_2_CAN_BE_TURNED.setRotationPoint(4F, 16F, -3F);
|
||||
LEVER_2_CAN_BE_TURNED.setTextureSize(128, 128);
|
||||
LEVER_2_CAN_BE_TURNED.mirror = true;
|
||||
setRotation(LEVER_2_CAN_BE_TURNED, 0F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
genRender(f5);
|
||||
}
|
||||
public void genRender(float f5)
|
||||
{
|
||||
BASE.render(f5);
|
||||
PISTON_WALL_1.render(f5);
|
||||
PISTON_HEAD_MOVES.render(f5);
|
||||
PISTON_TURNER_MOVES.render(f5);
|
||||
PISTON_ARM_MOVES.render(f5);
|
||||
GEAR_A_NECK.render(f5);
|
||||
PISTON_WALL_2.render(f5);
|
||||
PISTON_WALL_3.render(f5);
|
||||
PISTON_WALL_4.render(f5);
|
||||
PISTON_SUPPORT_1.render(f5);
|
||||
PISTON_SUPPORT_2.render(f5);
|
||||
FORCE_CONDUCTOR_BOX.render(f5);
|
||||
GEAR_A_TEETH_1_ROTATES.render(f5);
|
||||
GEAR_A_TEETH_2_ROTATES.render(f5);
|
||||
GEAR_A_TEETH_3_ROTATES.render(f5);
|
||||
FORCE_TRANSMITTER_ROTATES.render(f5);
|
||||
GEAR_B_TEETH_1_ROTATES.render(f5);
|
||||
GEAR_B_TEETH_2_ROTATES.render(f5);
|
||||
GEAR_B_TEETH_3_ROTATES.render(f5);
|
||||
SUPPORT_PLATE.render(f5);
|
||||
ORNAMENT_1.render(f5);
|
||||
ORNAMENT_2.render(f5);
|
||||
LEVER_1_CAN_BE_TURNED.render(f5);
|
||||
LEVER_2_CAN_BE_TURNED.render(f5);
|
||||
}
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
}
|
||||
|
||||
}
|
27
1.2.5/eui/turbine/RenderSteamEngine.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
package net.minecraft.src.eui.turbine;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.src.*;
|
||||
|
||||
public class RenderSteamEngine extends TileEntitySpecialRenderer
|
||||
{
|
||||
int type = 0;
|
||||
private EngineSmallModel model;
|
||||
|
||||
public RenderSteamEngine()
|
||||
{
|
||||
model = new EngineSmallModel();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double d, double d1, double d2, float d3) {
|
||||
bindTextureByName("/eui/tankTexture.png");
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) d + 0.5F, (float) d1 + 1.5F, (float) d2 + 0.5F);
|
||||
GL11.glScalef(1.0F, -1F, -1F);
|
||||
model.genRender(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
|
@ -2,8 +2,12 @@ package net.minecraft.src;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.src.basiccomponents.BasicComponents;
|
||||
import net.minecraft.src.eui.*;
|
||||
import net.minecraft.src.eui.boiler.RenderBoiler;
|
||||
import net.minecraft.src.eui.boiler.TileEntityBoiler;
|
||||
import net.minecraft.src.eui.burner.RenderFurnace;
|
||||
import net.minecraft.src.eui.burner.TileEntityFireBox;
|
||||
import net.minecraft.src.eui.turbine.EngineSmallModel;
|
||||
import net.minecraft.src.eui.turbine.RenderSteamEngine;
|
||||
import net.minecraft.src.eui.turbine.TileEntityGenerator;
|
||||
import net.minecraft.src.forge.*;
|
||||
import net.minecraft.src.universalelectricity.*;
|
||||
|
@ -48,9 +52,9 @@ public class mod_EUIndustry extends NetworkMod {
|
|||
MinecraftForgeClient.preloadTexture("/eui/Blocks.png");
|
||||
MinecraftForgeClient.preloadTexture("/eui/Items.png");
|
||||
//TileEntities..................................
|
||||
ModLoader.registerTileEntity(net.minecraft.src.eui.boiler.TileEntityBoiler.class, "boiler");
|
||||
ModLoader.registerTileEntity(net.minecraft.src.eui.burner.TileEntityFireBox.class, "fireBox");
|
||||
ModLoader.registerTileEntity(net.minecraft.src.eui.turbine.TileEntityGenerator.class, "generator");
|
||||
ModLoader.registerTileEntity(net.minecraft.src.eui.boiler.TileEntityBoiler.class, "boiler", new RenderBoiler());
|
||||
ModLoader.registerTileEntity(net.minecraft.src.eui.burner.TileEntityFireBox.class, "fireBox", new RenderFurnace());
|
||||
ModLoader.registerTileEntity(net.minecraft.src.eui.turbine.TileEntityGenerator.class, "generator", new RenderSteamEngine());
|
||||
ModLoader.registerTileEntity(net.minecraft.src.eui.TileEntityNuller.class, "EUNuller");
|
||||
//Names...............
|
||||
ModLoader.addName((new ItemStack(machine, 1, 1)), "Boiler");
|
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 770 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 22 KiB |
|
@ -1,33 +0,0 @@
|
|||
package net.minecraft.src.eui.pipes.api;
|
||||
|
||||
|
||||
public interface ILiquidConsumer
|
||||
{
|
||||
/**
|
||||
* onRecieveLiquid
|
||||
* @param vol - The amount this block received.
|
||||
* @param side - The side of the block in which the liquid came from.
|
||||
* @parm type - The type of liquid being received
|
||||
* @return vol - The amount liquid that can't be recieved
|
||||
*/
|
||||
public int onReceiveLiquid(int type, int vol, byte side);
|
||||
|
||||
/**
|
||||
* You can use this to check if a pipe can connect to this liquid consumer to properly render the graphics
|
||||
* @param side - The side in which the electricity is coming from.
|
||||
* @parm type - The type of liquid
|
||||
* @return Returns true or false if this consumer can receive electricity at this given tick or moment.
|
||||
*/
|
||||
public boolean canRecieveLiquid(int type, byte side);
|
||||
|
||||
/**
|
||||
* @return Return the stored liquid of type in this consumer.
|
||||
*/
|
||||
public int getStoredLiquid(int type);
|
||||
|
||||
/**
|
||||
* @return Return the maximum amount of stored liquid this consumer can get.
|
||||
*/
|
||||
public int getLiquidCapacity(int type);
|
||||
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package net.minecraft.src.eui.pipes.api;
|
||||
|
||||
/**
|
||||
* The UEIProducer interface is an interface that must be applied to all tile entities that can produce electricity.
|
||||
* @author Calclavia
|
||||
*
|
||||
*/
|
||||
public interface ILiquidProducer
|
||||
{
|
||||
/**
|
||||
* onProduceLiquid
|
||||
* block.
|
||||
* @param type - the type of liquid
|
||||
* @param maxvol - The maximum vol or requested volume
|
||||
* @param side - The side
|
||||
* @return vol - Return a vol of liquid type that is produced
|
||||
*/
|
||||
public int onProduceLiquid(int type, int maxVol, int side);
|
||||
/**
|
||||
* canProduceLiquid
|
||||
* block.
|
||||
* @param type - the type of liquid
|
||||
* @param side - The side
|
||||
* @return boolean - True if can, false if can't produce liquid of type or on that side
|
||||
* Also used for connection rules of pipes'
|
||||
*/
|
||||
public boolean canProduceLiquid(int type, byte side);
|
||||
}
|