diff options
| author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-31 03:49:33 +0000 |
|---|---|---|
| committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-01-31 03:49:33 +0000 |
| commit | c0daba1659c667342da1529c31896a98768a8eda (patch) | |
| tree | e1e1f25c265c63fb2dbbb5c113e941a92e9cfa4c /src/Java/gtPlusPlus/core/slots | |
| parent | 241df1134f16c6c9c54b198db97279d697de8c77 (diff) | |
| download | GT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.tar.gz GT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.tar.bz2 GT5-Unofficial-c0daba1659c667342da1529c31896a98768a8eda.zip | |
+ Added a config option for control cores. Someone should definitely test this works as expected.
% Reduced cost of Hatch_Control_Core recipe.
% Minor tweaks to Fish Traps.
$ Fixed inventory shuffling for some Tile Entities.
$ Fixed Super Jukebox, it's now mostly functional.
$ Fixed constructBaseMetaTileEntity returning the wrong type of Entity for pre-existing wooden pipes, this should now get caught and thrown if the GT++ entity fails to a ClassCastException.
Diffstat (limited to 'src/Java/gtPlusPlus/core/slots')
| -rw-r--r-- | src/Java/gtPlusPlus/core/slots/SlotJukebox.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/slots/SlotJukebox.java b/src/Java/gtPlusPlus/core/slots/SlotJukebox.java new file mode 100644 index 0000000000..0f8af988a1 --- /dev/null +++ b/src/Java/gtPlusPlus/core/slots/SlotJukebox.java @@ -0,0 +1,37 @@ +package gtPlusPlus.core.slots; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemRecord; +import net.minecraft.item.ItemStack; + +public class SlotJukebox extends SlotGeneric { + + private final boolean isDisplay; + + + public SlotJukebox(IInventory inventory, int x, int y, int z) { + this(inventory, x, y, z, false); + } + + public SlotJukebox(IInventory inventory, int x, int y, int z, boolean display) { + super(inventory, x, y, z); + isDisplay = display; + } + + @Override + public boolean isItemValid(ItemStack itemstack) { + return (itemstack != null && itemstack.getItem() instanceof ItemRecord); + } + + @Override + public int getSlotStackLimit() { + return 1; + } + + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) { + return !isDisplay; + } + +} |
