mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
SPIGOT-4953: Crafting table inventory returns player location, not block location
This commit is contained in:
parent
585b2ebdd5
commit
d06991d960
2 changed files with 5 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
--- a/net/minecraft/server/ContainerWorkbench.java
|
--- a/net/minecraft/server/ContainerWorkbench.java
|
||||||
+++ b/net/minecraft/server/ContainerWorkbench.java
|
+++ b/net/minecraft/server/ContainerWorkbench.java
|
||||||
@@ -1,6 +1,10 @@
|
@@ -1,13 +1,21 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@ -11,9 +11,10 @@
|
||||||
|
|
||||||
public class ContainerWorkbench extends ContainerRecipeBook<InventoryCrafting> {
|
public class ContainerWorkbench extends ContainerRecipeBook<InventoryCrafting> {
|
||||||
|
|
||||||
@@ -8,6 +12,10 @@
|
private final InventoryCrafting craftInventory;
|
||||||
private final InventoryCraftResult resultInventory;
|
private final InventoryCraftResult resultInventory;
|
||||||
private final ContainerAccess e;
|
- private final ContainerAccess e;
|
||||||
|
+ public final ContainerAccess e;
|
||||||
private final EntityHuman f;
|
private final EntityHuman f;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ private CraftInventoryView bukkitEntity = null;
|
+ private CraftInventoryView bukkitEntity = null;
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Location getLocation() {
|
+ public Location getLocation() {
|
||||||
+ return owner.getBukkitEntity().getLocation();
|
+ return container instanceof ContainerWorkbench ? ((ContainerWorkbench) container).e.getLocation() : owner.getBukkitEntity().getLocation();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
|
Loading…
Reference in a new issue