mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-19 23:01:29 +01:00
Add ShulkerBoxes to the LootTable API
This commit is contained in:
parent
3efba978ad
commit
464b0455bd
@ -352,4 +352,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+public interface Hopper extends BlockState, InventoryHolder, Lockable, Nameable, LootableInventory { // Paper
|
+public interface Hopper extends BlockState, InventoryHolder, Lockable, Nameable, LootableInventory { // Paper
|
||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
|
diff --git a/src/main/java/org/bukkit/block/ShulkerBox.java b/src/main/java/org/bukkit/block/ShulkerBox.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/block/ShulkerBox.java
|
||||||
|
+++ b/src/main/java/org/bukkit/block/ShulkerBox.java
|
||||||
|
@@ -0,0 +0,0 @@
|
||||||
|
package org.bukkit.block;
|
||||||
|
|
||||||
|
+import com.destroystokyo.paper.loottable.LootableInventory;
|
||||||
|
import org.bukkit.DyeColor;
|
||||||
|
import org.bukkit.Nameable;
|
||||||
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
|
@@ -0,0 +0,0 @@ import org.bukkit.inventory.InventoryHolder;
|
||||||
|
/**
|
||||||
|
* Represents a ShulkerBox.
|
||||||
|
*/
|
||||||
|
-public interface ShulkerBox extends BlockState, InventoryHolder, Lockable, Nameable {
|
||||||
|
+public interface ShulkerBox extends BlockState, InventoryHolder, Lockable, Nameable, LootableInventory { // Paper
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the {@link DyeColor} corresponding to this ShulkerBox
|
||||||
--
|
--
|
@ -712,6 +712,35 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
private final TileEntityHopper hopper;
|
private final TileEntityHopper hopper;
|
||||||
|
|
||||||
public CraftHopper(final Block block) {
|
public CraftHopper(final Block block) {
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
|
||||||
|
@@ -0,0 +0,0 @@
|
||||||
|
package org.bukkit.craftbukkit.block;
|
||||||
|
|
||||||
|
+import com.destroystokyo.paper.loottable.CraftLootableBlockInventory;
|
||||||
|
import net.minecraft.server.BlockShulkerBox;
|
||||||
|
import net.minecraft.server.TileEntity;
|
||||||
|
import net.minecraft.server.TileEntityShulkerBox;
|
||||||
|
@@ -0,0 +0,0 @@ import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
import org.bukkit.craftbukkit.inventory.CraftInventory;
|
||||||
|
import org.bukkit.inventory.Inventory;
|
||||||
|
|
||||||
|
-public class CraftShulkerBox extends CraftLootable implements ShulkerBox {
|
||||||
|
+public class CraftShulkerBox extends CraftLootable implements ShulkerBox, CraftLootableBlockInventory { // Paper
|
||||||
|
|
||||||
|
private final CraftWorld world;
|
||||||
|
private final TileEntityShulkerBox box;
|
||||||
|
@@ -0,0 +0,0 @@ public class CraftShulkerBox extends CraftLootable implements ShulkerBox {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
- public TileEntity getTileEntity() {
|
||||||
|
+ public TileEntityShulkerBox getTileEntity() { // Paper
|
||||||
|
return box;
|
||||||
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
||||||
|
Loading…
Reference in New Issue
Block a user