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
|
@ -242,6 +242,12 @@ public class TileArchitect extends TileBuildCraft implements IInventory {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
||||||
|
|
|
@ -228,6 +228,12 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
||||||
return 64;
|
return 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
||||||
|
|
|
@ -443,6 +443,12 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
|
||||||
return 64;
|
return 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
||||||
|
|
|
@ -235,6 +235,11 @@ public class TileFiller extends TileBuildCraft implements ISidedInventory, IPowe
|
||||||
return "Filler";
|
return "Filler";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||||
super.readFromNBT(nbttagcompound);
|
super.readFromNBT(nbttagcompound);
|
||||||
|
|
|
@ -12,7 +12,6 @@ package buildcraft.core;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.network.packet.Packet;
|
import net.minecraft.network.packet.Packet;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import buildcraft.api.power.IPowerReceptor;
|
import buildcraft.api.power.IPowerReceptor;
|
||||||
|
@ -120,9 +119,4 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isStackValidForSlot(int i, ItemStack itemstack)
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,10 @@ public abstract class Engine {
|
||||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public abstract ILiquidTank getTank(ForgeDirection direction, LiquidStack type);
|
public abstract ILiquidTank getTank(ForgeDirection direction, LiquidStack type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -293,6 +293,14 @@ public class TileEngine extends TileBuildCraft implements IPowerReceptor, IInven
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||||
|
if (engine != null){
|
||||||
|
return engine.isStackValidForSlot(i, itemstack);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getInvName() {
|
public String getInvName() {
|
||||||
return "Engine";
|
return "Engine";
|
||||||
|
|
|
@ -728,6 +728,11 @@ public class TileQuarry extends TileMachine implements IMachine, IPowerReceptor,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -93,6 +93,11 @@ public class TileRefinery extends TileMachine implements ITankContainer, IPowerR
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this;
|
||||||
|
|
Loading…
Reference in a new issue