#1181: Consolidate Location conversion code
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
--- a/net/minecraft/world/inventory/InventoryEnderChest.java
|
||||
+++ b/net/minecraft/world/inventory/InventoryEnderChest.java
|
||||
@@ -8,13 +8,31 @@
|
||||
@@ -8,13 +8,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
|
||||
+
|
||||
@@ -22,7 +23,7 @@
|
||||
+
|
||||
+ @Override
|
||||
+ public Location getLocation() {
|
||||
+ return this.activeChest != null ? new Location(this.activeChest.getLevel().getWorld(), this.activeChest.getBlockPos().getX(), this.activeChest.getBlockPos().getY(), this.activeChest.getBlockPos().getZ()) : null;
|
||||
+ return this.activeChest != null ? CraftLocation.toBukkit(this.activeChest.getBlockPos(), this.activeChest.getLevel().getWorld()) : null;
|
||||
+ }
|
||||
|
||||
- public InventoryEnderChest() {
|
||||
|
||||
Reference in New Issue
Block a user