mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-02-16 15:45:59 +00:00
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
--- a/net/minecraft/world/inventory/InventoryEnderChest.java
|
|
+++ b/net/minecraft/world/inventory/InventoryEnderChest.java
|
|
@@ -9,13 +9,32 @@
|
|
import net.minecraft.world.item.ItemStack;
|
|
import net.minecraft.world.level.block.entity.TileEntityEnderChest;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.Location;
|
|
+import org.bukkit.craftbukkit.util.CraftLocation;
|
|
+import org.bukkit.inventory.InventoryHolder;
|
|
+// CraftBukkit end
|
|
+
|
|
public class InventoryEnderChest extends InventorySubcontainer {
|
|
|
|
@Nullable
|
|
private TileEntityEnderChest activeChest;
|
|
+ // CraftBukkit start
|
|
+ private final EntityHuman owner;
|
|
|
|
- public InventoryEnderChest() {
|
|
+ public InventoryHolder getBukkitOwner() {
|
|
+ return owner.getBukkitEntity();
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public Location getLocation() {
|
|
+ return this.activeChest != null ? CraftLocation.toBukkit(this.activeChest.getBlockPos(), this.activeChest.getLevel().getWorld()) : null;
|
|
+ }
|
|
+
|
|
+ public InventoryEnderChest(EntityHuman owner) {
|
|
super(27);
|
|
+ this.owner = owner;
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
public void setActiveChest(TileEntityEnderChest tileentityenderchest) {
|