mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Fixed Quantum Entangloporters
This commit is contained in:
1 parent
796c9e502a
commit
a9d438c962
8 files changed
+56
-82
No files matched your search
@@ -14,7 +14,6 @@ import mekanism.common.multiblock.MultiblockManager;
|
||||
import mekanism.common.multiblock.SynchronizedData;
|
||||
import mekanism.common.multiblock.UpdateProtocol;
|
||||
import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ItemStackHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -22,9 +21,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -274,45 +272,9 @@ public abstract class TileEntityMultiblock<T extends SynchronizedData<T>> extend
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int slotID)
|
||||
protected NonNullList<ItemStack> getInventory()
|
||||
{
|
||||
return structure != null && getSynchronizedData().getInventory() != null ? getSynchronizedData().getInventory().get(slotID) : ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int slotID, ItemStack itemstack)
|
||||
{
|
||||
if(structure != null && getSynchronizedData().getInventory() != null)
|
||||
{
|
||||
getSynchronizedData().getInventory().set(slotID, itemstack);
|
||||
|
||||
if(!itemstack.isEmpty() && itemstack.getCount() > getInventoryStackLimit())
|
||||
{
|
||||
itemstack.setCount(getInventoryStackLimit());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int slotID, int amount)
|
||||
{
|
||||
if(structure == null || getSynchronizedData().getInventory() == null)
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
return ItemStackHelper.getAndSplit(getSynchronizedData().getInventory(), slotID, amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack removeStackFromSlot(int slotID)
|
||||
{
|
||||
if(structure == null || getSynchronizedData().getInventory() == null)
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
return ItemStackHelper.getAndRemove(getSynchronizedData().getInventory(), slotID);
|
||||
return structure != null ? structure.getInventory() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user