Fixed Lathe returning on texture all the time
This commit is contained in:
parent
f32c81c780
commit
4ffa445b9b
4 changed files with 19 additions and 38 deletions
|
@ -40,7 +40,7 @@ public class BlockLathe extends BlockMachineBase {
|
|||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_on");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/lathe_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
|
|
@ -126,8 +126,7 @@ public class ModBlocks {
|
|||
public static Block storage;
|
||||
public static Block machineframe;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
public static void init(){
|
||||
thermalGenerator = new BlockThermalGenerator();
|
||||
GameRegistry.registerBlock(thermalGenerator, "techreborn.thermalGenerator");
|
||||
GameRegistry.registerTileEntity(TileThermalGenerator.class, "TileThermalGeneratorTR");
|
||||
|
@ -284,8 +283,7 @@ public class ModBlocks {
|
|||
registerOreDict();
|
||||
}
|
||||
|
||||
public static void registerOreDict()
|
||||
{
|
||||
public static void registerOreDict(){
|
||||
OreDictionary.registerOre("oreGalena", new ItemStack(ore, 1, 0));
|
||||
OreDictionary.registerOre("oreIridium", new ItemStack(ore, 1, 1));
|
||||
OreDictionary.registerOre("oreRuby", new ItemStack(ore, 1, 2));
|
||||
|
|
|
@ -20,8 +20,7 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
|
|||
public Inventory inventory = new Inventory(8, "TileAlloySmelter", 64);
|
||||
public RecipeCrafter crafter;
|
||||
|
||||
public TileAlloySmelter()
|
||||
{
|
||||
public TileAlloySmelter(){
|
||||
//TODO configs
|
||||
energy = new BasicSink(this, 1000, 2);
|
||||
//Input slots
|
||||
|
@ -34,60 +33,50 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
|
|||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity()
|
||||
{
|
||||
public void updateEntity(){
|
||||
super.updateEntity();
|
||||
energy.updateEntity();
|
||||
crafter.updateEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side)
|
||||
{
|
||||
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getFacing()
|
||||
{
|
||||
public short getFacing(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFacing(short facing)
|
||||
{
|
||||
public void setFacing(short facing){
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean wrenchCanRemove(EntityPlayer entityPlayer)
|
||||
{
|
||||
if (entityPlayer.isSneaking())
|
||||
{
|
||||
public boolean wrenchCanRemove(EntityPlayer entityPlayer){
|
||||
if (entityPlayer.isSneaking()){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getWrenchDropRate()
|
||||
{
|
||||
public float getWrenchDropRate(){
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getWrenchDrop(EntityPlayer entityPlayer)
|
||||
{
|
||||
public ItemStack getWrenchDrop(EntityPlayer entityPlayer){
|
||||
return new ItemStack(ModBlocks.AlloySmelter, 1);
|
||||
}
|
||||
|
||||
public boolean isComplete()
|
||||
{
|
||||
public boolean isComplete(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
public void readFromNBT(NBTTagCompound tagCompound){
|
||||
super.readFromNBT(tagCompound);
|
||||
inventory.readFromNBT(tagCompound);
|
||||
energy.readFromNBT(tagCompound);
|
||||
|
@ -95,8 +84,7 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
|
|||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound tagCompound)
|
||||
{
|
||||
public void writeToNBT(NBTTagCompound tagCompound){
|
||||
super.writeToNBT(tagCompound);
|
||||
inventory.writeToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
|
@ -104,24 +92,20 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
|
|||
}
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
public void invalidate(){
|
||||
energy.invalidate();
|
||||
}
|
||||
@Override
|
||||
public void onChunkUnload()
|
||||
{
|
||||
public void onChunkUnload(){
|
||||
energy.onChunkUnload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addWailaInfo(List<String> info)
|
||||
{
|
||||
public void addWailaInfo(List<String> info){
|
||||
super.addWailaInfo(info);
|
||||
info.add("Power Stored " + energy.getEnergyStored() +" EU");
|
||||
if(crafter.currentRecipe !=null){
|
||||
info.add("Power Usage " + crafter.currentRecipe.euPerTick() + " EU/t");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,8 +43,7 @@ public class TileMachineBase extends TileEntity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net,
|
||||
S35PacketUpdateTileEntity packet) {
|
||||
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
|
||||
worldObj.markBlockRangeForRenderUpdate(xCoord, yCoord, zCoord, xCoord,
|
||||
yCoord, zCoord);
|
||||
readFromNBT(packet.func_148857_g());
|
||||
|
|
Loading…
Reference in a new issue