mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 10:35:38 +01:00
#745: Fix getLocation for Cartography Table and Stonecutter
This commit is contained in:
parent
13fc33f732
commit
1d74403327
@ -30,7 +30,21 @@
|
|||||||
private final ContainerAccess containerAccess;
|
private final ContainerAccess containerAccess;
|
||||||
private long e;
|
private long e;
|
||||||
public final IInventory inventory;
|
public final IInventory inventory;
|
||||||
@@ -26,6 +48,13 @@
|
@@ -19,6 +41,13 @@
|
||||||
|
ContainerCartography.this.a((IInventory) this);
|
||||||
|
super.update();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // CraftBukkit start
|
||||||
|
+ @Override
|
||||||
|
+ public Location getLocation() {
|
||||||
|
+ return containeraccess.getLocation();
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
};
|
||||||
|
this.resultInventory = new InventoryCraftResult() {
|
||||||
|
@Override
|
||||||
|
@@ -26,6 +55,13 @@
|
||||||
ContainerCartography.this.a((IInventory) this);
|
ContainerCartography.this.a((IInventory) this);
|
||||||
super.update();
|
super.update();
|
||||||
}
|
}
|
||||||
@ -44,7 +58,7 @@
|
|||||||
};
|
};
|
||||||
this.containerAccess = containeraccess;
|
this.containerAccess = containeraccess;
|
||||||
this.a(new Slot(this.inventory, 0, 15, 15) {
|
this.a(new Slot(this.inventory, 0, 15, 15) {
|
||||||
@@ -78,10 +107,12 @@
|
@@ -78,10 +114,12 @@
|
||||||
this.a(new Slot(playerinventory, j, 8 + j * 18, 142));
|
this.a(new Slot(playerinventory, j, 8 + j * 18, 142));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
--- a/net/minecraft/server/ContainerStonecutter.java
|
--- a/net/minecraft/server/ContainerStonecutter.java
|
||||||
+++ b/net/minecraft/server/ContainerStonecutter.java
|
+++ b/net/minecraft/server/ContainerStonecutter.java
|
||||||
@@ -2,6 +2,11 @@
|
@@ -2,6 +2,12 @@
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
+// CraftBukkit start
|
+// CraftBukkit start
|
||||||
|
+import org.bukkit.Location;
|
||||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryStonecutter;
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryStonecutter;
|
||||||
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
||||||
+import org.bukkit.entity.Player;
|
+import org.bukkit.entity.Player;
|
||||||
@ -12,7 +13,7 @@
|
|||||||
|
|
||||||
public class ContainerStonecutter extends Container {
|
public class ContainerStonecutter extends Container {
|
||||||
|
|
||||||
@@ -16,6 +21,21 @@
|
@@ -16,6 +22,21 @@
|
||||||
private Runnable l;
|
private Runnable l;
|
||||||
public final IInventory inventory;
|
public final IInventory inventory;
|
||||||
private final InventoryCraftResult resultInventory;
|
private final InventoryCraftResult resultInventory;
|
||||||
@ -34,7 +35,21 @@
|
|||||||
|
|
||||||
public ContainerStonecutter(int i, PlayerInventory playerinventory) {
|
public ContainerStonecutter(int i, PlayerInventory playerinventory) {
|
||||||
this(i, playerinventory, ContainerAccess.a);
|
this(i, playerinventory, ContainerAccess.a);
|
||||||
@@ -82,10 +102,12 @@
|
@@ -35,6 +56,13 @@
|
||||||
|
ContainerStonecutter.this.a((IInventory) this);
|
||||||
|
ContainerStonecutter.this.l.run();
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // CraftBukkit start
|
||||||
|
+ @Override
|
||||||
|
+ public Location getLocation() {
|
||||||
|
+ return containeraccess.getLocation();
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
};
|
||||||
|
this.resultInventory = new InventoryCraftResult();
|
||||||
|
this.containerAccess = containeraccess;
|
||||||
|
@@ -82,10 +110,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.a(this.containerProperty);
|
this.a(this.containerProperty);
|
||||||
|
Loading…
Reference in New Issue
Block a user