13
0
geforkt von Mirrors/Paper

Updated Upstream (Bukkit/CraftBukkit) (#5508)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
14883d6b SPIGOT-6078: Add SmithItemEvent and expand SmithingInventory API

CraftBukkit Changes:
115244c7 SPIGOT-6078: Add SmithItemEvent and expand SmithingInventory API
Dieser Commit ist enthalten in:
MiniDigger | Martin 2021-04-18 11:02:48 +02:00
Ursprung b4e127f50c
Commit f3727ff757
6 geänderte Dateien mit 11 neuen und 36 gelöschten Zeilen

Datei anzeigen

@ -181,16 +181,10 @@ diff --git a/src/main/java/org/bukkit/inventory/SmithingInventory.java b/src/mai
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/SmithingInventory.java --- a/src/main/java/org/bukkit/inventory/SmithingInventory.java
+++ b/src/main/java/org/bukkit/inventory/SmithingInventory.java +++ b/src/main/java/org/bukkit/inventory/SmithingInventory.java
@@ -0,0 +0,0 @@ @@ -0,0 +0,0 @@ public interface SmithingInventory extends Inventory {
package org.bukkit.inventory; */
@Nullable
+import org.jetbrains.annotations.Nullable; // Paper Recipe getRecipe();
+
/**
* Interface to the inventory of a Smithing table.
*/
-public interface SmithingInventory extends Inventory { }
+public interface SmithingInventory extends Inventory {
+ +
+ // Paper start + // Paper start
+ /** + /**
@ -230,27 +224,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ default void setInputMineral(@Nullable ItemStack itemStack) { + default void setInputMineral(@Nullable ItemStack itemStack) {
+ setItem(1, itemStack); + setItem(1, itemStack);
+ } + }
+
+ /**
+ * Gets the result item.
+ *
+ * @return result
+ */
+ @Nullable
+ default ItemStack getResult() {
+ return getItem(2);
+ }
+
+ /**
+ * Sets the result item.
+ *
+ * @param itemStack item to set
+ */
+ default void setResult(@Nullable ItemStack itemStack) {
+ setItem(2, itemStack);
+ }
+ // Paper end + // Paper end
+} }
diff --git a/src/main/java/org/bukkit/inventory/StonecutterInventory.java b/src/main/java/org/bukkit/inventory/StonecutterInventory.java diff --git a/src/main/java/org/bukkit/inventory/StonecutterInventory.java b/src/main/java/org/bukkit/inventory/StonecutterInventory.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/inventory/StonecutterInventory.java --- a/src/main/java/org/bukkit/inventory/StonecutterInventory.java

Datei anzeigen

@ -86,7 +86,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/inventory/ContainerSmithing.java --- a/src/main/java/net/minecraft/world/inventory/ContainerSmithing.java
+++ b/src/main/java/net/minecraft/world/inventory/ContainerSmithing.java +++ b/src/main/java/net/minecraft/world/inventory/ContainerSmithing.java
@@ -0,0 +0,0 @@ public class ContainerSmithing extends ContainerAnvilAbstract { @@ -0,0 +0,0 @@ public class ContainerSmithing extends ContainerAnvilAbstract {
org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), itemstack); // CraftBukkit // CraftBukkit end
} }
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(this, 2); // Paper + org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(this, 2); // Paper

Datei anzeigen

@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.event.inventory.InventoryCloseEvent; // Paper +import org.bukkit.event.inventory.InventoryCloseEvent; // Paper
import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryCreativeEvent;
import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.InventoryType.SlotType;
import org.bukkit.event.player.AsyncPlayerChatEvent; import org.bukkit.event.inventory.SmithItemEvent;
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override @Override

Datei anzeigen

@ -1379,9 +1379,9 @@ diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/network/PlayerConnection.java --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java
@@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory; @@ -0,0 +0,0 @@ import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.InventoryView; import org.bukkit.inventory.InventoryView;
import org.bukkit.inventory.SmithingInventory;
import org.bukkit.util.NumberConversions; import org.bukkit.util.NumberConversions;
+import co.aikar.timings.MinecraftTimings; // Paper +import co.aikar.timings.MinecraftTimings; // Paper
// CraftBukkit end // CraftBukkit end

@ -1 +1 @@
Subproject commit 9477fa26f2d29dba3250b1486cd2b353d697b011 Subproject commit 14883d6b17f7cbf695a154266fa23372a4381ebe

@ -1 +1 @@
Subproject commit 28d72c4bd8c22f568384560459d0d703c2d0fefe Subproject commit 115244c744b1ef289d97d4e6cc777e60f185ff64