Made QTank/QChest Wrench able

This commit is contained in:
Gig 2015-04-11 17:32:45 +01:00
parent 57c38eb99e
commit b3d6ea1358
2 changed files with 80 additions and 2 deletions

View file

@ -1,5 +1,6 @@
package techreborn.tiles;
import ic2.api.tile.IWrenchable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@ -13,7 +14,7 @@ import techreborn.util.FluidUtils;
import techreborn.util.Inventory;
public class TileQuantumChest extends TileEntity implements IInventory {
public class TileQuantumChest extends TileEntity implements IInventory ,IWrenchable{
//Slot 0 = Input
//Slot 1 = Output
@ -163,4 +164,45 @@ public class TileQuantumChest extends TileEntity implements IInventory {
public boolean isItemValidForSlot(int slot, ItemStack stack) {
return inventory.isItemValidForSlot(slot, stack);
}
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
// TODO Auto-generated method stub
return false;
}
@Override
public short getFacing() {
// TODO Auto-generated method stub
return 0;
}
@Override
public void setFacing(short facing) {
// TODO Auto-generated method stub
}
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
return true;
}
@Override
public float getWrenchDropRate() {
// TODO Auto-generated method stub
return 0;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
// TODO Auto-generated method stub
return null;
}
}

View file

@ -1,5 +1,6 @@
package techreborn.tiles;
import ic2.api.tile.IWrenchable;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@ -17,7 +18,7 @@ import techreborn.util.FluidUtils;
import techreborn.util.Inventory;
import techreborn.util.Tank;
public class TileQuantumTank extends TileEntity implements IFluidHandler, IInventory {
public class TileQuantumTank extends TileEntity implements IFluidHandler, IInventory, IWrenchable {
public Tank tank = new Tank("TileQuantumTank", Integer.MAX_VALUE, this);
public Inventory inventory = new Inventory(3, "TileQuantumTank", 64);
@ -151,4 +152,39 @@ public class TileQuantumTank extends TileEntity implements IFluidHandler, IInven
public boolean isItemValidForSlot(int slot, ItemStack stack) {
return inventory.isItemValidForSlot(slot, stack);
}
@Override
public boolean wrenchCanSetFacing(EntityPlayer entityPlayer, int side) {
// TODO Auto-generated method stub
return false;
}
@Override
public short getFacing() {
// TODO Auto-generated method stub
return 0;
}
@Override
public void setFacing(short facing) {
// TODO Auto-generated method stub
}
@Override
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
return true;
}
@Override
public float getWrenchDropRate() {
// TODO Auto-generated method stub
return 0;
}
@Override
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
// TODO Auto-generated method stub
return null;
}
}