Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-23 23:00:08 +01:00
40 Zeilen
1.3 KiB
Diff
40 Zeilen
1.3 KiB
Diff
|
--- a/net/minecraft/server/ContainerSmithing.java
|
||
|
+++ b/net/minecraft/server/ContainerSmithing.java
|
||
|
@@ -3,12 +3,17 @@
|
||
|
import java.util.List;
|
||
|
import javax.annotation.Nullable;
|
||
|
|
||
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit
|
||
|
+
|
||
|
public class ContainerSmithing extends ContainerAnvilAbstract {
|
||
|
|
||
|
private final World g;
|
||
|
@Nullable
|
||
|
private RecipeSmithing h;
|
||
|
private final List<RecipeSmithing> i;
|
||
|
+ // CraftBukkit start
|
||
|
+ private CraftInventoryView bukkitEntity;
|
||
|
+ // CraftBukkit end
|
||
|
|
||
|
public ContainerSmithing(int i, PlayerInventory playerinventory) {
|
||
|
this(i, playerinventory, ContainerAccess.a);
|
||
|
@@ -68,4 +73,18 @@
|
||
|
return recipesmithing.a(itemstack);
|
||
|
});
|
||
|
}
|
||
|
+
|
||
|
+ // CraftBukkit start
|
||
|
+ @Override
|
||
|
+ public CraftInventoryView getBukkitView() {
|
||
|
+ if (bukkitEntity != null) {
|
||
|
+ return bukkitEntity;
|
||
|
+ }
|
||
|
+
|
||
|
+ org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventorySmithing(
|
||
|
+ this.repairInventory, this.resultInventory);
|
||
|
+ bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
|
||
|
+ return bukkitEntity;
|
||
|
+ }
|
||
|
+ // CraftBukkit end
|
||
|
}
|