aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/slots/SlotJukebox.java
diff options
context:
space:
mode:
authorhuajijam <strhuaji@gmail.com>2019-01-31 19:32:46 +0800
committerGitHub <noreply@github.com>2019-01-31 19:32:46 +0800
commit3b3a7738b615d2a307f80bfe079f6d56d48b6521 (patch)
treee2e7ead0e42e458adde896c090e558bb4e250c43 /src/Java/gtPlusPlus/core/slots/SlotJukebox.java
parent9ed780d285420a4e4a1c4c291e49da9c894f1d31 (diff)
parentd015262242110df899f6ffe7a9f84780382e8584 (diff)
downloadGT5-Unofficial-3b3a7738b615d2a307f80bfe079f6d56d48b6521.tar.gz
GT5-Unofficial-3b3a7738b615d2a307f80bfe079f6d56d48b6521.tar.bz2
GT5-Unofficial-3b3a7738b615d2a307f80bfe079f6d56d48b6521.zip
update
update
Diffstat (limited to 'src/Java/gtPlusPlus/core/slots/SlotJukebox.java')
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotJukebox.java37
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;
+ }
+
+}