Removed isStackValidForSlot from TileBuildCraft and moved it to subclasses. Fixes #878
This commit is contained in:
parent
9a68dcc304
commit
47cbc9fab0
9 changed files with 45 additions and 6 deletions
|
@ -241,6 +241,12 @@ public class TileArchitect extends TileBuildCraft implements IInventory {
|
|||
public int getInventoryStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
|
|
|
@ -227,6 +227,12 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
|||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
|
|
|
@ -442,6 +442,12 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
|
|||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
|
|
|
@ -234,6 +234,11 @@ public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowe
|
|||
public String getInvName() {
|
||||
return "Filler";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
|
|
|
@ -12,7 +12,6 @@ package buildcraft.core;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
|
@ -120,9 +119,4 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,6 +202,10 @@ public abstract class Engine {
|
|||
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||
}
|
||||
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack){
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract ILiquidTank getTank(ForgeDirection direction, LiquidStack type);
|
||||
|
||||
|
|
|
@ -292,6 +292,14 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
|
|||
engine.setInventorySlotContents(i, itemstack);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
if (engine != null){
|
||||
return engine.isStackValidForSlot(i, itemstack);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName() {
|
||||
|
|
|
@ -727,6 +727,11 @@ public class TileQuarry extends TileMachine implements IMachine, IPowerReceptor,
|
|||
public int getInventoryStackLimit() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
|
|
|
@ -92,6 +92,11 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR
|
|||
public int getInventoryStackLimit() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
|
|
Loading…
Reference in a new issue