Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
Add ShulkerBoxes to the LootTable API
Dieser Commit ist enthalten in:
Ursprung
26e4ac4330
Commit
cb66c8dce7
@ -1,4 +1,4 @@
|
||||
From ca84cb2143adcd3dbbb2f3143e9088add4e2ee28 Mon Sep 17 00:00:00 2001
|
||||
From acf9054a24ff96c9fa7c238b7679cbe3316d8a42 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 1 May 2016 15:19:49 -0400
|
||||
Subject: [PATCH] LootTable API
|
||||
@ -352,6 +352,26 @@ index 8e5e3e8..c08a1a5 100644
|
||||
+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 003cfb8..7b40df1 100644
|
||||
--- a/src/main/java/org/bukkit/block/ShulkerBox.java
|
||||
+++ b/src/main/java/org/bukkit/block/ShulkerBox.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.bukkit.block;
|
||||
|
||||
+import com.destroystokyo.paper.loottable.LootableInventory;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
@@ -7,7 +8,7 @@ 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
|
||||
--
|
||||
2.10.2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0e03fc3328c07b66787473c4d9bd922264a973a3 Mon Sep 17 00:00:00 2001
|
||||
From 8712e9ac088ad974d4eea2c12880912523da7af5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 1 May 2016 21:19:14 -0400
|
||||
Subject: [PATCH] LootTable API & Replenishable Lootables Feature
|
||||
@ -712,6 +712,35 @@ index b7a04bd..5d4a551 100644
|
||||
private final TileEntityHopper hopper;
|
||||
|
||||
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 8a7ce92..02f56bc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
|
||||
@@ -1,5 +1,6 @@
|
||||
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;
|
||||
@@ -11,7 +12,7 @@ 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;
|
||||
@@ -31,7 +32,7 @@ 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
|
||||
index 69435c4..4291edf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren