Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11197)
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: 2ec53f49 PR-1050: Fix empty result check for Complex Recipes 10671012 PR-1044: Add CrafterCraftEvent 4d87ffe0 Use correct method in JavaDoc ae5e5817 SPIGOT-7850: Add API for Bogged shear state 46b6d445 SPIGOT-7837: Support data pack banner patterns d5d0cefc Fix JavaDoc error b3c2b83d PR-1036: Add API for InventoryView derivatives 1fe2c75a SPIGOT-7809: Add ShieldMeta CraftBukkit Changes: 8ee6fd1b8 SPIGOT-7857: Improve ItemMeta block data deserialization 8f26c30c6 SPIGOT-7857: Fix spurious internal NBT tag when deserializing BlockStateMeta 759061b93 SPIGOT-7855: Fire does not spread or burn blocks 00fc9fb64 SPIGOT-7853: AnvilInventory#getRepairCost() always returns 0 7501e2e04 PR-1450: Add CrafterCraftEvent 8c51673e7 SPIGOT-5731: PortalCreateEvent#getEntity returns null for nether portals ignited by flint and steel d53d0d0b1 PR-1456: Fix inverted logic in CraftCrafterView#setSlotDisabled 682a678c8 SPIGOT-7850: Add API for Bogged shear state fccf5243a SPIGOT-7837: Support data pack banner patterns 9c3bd4390 PR-1431: Add API for InventoryView derivatives 0cc6acbc4 SPIGOT-7849: Fix FoodComponent serialize with "using-converts-to" using null 2c5474952 Don't rely on tags for CraftItemMetas 20d107e46 SPIGOT-7846: Fix ItemMeta for hanging signs 76f59e315 Remove redundant clone in Dropper InventoryMoveItemEvent e61a53d25 SPIGOT-7817: Call InventoryMoveItemEvent for Crafters 894682e2d SPIGOT-7839: Remove redundant Java version checks 2c12b2187 SPIGOT-7809: Add ShieldMeta and fix setting shield base colours Spigot Changes: fb8fb722 Rebuild patches 34bd42b7 SPIGOT-7835: Fix issue with custom hopper settings
Dieser Commit ist enthalten in:
Ursprung
4e6a2a13a3
Commit
77a5779e24
@ -4327,10 +4327,10 @@ index 5adbe0514129abf3cfbc4b29a213f522359fe2e1..72ebc29db42d08d1d0361dba462fc8a5
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
|
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||||
index 5b479ff2abe8cdd5e889803c73a713bc9855bc0b..5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9 100644
|
index 278259e211b926283ee6dfef6f96e11ddbcbf275..ebc14022c9ef9b0b3331ee53e96a32667e4762e0 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
|
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
|
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||||
@@ -267,12 +267,26 @@ public interface InventoryView {
|
@@ -269,12 +269,26 @@ public interface InventoryView {
|
||||||
*/
|
*/
|
||||||
public boolean setProperty(@NotNull Property prop, int value);
|
public boolean setProperty(@NotNull Property prop, int value);
|
||||||
|
|
||||||
|
@ -416,7 +416,7 @@ index 4e1fb0974d061d5bb64899cac576318d2e6f8bf6..539b3527d0c66611e21712f29b90fba9
|
|||||||
public int getEntityId();
|
public int getEntityId();
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index 274f3ccbc39d4d6ff0665abf334d526317275dd0..a7bfaa874cbd3fc8d24fffe2f7f14594b37fa18c 100644
|
index 8fdfa1d79daf464f8e364fd9e19d1de3a2a6848c..195a7fa0ea8e056cbde7b9152cc014d2c94353ff 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable;
|
@@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable;
|
||||||
@ -687,7 +687,7 @@ index be0a2d1f234d8265d98e54e518a994957b1f3ab7..4e3c406ba883aae553e8d69b6b719b87
|
|||||||
* than BLOCK_CANBUILD, as this refers to a player, not universe-physics
|
* than BLOCK_CANBUILD, as this refers to a player, not universe-physics
|
||||||
* rule like cactus on dirt.
|
* rule like cactus on dirt.
|
||||||
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
index fc2120e03737f5882d6ae916db93fdcf4939b2ba..f2edd4a9357832e9dec3fb0aafa006335d7b289b 100644
|
index 035c647f4d4e3c34f171bb7d7fa6b2b7b3442669..7ae338bcecff2ce25939035181457ced505b3a49 100644
|
||||||
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
@@ -81,7 +81,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
@@ -81,7 +81,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
||||||
@ -999,7 +999,7 @@ index 9013d043503d175004ad276799e5935b7fa59dc4..ceae092eb782698803c6c3df41267dde
|
|||||||
public class InventoryOpenEvent extends InventoryEvent implements Cancellable {
|
public class InventoryOpenEvent extends InventoryEvent implements Cancellable {
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||||
index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32f4b71c57 100644
|
index 08a7c564fe5d3d232998d1789d4d4723a59c1430..8a5be3f0322ac19aeac3f00df54add0e73bc87ed 100644
|
||||||
--- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
--- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
+++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||||
@@ -24,6 +24,20 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent {
|
@@ -24,6 +24,20 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent {
|
||||||
@ -1022,7 +1022,7 @@ index 6782024735a885ba0b1b4dba4a576740c1410366..8977f7609431c3c46324a82de84d4a32
|
|||||||
+
|
+
|
||||||
@NotNull
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public HandlerList getHandlers() {
|
public AnvilView getView() {
|
||||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
diff --git a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
||||||
index e4c32b21ab013703a6a1b07a1ad564d914ebe83f..e58fecf0fe54db06e0e944027923a352fd8005d8 100644
|
index e4c32b21ab013703a6a1b07a1ad564d914ebe83f..e58fecf0fe54db06e0e944027923a352fd8005d8 100644
|
||||||
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
--- a/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java
|
||||||
@ -1430,7 +1430,7 @@ index f1918027c3a8735b31566856218611656b56db20..476fe14faa39f02444cab8ad95d44010
|
|||||||
* @return the currently held item
|
* @return the currently held item
|
||||||
* @see #getItemInMainHand()
|
* @see #getItemInMainHand()
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc7829109921a05 100644
|
index 16c10d75dd28f6bbe843935e8bc91f2bccbd360a..c414ccf03572d48f5c096516fc60a59bb1e8efd7 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
@@ -24,8 +24,6 @@ public class ShapedRecipe extends CraftingRecipe {
|
@@ -24,8 +24,6 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||||
@ -1442,8 +1442,8 @@ index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc78291
|
|||||||
* @see ShapedRecipe#setIngredient(char, RecipeChoice)
|
* @see ShapedRecipe#setIngredient(char, RecipeChoice)
|
||||||
* @deprecated Recipes must have keys. Use {@link #ShapedRecipe(NamespacedKey, ItemStack)}
|
* @deprecated Recipes must have keys. Use {@link #ShapedRecipe(NamespacedKey, ItemStack)}
|
||||||
* instead.
|
* instead.
|
||||||
@@ -44,8 +42,6 @@ public class ShapedRecipe extends CraftingRecipe {
|
@@ -45,8 +43,6 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||||
* @param result The item you want the recipe to create.
|
* @exception IllegalArgumentException if the {@code result} is an empty item (AIR)
|
||||||
* @see ShapedRecipe#shape(String...)
|
* @see ShapedRecipe#shape(String...)
|
||||||
* @see ShapedRecipe#setIngredient(char, Material)
|
* @see ShapedRecipe#setIngredient(char, Material)
|
||||||
- * @see ShapedRecipe#setIngredient(char, Material, int)
|
- * @see ShapedRecipe#setIngredient(char, Material, int)
|
||||||
@ -1452,12 +1452,12 @@ index a601bc38e322e5810cf883708541e2d199f09ebb..d89068a37de1dcad0b82dee09cc78291
|
|||||||
*/
|
*/
|
||||||
public ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
public ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
index 3d50775da447175b2a94ed9056ef36aa1e69c2eb..03839302c94adc3175d0a88065cd230257ffd20d 100644
|
index bc924ae23fa10d87537aebbfd126aa44f199b65c..b7f46a048633945dc71e8efec9a7ebeed5832fd7 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
@@ -30,11 +30,8 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -31,11 +31,8 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
* @param key the unique recipe key
|
|
||||||
* @param result The item you want the recipe to create.
|
* @param result The item you want the recipe to create.
|
||||||
|
* @exception IllegalArgumentException if the {@code result} is an empty item (AIR)
|
||||||
* @see ShapelessRecipe#addIngredient(Material)
|
* @see ShapelessRecipe#addIngredient(Material)
|
||||||
- * @see ShapelessRecipe#addIngredient(MaterialData)
|
- * @see ShapelessRecipe#addIngredient(MaterialData)
|
||||||
- * @see ShapelessRecipe#addIngredient(Material,int)
|
- * @see ShapelessRecipe#addIngredient(Material,int)
|
||||||
@ -1467,8 +1467,8 @@ index 3d50775da447175b2a94ed9056ef36aa1e69c2eb..03839302c94adc3175d0a88065cd2302
|
|||||||
+ * @see ShapelessRecipe#addIngredient(RecipeChoice)
|
+ * @see ShapelessRecipe#addIngredient(RecipeChoice)
|
||||||
*/
|
*/
|
||||||
public ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
public ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
||||||
super(key, result);
|
super(key, checkResult(result));
|
||||||
@@ -174,7 +171,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -175,7 +172,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes multiple instances of an ingredient from the list. If there are
|
* Removes multiple instances of an ingredient from the list. If there are
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index a7bfaa874cbd3fc8d24fffe2f7f14594b37fa18c..8cc6f8547380d567aef7910ef309193bd79ced09 100644
|
index 195a7fa0ea8e056cbde7b9152cc014d2c94353ff..85eec2e57b03c11f4737addb0fa88b7bf29dc9e5 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -335,6 +335,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -337,6 +337,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
*/
|
*/
|
||||||
public int getExpToLevel();
|
public int getExpToLevel();
|
||||||
|
|
||||||
|
@ -10,25 +10,25 @@ on the players login.
|
|||||||
Plugin authors need to define a key to keep it consistent between server restarts.
|
Plugin authors need to define a key to keep it consistent between server restarts.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
index 9f9c67e935940833bbfe58e6bfa398e6c86980d5..71e494177473c62449aafda1699b26a0c4c81a68 100644
|
index c414ccf03572d48f5c096516fc60a59bb1e8efd7..e9bac744c5b173e6767e2de8480a6697969fdbb0 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
@@ -31,6 +31,7 @@ public class ShapedRecipe extends CraftingRecipe {
|
@@ -31,6 +31,7 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ShapedRecipe(@NotNull ItemStack result) {
|
public ShapedRecipe(@NotNull ItemStack result) {
|
||||||
super(NamespacedKey.randomKey(), result);
|
this(NamespacedKey.randomKey(), result);
|
||||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
index 03839302c94adc3175d0a88065cd230257ffd20d..d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97 100644
|
index b7f46a048633945dc71e8efec9a7ebeed5832fd7..a7513c1aa09b88e3f99e7db40661fd83e682de96 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
@@ -20,6 +20,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -20,6 +20,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ShapelessRecipe(@NotNull ItemStack result) {
|
public ShapelessRecipe(@NotNull ItemStack result) {
|
||||||
super(NamespacedKey.randomKey(), result);
|
this(NamespacedKey.randomKey(), result);
|
||||||
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
+ new Throwable("Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.").printStackTrace(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index 8cc6f8547380d567aef7910ef309193bd79ced09..48bb08cc7c0af6ebb905d1e175ada0fd7944ca48 100644
|
index 85eec2e57b03c11f4737addb0fa88b7bf29dc9e5..58dbe34ab1b603c2cd53af1625c1f82f8890da01 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -496,6 +496,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -498,6 +498,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setShoulderEntityRight(@Nullable Entity entity);
|
public void setShoulderEntityRight(@Nullable Entity entity);
|
||||||
|
@ -9,10 +9,10 @@ such as a bow or eating food.
|
|||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index 48bb08cc7c0af6ebb905d1e175ada0fd7944ca48..ee3086661e11d3d8faec30590be7131648d3b82a 100644
|
index 58dbe34ab1b603c2cd53af1625c1f82f8890da01..9cbb9093e7d8cd21eef6a23c265d68d7d0ee97b8 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -325,7 +325,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -327,7 +327,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
* blocking).
|
* blocking).
|
||||||
*
|
*
|
||||||
* @return Whether their hand is raised
|
* @return Whether their hand is raised
|
||||||
|
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
|||||||
to "confirm" things based on if it was player triggered close or not.
|
to "confirm" things based on if it was player triggered close or not.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index ee3086661e11d3d8faec30590be7131648d3b82a..25cd03f2f3dc0aaa67173c0f3ebfe56402489e24 100644
|
index 9cbb9093e7d8cd21eef6a23c265d68d7d0ee97b8..3985798654a3085c128144e46f7113b7744b8d14 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -185,6 +185,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -187,6 +187,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
*/
|
*/
|
||||||
public void closeInventory();
|
public void closeInventory();
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@ index a98fc2ffdae1a2f8f3a312bed95268e105f7f791..91bfeffcdbe47208c7d0ddbe013cd0f1
|
|||||||
public static class ExactChoice implements RecipeChoice {
|
public static class ExactChoice implements RecipeChoice {
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
index 1ef513d4d03ce677ee9c77b91e2cc5553ab91e0b..1012656948e9bf2aa18867cc2409616f3f21501e 100644
|
index e9bac744c5b173e6767e2de8480a6697969fdbb0..fa03cf187db29896f5af046b311f67881aee0ff4 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
@@ -179,6 +179,13 @@ public class ShapedRecipe extends CraftingRecipe {
|
@@ -180,6 +180,13 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,10 +40,10 @@ index 1ef513d4d03ce677ee9c77b91e2cc5553ab91e0b..1012656948e9bf2aa18867cc2409616f
|
|||||||
* Get a copy of the ingredients map.
|
* Get a copy of the ingredients map.
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1a46c26ec 100644
|
index a7513c1aa09b88e3f99e7db40661fd83e682de96..63a233cc819d8d6995d14b9dbfabc14d89af54cc 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
@@ -131,6 +131,40 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -132,6 +132,40 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1
|
|||||||
/**
|
/**
|
||||||
* Removes an ingredient from the list.
|
* Removes an ingredient from the list.
|
||||||
*
|
*
|
||||||
@@ -154,7 +188,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -155,7 +189,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public ShapelessRecipe removeIngredient(@NotNull Material ingredient) {
|
public ShapelessRecipe removeIngredient(@NotNull Material ingredient) {
|
||||||
@ -93,7 +93,7 @@ index d6e38c7ccfe3b6e85eafb611da20b1a29fb74d97..b8ac602cd2718d615ec243ce648951a1
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -181,7 +215,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -182,7 +216,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public ShapelessRecipe removeIngredient(int count, @NotNull Material ingredient) {
|
public ShapelessRecipe removeIngredient(int count, @NotNull Material ingredient) {
|
||||||
|
@ -453,7 +453,7 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
|
|||||||
return note;
|
return note;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
index 3bd96bbd35b657a6030d744e86622e616c2c3b08..5529e227781cd2411de9c6581a1cb1255ce9bb20 100644
|
index d1906d150a7d4c4852e085d6fd480aec317c22e4..e9edc8c17cbd29cfdad31df13acb15bab2304735 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
@@ -220,14 +220,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -220,14 +220,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
@ -1067,16 +1067,28 @@ index 53119742beda00a38111063243665bb995ae2188..2d084214e991fecc51f8e18e3d733e43
|
|||||||
public class CampfireStartEvent extends InventoryBlockStartEvent {
|
public class CampfireStartEvent extends InventoryBlockStartEvent {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
diff --git a/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java
|
||||||
|
index f4efb2190ae4b1fa1823d5c97ad518c6d34f0a1a..3d6c0ecc70a748b8508b55513f9d5fa6b4bd6353 100644
|
||||||
|
--- a/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java
|
||||||
|
+++ b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java
|
||||||
|
@@ -17,6 +17,7 @@ public class CrafterCraftEvent extends BlockEvent implements Cancellable {
|
||||||
|
private ItemStack result;
|
||||||
|
private boolean cancelled;
|
||||||
|
|
||||||
|
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper - fix upstream annotation mistakes
|
||||||
|
public CrafterCraftEvent(@NotNull Block theBlock, @NotNull CraftingRecipe recipe, @NotNull ItemStack result) {
|
||||||
|
super(theBlock);
|
||||||
|
this.result = result;
|
||||||
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
index f2edd4a9357832e9dec3fb0aafa006335d7b289b..f05ce4fd6c4bbd79edc5f65e7edd1e4a63e93fb8 100644
|
index 7ae338bcecff2ce25939035181457ced505b3a49..27564727edbd9f093e3a021ce6f30e1146a8ddbb 100644
|
||||||
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
+++ b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
|
||||||
@@ -23,7 +23,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
@@ -23,7 +23,7 @@ public class PrepareItemEnchantEvent extends InventoryEvent implements Cancellab
|
||||||
private boolean cancelled;
|
private boolean cancelled;
|
||||||
private final Player enchanter;
|
private final Player enchanter;
|
||||||
|
|
||||||
- public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) {
|
- public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @NotNull final EnchantmentOffer[] offers, final int bonus) {
|
||||||
+ public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull InventoryView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values
|
+ public PrepareItemEnchantEvent(@NotNull final Player enchanter, @NotNull EnchantmentView view, @NotNull final Block table, @NotNull final ItemStack item, @org.jetbrains.annotations.Nullable final EnchantmentOffer @NotNull [] offers, final int bonus) { // Paper - offers can contain null values
|
||||||
super(view);
|
super(view);
|
||||||
this.enchanter = enchanter;
|
this.enchanter = enchanter;
|
||||||
this.table = table;
|
this.table = table;
|
||||||
@ -1497,10 +1509,10 @@ index f1a48eab1a357ae64545e1f1dc941c383cff8707..466d1bd7089b76f48f953e1a51c611ec
|
|||||||
/**
|
/**
|
||||||
* Checks if the inventory contains any ItemStacks with the given
|
* Checks if the inventory contains any ItemStacks with the given
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
|
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||||
index 5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9..72f93377b60a3b6a08b8c8264ee7313e89c15da0 100644
|
index ebc14022c9ef9b0b3331ee53e96a32667e4762e0..2b2c5faabce1628bd2e82a840dc97fe79bb57856 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
|
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
|
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
|
||||||
@@ -121,9 +121,9 @@ public interface InventoryView {
|
@@ -123,9 +123,9 @@ public interface InventoryView {
|
||||||
* Gets the id of this view.
|
* Gets the id of this view.
|
||||||
*
|
*
|
||||||
* @return the id of this view
|
* @return the id of this view
|
||||||
@ -1512,7 +1524,7 @@ index 5954dff2134654bb0ccc3b4c3b51a8e1ca77f6c9..72f93377b60a3b6a08b8c8264ee7313e
|
|||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
@@ -193,10 +193,10 @@ public interface InventoryView {
|
@@ -195,10 +195,10 @@ public interface InventoryView {
|
||||||
/**
|
/**
|
||||||
* Get the item on the cursor of one of the viewing players.
|
* Get the item on the cursor of one of the viewing players.
|
||||||
*
|
*
|
||||||
@ -1627,10 +1639,10 @@ index 476fe14faa39f02444cab8ad95d4401033dc6938..2c54660dc1fbc7c1232096797a23cae1
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb379b58f207 100644
|
index fa03cf187db29896f5af046b311f67881aee0ff4..295d82dd73b600e9436d2bbec0e11dbeaf78bbf4 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
@@ -106,8 +106,10 @@ public class ShapedRecipe extends CraftingRecipe {
|
@@ -107,8 +107,10 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||||
* @return The changed recipe, so you can chain calls.
|
* @return The changed recipe, so you can chain calls.
|
||||||
* @throws IllegalArgumentException if the {@code key} is a space character
|
* @throws IllegalArgumentException if the {@code key} is a space character
|
||||||
* @throws IllegalArgumentException if the {@code key} does not appear in the shape.
|
* @throws IllegalArgumentException if the {@code key} does not appear in the shape.
|
||||||
@ -1641,7 +1653,7 @@ index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb37
|
|||||||
public ShapedRecipe setIngredient(char key, @NotNull MaterialData ingredient) {
|
public ShapedRecipe setIngredient(char key, @NotNull MaterialData ingredient) {
|
||||||
return setIngredient(key, ingredient.getItemType(), ingredient.getData());
|
return setIngredient(key, ingredient.getItemType(), ingredient.getData());
|
||||||
}
|
}
|
||||||
@@ -190,7 +192,9 @@ public class ShapedRecipe extends CraftingRecipe {
|
@@ -191,7 +193,9 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||||
* Get a copy of the ingredients map.
|
* Get a copy of the ingredients map.
|
||||||
*
|
*
|
||||||
* @return The mapping of character to ingredients.
|
* @return The mapping of character to ingredients.
|
||||||
@ -1652,10 +1664,10 @@ index 1012656948e9bf2aa18867cc2409616f3f21501e..aa3b3070126f1c492f004ec7599eeb37
|
|||||||
public Map<Character, ItemStack> getIngredientMap() {
|
public Map<Character, ItemStack> getIngredientMap() {
|
||||||
HashMap<Character, ItemStack> result = new HashMap<Character, ItemStack>();
|
HashMap<Character, ItemStack> result = new HashMap<Character, ItemStack>();
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab6349576ce8 100644
|
index 63a233cc819d8d6995d14b9dbfabc14d89af54cc..3bf5064cd6ceb05ea98b18993da46c67be140115 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
@@ -43,8 +43,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -44,8 +44,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
*
|
*
|
||||||
* @param ingredient The ingredient to add.
|
* @param ingredient The ingredient to add.
|
||||||
* @return The changed recipe, so you can chain calls.
|
* @return The changed recipe, so you can chain calls.
|
||||||
@ -1666,7 +1678,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63
|
|||||||
public ShapelessRecipe addIngredient(@NotNull MaterialData ingredient) {
|
public ShapelessRecipe addIngredient(@NotNull MaterialData ingredient) {
|
||||||
return addIngredient(1, ingredient);
|
return addIngredient(1, ingredient);
|
||||||
}
|
}
|
||||||
@@ -80,8 +82,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -81,8 +83,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
* @param count How many to add (can't be more than 9!)
|
* @param count How many to add (can't be more than 9!)
|
||||||
* @param ingredient The ingredient to add.
|
* @param ingredient The ingredient to add.
|
||||||
* @return The changed recipe, so you can chain calls.
|
* @return The changed recipe, so you can chain calls.
|
||||||
@ -1677,7 +1689,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63
|
|||||||
public ShapelessRecipe addIngredient(int count, @NotNull MaterialData ingredient) {
|
public ShapelessRecipe addIngredient(int count, @NotNull MaterialData ingredient) {
|
||||||
return addIngredient(count, ingredient.getItemType(), ingredient.getData());
|
return addIngredient(count, ingredient.getItemType(), ingredient.getData());
|
||||||
}
|
}
|
||||||
@@ -198,8 +202,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -199,8 +203,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
*
|
*
|
||||||
* @param ingredient The ingredient to remove
|
* @param ingredient The ingredient to remove
|
||||||
* @return The changed recipe.
|
* @return The changed recipe.
|
||||||
@ -1688,7 +1700,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63
|
|||||||
public ShapelessRecipe removeIngredient(@NotNull MaterialData ingredient) {
|
public ShapelessRecipe removeIngredient(@NotNull MaterialData ingredient) {
|
||||||
return removeIngredient(ingredient.getItemType(), ingredient.getData());
|
return removeIngredient(ingredient.getItemType(), ingredient.getData());
|
||||||
}
|
}
|
||||||
@@ -226,8 +232,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -227,8 +233,10 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
* @param count The number of copies to remove.
|
* @param count The number of copies to remove.
|
||||||
* @param ingredient The ingredient to remove.
|
* @param ingredient The ingredient to remove.
|
||||||
* @return The changed recipe.
|
* @return The changed recipe.
|
||||||
@ -1699,7 +1711,7 @@ index b8ac602cd2718d615ec243ce648951a1a46c26ec..beb798482479c58a8628c314b510ab63
|
|||||||
public ShapelessRecipe removeIngredient(int count, @NotNull MaterialData ingredient) {
|
public ShapelessRecipe removeIngredient(int count, @NotNull MaterialData ingredient) {
|
||||||
return removeIngredient(count, ingredient.getItemType(), ingredient.getData());
|
return removeIngredient(count, ingredient.getItemType(), ingredient.getData());
|
||||||
}
|
}
|
||||||
@@ -277,7 +285,9 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -278,7 +286,9 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
* Get the list of ingredients used for this recipe.
|
* Get the list of ingredients used for this recipe.
|
||||||
*
|
*
|
||||||
* @return The input list
|
* @return The input list
|
||||||
|
@ -6,12 +6,12 @@ Subject: [PATCH] Add item slot convenience methods
|
|||||||
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
|
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
diff --git a/src/main/java/org/bukkit/inventory/AnvilInventory.java b/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
||||||
index 52519cd877017704b53d36088d4d4c28f8f27397..c60be4fd24c7fdf65251dd6169e5e1ac3b588d95 100644
|
index 4f484df010dabf03ac4712996a0fd4d8f3649b59..f1f97a85ec713c05c882d7588f4a3e4a017f4795 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
--- a/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
+++ b/src/main/java/org/bukkit/inventory/AnvilInventory.java
|
||||||
@@ -63,4 +63,64 @@ public interface AnvilInventory extends Inventory {
|
@@ -78,4 +78,64 @@ public interface AnvilInventory extends Inventory {
|
||||||
* @param levels the maximum experience cost
|
|
||||||
*/
|
*/
|
||||||
|
@Deprecated(forRemoval = true, since = "1.21")
|
||||||
void setMaximumRepairCost(int levels);
|
void setMaximumRepairCost(int levels);
|
||||||
+
|
+
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -8,10 +8,10 @@ Adds a new method to fetch the location of a player's bed without generating any
|
|||||||
getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
|
getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index 25cd03f2f3dc0aaa67173c0f3ebfe56402489e24..ccaaf2b6f6424ec7c7d298ceabdc3e60a7917705 100644
|
index 3985798654a3085c128144e46f7113b7744b8d14..11c5846848a6631a9376934622caeadd448b0391 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -275,6 +275,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -277,6 +277,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
*/
|
*/
|
||||||
public int getSleepTicks();
|
public int getSleepTicks();
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ index 0000000000000000000000000000000000000000..c305c606bef93866993095cec5f50e19
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
diff --git a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||||
index 8977f7609431c3c46324a82de84d4a32f4b71c57..d884ecf40af964e718168ac055dd6c672d108eb1 100644
|
index 8a5be3f0322ac19aeac3f00df54add0e73bc87ed..d2b4b2e9385e7c1e0e1e42886481b99ecc8dcf8e 100644
|
||||||
--- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
--- a/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||||
+++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
+++ b/src/main/java/org/bukkit/event/inventory/PrepareAnvilEvent.java
|
||||||
@@ -10,9 +10,9 @@ import org.jetbrains.annotations.Nullable;
|
@@ -10,9 +10,9 @@ import org.jetbrains.annotations.Nullable;
|
||||||
@ -106,10 +106,10 @@ index 8977f7609431c3c46324a82de84d4a32f4b71c57..d884ecf40af964e718168ac055dd6c67
|
|||||||
- private static final HandlerList handlers = new HandlerList();
|
- private static final HandlerList handlers = new HandlerList();
|
||||||
+ // Paper - move HandlerList to PrepareInventoryResultEvent
|
+ // Paper - move HandlerList to PrepareInventoryResultEvent
|
||||||
|
|
||||||
public PrepareAnvilEvent(@NotNull InventoryView inventory, @Nullable ItemStack result) {
|
public PrepareAnvilEvent(@NotNull AnvilView inventory, @Nullable ItemStack result) {
|
||||||
super(inventory, result);
|
super(inventory, result);
|
||||||
@@ -38,14 +38,5 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent {
|
@@ -44,14 +44,5 @@ public class PrepareAnvilEvent extends PrepareInventoryResultEvent {
|
||||||
super.setResult(result);
|
return (AnvilView) super.getView();
|
||||||
}
|
}
|
||||||
|
|
||||||
- @NotNull
|
- @NotNull
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add additional open container api to HumanEntity
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index ccaaf2b6f6424ec7c7d298ceabdc3e60a7917705..b980d55b68ed9da78c5cd19f369bb00dccbf08e1 100644
|
index 11c5846848a6631a9376934622caeadd448b0391..f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -180,6 +180,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -182,6 +182,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
@Nullable
|
@Nullable
|
||||||
public InventoryView openMerchant(@NotNull Merchant merchant, boolean force);
|
public InventoryView openMerchant(@NotNull Merchant merchant, boolean force);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index b980d55b68ed9da78c5cd19f369bb00dccbf08e1..4d6ceca22d98a3e46aa26ef26176c5417a5ccf35 100644
|
index f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425..937c136f2499bd1660989d14c0f50a7ef9a1a2b6 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -354,6 +354,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -356,6 +356,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
*/
|
*/
|
||||||
public void setCooldown(@NotNull Material material, int ticks);
|
public void setCooldown(@NotNull Material material, int ticks);
|
||||||
|
|
||||||
|
@ -206,10 +206,22 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e
|
|||||||
return server.getRegistry(tClass);
|
return server.getRegistry(tClass);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c17bf68ec7 100644
|
index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a9434e718b2f 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
@@ -102,7 +102,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -87,8 +87,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
|
* Server banner patterns.
|
||||||
|
*
|
||||||
|
* @see PatternType
|
||||||
|
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#BANNER_PATTERN}
|
||||||
|
*/
|
||||||
|
- Registry<PatternType> BANNER_PATTERN = Objects.requireNonNull(Bukkit.getRegistry(PatternType.class), "No registry present for Pattern Type. This is a bug.");
|
||||||
|
+ @Deprecated(since = "1.21") // Paper
|
||||||
|
+ Registry<PatternType> BANNER_PATTERN = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(PatternType.class), "No registry present for PatternType. This is a bug."); // Paper
|
||||||
|
/**
|
||||||
|
* Server biomes.
|
||||||
|
*
|
||||||
|
@@ -102,7 +104,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
* @apiNote BlockType is not ready for public usage yet
|
* @apiNote BlockType is not ready for public usage yet
|
||||||
*/
|
*/
|
||||||
@ApiStatus.Internal
|
@ApiStatus.Internal
|
||||||
@ -218,7 +230,7 @@ index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c1
|
|||||||
/**
|
/**
|
||||||
* Custom boss bars.
|
* Custom boss bars.
|
||||||
*
|
*
|
||||||
@@ -134,13 +134,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -134,13 +136,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
*
|
*
|
||||||
* @see Cat.Type
|
* @see Cat.Type
|
||||||
*/
|
*/
|
||||||
@ -236,7 +248,7 @@ index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c1
|
|||||||
/**
|
/**
|
||||||
* Server entity types.
|
* Server entity types.
|
||||||
*
|
*
|
||||||
@@ -152,7 +154,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -152,7 +156,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
*
|
*
|
||||||
* @see MusicInstrument
|
* @see MusicInstrument
|
||||||
*/
|
*/
|
||||||
@ -245,7 +257,7 @@ index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c1
|
|||||||
/**
|
/**
|
||||||
* Server item types.
|
* Server item types.
|
||||||
*
|
*
|
||||||
@@ -160,7 +162,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -160,7 +164,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
* @apiNote ItemType is not ready for public usage yet
|
* @apiNote ItemType is not ready for public usage yet
|
||||||
*/
|
*/
|
||||||
@ApiStatus.Internal
|
@ApiStatus.Internal
|
||||||
@ -254,7 +266,7 @@ index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c1
|
|||||||
/**
|
/**
|
||||||
* Default server loot tables.
|
* Default server loot tables.
|
||||||
*
|
*
|
||||||
@@ -178,7 +180,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -178,7 +182,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
*
|
*
|
||||||
* @see PotionEffectType
|
* @see PotionEffectType
|
||||||
*/
|
*/
|
||||||
@ -263,7 +275,7 @@ index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c1
|
|||||||
/**
|
/**
|
||||||
* Server particles.
|
* Server particles.
|
||||||
*
|
*
|
||||||
@@ -201,14 +203,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -201,14 +205,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
* Server structures.
|
* Server structures.
|
||||||
*
|
*
|
||||||
* @see Structure
|
* @see Structure
|
||||||
@ -282,7 +294,7 @@ index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c1
|
|||||||
/**
|
/**
|
||||||
* Sound keys.
|
* Sound keys.
|
||||||
*
|
*
|
||||||
@@ -219,40 +223,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -219,40 +225,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
* Trim materials.
|
* Trim materials.
|
||||||
*
|
*
|
||||||
* @see TrimMaterial
|
* @see TrimMaterial
|
||||||
@ -337,7 +349,7 @@ index 5529e227781cd2411de9c6581a1cb1255ce9bb20..f99e68f160deba42e2833fa0f81df4c1
|
|||||||
/**
|
/**
|
||||||
* Memory Keys.
|
* Memory Keys.
|
||||||
*
|
*
|
||||||
@@ -289,25 +300,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -289,25 +302,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
*
|
*
|
||||||
* @see Frog.Variant
|
* @see Frog.Variant
|
||||||
*/
|
*/
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index 4d6ceca22d98a3e46aa26ef26176c5417a5ccf35..58c842a1fd946d94ae29c7d2439aaf77e47f69b4 100644
|
index 937c136f2499bd1660989d14c0f50a7ef9a1a2b6..b1b18886fc63a4854c2858ff9869da70e92dae26 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -364,6 +364,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -366,6 +366,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
void setHurtDirection(float hurtDirection);
|
void setHurtDirection(float hurtDirection);
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
index a583d26883c8b7012203e128cd64113df94307c1..4d3e0b90579b33ff93fc565e8ee99a01b690c62b 100644
|
index 5dbbc4eb764650395c6ebaaf5fdf0466ca107439..0ee9a8728035217bb95c7fba917b45a5ef2ea533 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
@@ -321,6 +321,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -323,6 +323,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
* @see GameEvent
|
* @see GameEvent
|
||||||
*/
|
*/
|
||||||
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getFishHook
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
index 58c842a1fd946d94ae29c7d2439aaf77e47f69b4..294de2c073167e7186fbf1d6885fe5951351cc9c 100644
|
index b1b18886fc63a4854c2858ff9869da70e92dae26..773651350c17cae9058346a590eda758071b7447 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||||
@@ -392,6 +392,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
@@ -394,6 +394,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||||
@Nullable
|
@Nullable
|
||||||
public Location getPotentialBedLocation();
|
public Location getPotentialBedLocation();
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@ -54,15 +54,15 @@ index 0000000000000000000000000000000000000000..0d5793790ab6a47525ad330335173612
|
|||||||
+ boolean readyToBeSheared();
|
+ boolean readyToBeSheared();
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
|
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
index a89f104aa2b2244c075a72c698a9b616c57eaf7c..a36bb84c17120bc578ab01d45f6f12fb1faf9548 100644
|
index 8b75a505a55a96a5795ac31a2d37307add12cd9e..6296a6f3f3e794677fd3a626376f357c740ec356 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Bogged.java
|
--- a/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Bogged.java
|
+++ b/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
@@ -6,5 +6,5 @@ import org.jetbrains.annotations.ApiStatus;
|
@@ -6,5 +6,5 @@ import org.jetbrains.annotations.ApiStatus;
|
||||||
* Represents a Bogged Skeleton.
|
* Represents a Bogged Skeleton.
|
||||||
*/
|
*/
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
-public interface Bogged extends AbstractSkeleton {
|
-public interface Bogged extends AbstractSkeleton, Shearable {
|
||||||
+public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
+public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java
|
diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java
|
||||||
index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644
|
index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644
|
||||||
@ -77,19 +77,52 @@ index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks for the presence of custom potion effects to be applied to the
|
* Checks for the presence of custom potion effects to be applied to the
|
||||||
|
diff --git a/src/main/java/org/bukkit/entity/Shearable.java b/src/main/java/org/bukkit/entity/Shearable.java
|
||||||
|
index 0215d20f81bfbef080f86ce46147a38f71310f65..9967c8a52ddd2c7e10db49a3f166731373f1ba45 100644
|
||||||
|
--- a/src/main/java/org/bukkit/entity/Shearable.java
|
||||||
|
+++ b/src/main/java/org/bukkit/entity/Shearable.java
|
||||||
|
@@ -2,20 +2,30 @@ package org.bukkit.entity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents an entity which can be shorn with shears.
|
||||||
|
+ * @deprecated Spigots shearable API miserably fails at capturing all entities that may be sheared by a player, like
|
||||||
|
+ * mushroom cows which, once sheared, convert into normal cows. For such entities, methods like
|
||||||
|
+ * {@link #setSheared(boolean)} or {@link #isSheared()} make no sense, making this API and interface dead API from
|
||||||
|
+ * the get-go.
|
||||||
|
*/
|
||||||
|
+@Deprecated(forRemoval = true, since = "1.21")
|
||||||
|
public interface Shearable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets whether the entity is in its sheared state.
|
||||||
|
*
|
||||||
|
* @return Whether the entity is sheared.
|
||||||
|
+ * @deprecated Use {@link io.papermc.paper.entity.Shearable#readyToBeSheared()} instead.
|
||||||
|
*/
|
||||||
|
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||||
|
boolean isSheared();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the entity is in its sheared state.
|
||||||
|
*
|
||||||
|
* @param flag Whether to shear the entity
|
||||||
|
+ * @deprecated Use {@link io.papermc.paper.entity.Shearable#shear()} instead if applicable.
|
||||||
|
+ * Some entities cannot be "unsheared".
|
||||||
|
*/
|
||||||
|
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||||
|
void setSheared(boolean flag);
|
||||||
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java
|
diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java
|
||||||
index f4ce312ccd927a8b64f4266b35a0a53b85e591f3..97388d46cee225dedc0b61a12e7b60b3424732c8 100644
|
index 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..01a0e5b1bb18d7a28d68329c2e2ab78a8df45f8e 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Sheep.java
|
--- a/src/main/java/org/bukkit/entity/Sheep.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Sheep.java
|
+++ b/src/main/java/org/bukkit/entity/Sheep.java
|
||||||
@@ -5,7 +5,7 @@ import org.bukkit.material.Colorable;
|
@@ -5,5 +5,5 @@ import org.bukkit.material.Colorable;
|
||||||
/**
|
/**
|
||||||
* Represents a Sheep.
|
* Represents a Sheep.
|
||||||
*/
|
*/
|
||||||
-public interface Sheep extends Animals, Colorable {
|
-public interface Sheep extends Animals, Colorable, Shearable {
|
||||||
+public interface Sheep extends Animals, Colorable, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
+public interface Sheep extends Animals, Colorable, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
||||||
|
}
|
||||||
/**
|
|
||||||
* @return Whether the sheep is sheared.
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java
|
diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java
|
||||||
index 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644
|
index 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Snowman.java
|
--- a/src/main/java/org/bukkit/entity/Snowman.java
|
||||||
|
@ -104,7 +104,7 @@ index 60fbacee263e55f91ac977f020e390d46024723a..ecff691c3a0878659fb051926ef769ce
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
|
diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c08d32868 100644
|
index 6296a6f3f3e794677fd3a626376f357c740ec356..7d993f8bd18ec1d3260d12f0ff8078a86ee4867d 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Bogged.java
|
--- a/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Bogged.java
|
+++ b/src/main/java/org/bukkit/entity/Bogged.java
|
||||||
@@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus;
|
@@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus;
|
||||||
@ -112,7 +112,7 @@ index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c
|
|||||||
* Represents a Bogged Skeleton.
|
* Represents a Bogged Skeleton.
|
||||||
*/
|
*/
|
||||||
-@ApiStatus.Experimental
|
-@ApiStatus.Experimental
|
||||||
public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Breeze.java b/src/main/java/org/bukkit/entity/Breeze.java
|
diff --git a/src/main/java/org/bukkit/entity/Breeze.java b/src/main/java/org/bukkit/entity/Breeze.java
|
||||||
index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644
|
index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644
|
||||||
|
@ -31,10 +31,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..704dba92f9246ef398ed8d162ebee3cf
|
|||||||
@Override
|
@Override
|
||||||
public @NotNull String translationKey() {
|
public @NotNull String translationKey() {
|
||||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89f02611a0 100644
|
index 0ee9a8728035217bb95c7fba917b45a5ef2ea533..cd1e38debbec745dd13cd895327f544dcf42594d 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
@@ -357,6 +357,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -359,6 +359,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
@Nullable
|
@Nullable
|
||||||
T get(@NotNull NamespacedKey key);
|
T get(@NotNull NamespacedKey key);
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89
|
|||||||
/**
|
/**
|
||||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||||
*
|
*
|
||||||
@@ -431,5 +504,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -433,5 +506,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
public Class<T> getType() {
|
public Class<T> getType() {
|
||||||
return this.type;
|
return this.type;
|
||||||
}
|
}
|
||||||
@ -128,12 +128,12 @@ index 4d3e0b90579b33ff93fc565e8ee99a01b690c62b..36a8f6082f111a1cbb25e0ff3c968a89
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
|
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||||
index 6a6be0287255cf38a735bfc83ec91644dc96b903..1883183157c875d87656fdc86a589e9b95dc4895 100644
|
index 9e90572745909538e942b7fbe788b5286c6cc9a3..100f93358e0a1fa8507775a2afd29314ff353a87 100644
|
||||||
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
|
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||||
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
|
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||||
@@ -69,6 +69,13 @@ public enum PatternType implements Keyed {
|
@@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||||
this.key = NamespacedKey.minecraft(key);
|
PatternType FLOW = getType("flow");
|
||||||
}
|
PatternType GUSTER = getType("guster");
|
||||||
|
|
||||||
+ // Paper start - deprecate getKey
|
+ // Paper start - deprecate getKey
|
||||||
+ /**
|
+ /**
|
||||||
@ -144,7 +144,7 @@ index 6a6be0287255cf38a735bfc83ec91644dc96b903..1883183157c875d87656fdc86a589e9b
|
|||||||
+ // Paper end - deprecate getKey
|
+ // Paper end - deprecate getKey
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
@NotNull
|
||||||
public NamespacedKey getKey() {
|
public NamespacedKey getKey();
|
||||||
diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java
|
diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java
|
||||||
index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325ebb6ef57 100644
|
index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325ebb6ef57 100644
|
||||||
--- a/src/main/java/org/bukkit/generator/structure/Structure.java
|
--- a/src/main/java/org/bukkit/generator/structure/Structure.java
|
||||||
|
@ -40,18 +40,18 @@ index f7fa79393aef40027446b78bac8e9490cfafd8bc..07906ca1a9b39fcc6774870daa498402
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
||||||
index e4bf772f7e06f38215bee68f089b15a4fcb12817..37024b4736dd3897490ca51d08cf07901b01d59f 100644
|
index 1b7b07715067014bf3d35002ae1655793248b426..5bf55b40fbf6ec708f37d90bd0853fe7dd8fffd9 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
||||||
@@ -18,7 +18,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed {
|
@@ -99,7 +99,7 @@ public abstract class CraftingRecipe implements Recipe, Keyed {
|
||||||
|
@ApiStatus.Internal
|
||||||
protected CraftingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result) {
|
@NotNull
|
||||||
Preconditions.checkArgument(key != null, "key cannot be null");
|
protected static ItemStack checkResult(@NotNull ItemStack result) {
|
||||||
- Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
- Preconditions.checkArgument(result.getType() != Material.AIR, "Recipe must have non-AIR result.");
|
||||||
+ Preconditions.checkArgument(!result.isEmpty(), "Recipe cannot have an empty result."); // Paper
|
+ Preconditions.checkArgument(!result.isEmpty(), "Recipe cannot have an empty result."); // Paper
|
||||||
this.key = key;
|
return result;
|
||||||
this.output = new ItemStack(result);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java b/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java
|
diff --git a/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java b/src/main/java/org/bukkit/inventory/EmptyRecipeChoice.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..ed0ab6163f47ec843ba4f7ea4a98bb2fa315eaa1
|
index 0000000000000000000000000000000000000000..ed0ab6163f47ec843ba4f7ea4a98bb2fa315eaa1
|
||||||
@ -211,10 +211,10 @@ index 91bfeffcdbe47208c7d0ddbe013cd0f11fddfa32..e7796054f3f65f5bea7f93c75320195f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b91247bd5 100644
|
index 295d82dd73b600e9436d2bbec0e11dbeaf78bbf4..c0105d716985acef497d60b5c631a56b4ca5847b 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapedRecipe.java
|
||||||
@@ -177,14 +177,15 @@ public class ShapedRecipe extends CraftingRecipe {
|
@@ -178,14 +178,15 @@ public class ShapedRecipe extends CraftingRecipe {
|
||||||
Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient");
|
Preconditions.checkArgument(key != ' ', "Space in recipe shape must represent no ingredient");
|
||||||
Preconditions.checkArgument(ingredients.containsKey(key), "Symbol does not appear in the shape:", key);
|
Preconditions.checkArgument(ingredients.containsKey(key), "Symbol does not appear in the shape:", key);
|
||||||
|
|
||||||
@ -233,10 +233,10 @@ index aa3b3070126f1c492f004ec7599eeb379b58f207..1815de38654dd134abde3dd9bd0b018b
|
|||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
diff --git a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e3909435754 100644
|
index 3bf5064cd6ceb05ea98b18993da46c67be140115..79db6dbc0367de2eaa397674624c765d5aeb8fa5 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
--- a/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
+++ b/src/main/java/org/bukkit/inventory/ShapelessRecipe.java
|
||||||
@@ -131,7 +131,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -132,7 +132,7 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
public ShapelessRecipe addIngredient(@NotNull RecipeChoice ingredient) {
|
public ShapelessRecipe addIngredient(@NotNull RecipeChoice ingredient) {
|
||||||
Preconditions.checkArgument(ingredients.size() + 1 <= 9, "Shapeless recipes cannot have more than 9 ingredients");
|
Preconditions.checkArgument(ingredients.size() + 1 <= 9, "Shapeless recipes cannot have more than 9 ingredients");
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ index beb798482479c58a8628c314b510ab6349576ce8..8251170314ab25c26270208e453b4e39
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,6 +144,8 @@ public class ShapelessRecipe extends CraftingRecipe {
|
@@ -145,6 +145,8 @@ public class ShapelessRecipe extends CraftingRecipe {
|
||||||
@NotNull
|
@NotNull
|
||||||
public ShapelessRecipe addIngredient(int count, @NotNull ItemStack item) {
|
public ShapelessRecipe addIngredient(int count, @NotNull ItemStack item) {
|
||||||
Preconditions.checkArgument(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients");
|
Preconditions.checkArgument(ingredients.size() + count <= 9, "Shapeless recipes cannot have more than 9 ingredients");
|
||||||
|
@ -19,6 +19,27 @@ index 637fa73d4366c2d88e2716e5c8d3465706d788a7..0f03c546ecdd6383fb36a362d18d6fb5
|
|||||||
this.flicker = flicker;
|
this.flicker = flicker;
|
||||||
this.trail = trail;
|
this.trail = trail;
|
||||||
this.colors = colors;
|
this.colors = colors;
|
||||||
|
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||||
|
index a6d1dde422de98f178c0c9add99e01203a35e5cb..01ec84248a681180088fb1d7d22b80f8572b0305 100644
|
||||||
|
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||||
|
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||||
|
@@ -31,6 +31,7 @@ import org.bukkit.inventory.meta.MapMeta;
|
||||||
|
import org.bukkit.inventory.meta.MusicInstrumentMeta;
|
||||||
|
import org.bukkit.inventory.meta.OminousBottleMeta;
|
||||||
|
import org.bukkit.inventory.meta.PotionMeta;
|
||||||
|
+import org.bukkit.inventory.meta.ShieldMeta;
|
||||||
|
import org.bukkit.inventory.meta.SkullMeta;
|
||||||
|
import org.bukkit.inventory.meta.SpawnEggMeta;
|
||||||
|
import org.bukkit.inventory.meta.SuspiciousStewMeta;
|
||||||
|
@@ -1893,7 +1894,7 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||||
|
/**
|
||||||
|
* ItemMeta: {@link BlockStateMeta}
|
||||||
|
*/
|
||||||
|
- ItemType.Typed<BlockStateMeta> SHIELD = getItemType("shield");
|
||||||
|
+ ItemType.Typed<ShieldMeta> SHIELD = getItemType("shield"); // Paper - update shield to its new meta
|
||||||
|
ItemType.Typed<ItemMeta> TOTEM_OF_UNDYING = getItemType("totem_of_undying");
|
||||||
|
ItemType.Typed<ItemMeta> SHULKER_SHELL = getItemType("shulker_shell");
|
||||||
|
ItemType.Typed<ItemMeta> IRON_NUGGET = getItemType("iron_nugget");
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/meta/Damageable.java b/src/main/java/org/bukkit/inventory/meta/Damageable.java
|
diff --git a/src/main/java/org/bukkit/inventory/meta/Damageable.java b/src/main/java/org/bukkit/inventory/meta/Damageable.java
|
||||||
index ff6818b6d9e0207eafdd749928f33aeac3f27191..992f39da07bafe9769effaa7dc6adc018c89329d 100644
|
index ff6818b6d9e0207eafdd749928f33aeac3f27191..992f39da07bafe9769effaa7dc6adc018c89329d 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/meta/Damageable.java
|
--- a/src/main/java/org/bukkit/inventory/meta/Damageable.java
|
||||||
|
@ -790,10 +790,10 @@ index 0000000000000000000000000000000000000000..11d19e339c7c62f2eb4467277552c27e
|
|||||||
+record TagKeyImpl<T>(RegistryKey<T> registryKey, Key key) implements TagKey<T> {
|
+record TagKeyImpl<T>(RegistryKey<T> registryKey, Key key) implements TagKey<T> {
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||||
index fcc9664fd1fe081c9c70bcd7e511c60d987b44f9..8e306d05e372855929d30456ed2d27a04d55ac42 100644
|
index cd1e38debbec745dd13cd895327f544dcf42594d..c0428edee6ecbbd646c0e58da39a7ca476914fd1 100644
|
||||||
--- a/src/main/java/org/bukkit/Registry.java
|
--- a/src/main/java/org/bukkit/Registry.java
|
||||||
+++ b/src/main/java/org/bukkit/Registry.java
|
+++ b/src/main/java/org/bukkit/Registry.java
|
||||||
@@ -356,6 +356,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -358,6 +358,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
T get(@NotNull NamespacedKey key);
|
T get(@NotNull NamespacedKey key);
|
||||||
@ -821,7 +821,7 @@ index fcc9664fd1fe081c9c70bcd7e511c60d987b44f9..8e306d05e372855929d30456ed2d27a0
|
|||||||
|
|
||||||
// Paper start - improve Registry
|
// Paper start - improve Registry
|
||||||
/**
|
/**
|
||||||
@@ -430,6 +451,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -432,6 +453,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
}
|
}
|
||||||
// Paper end - improve Registry
|
// Paper end - improve Registry
|
||||||
|
|
||||||
@ -856,7 +856,7 @@ index fcc9664fd1fe081c9c70bcd7e511c60d987b44f9..8e306d05e372855929d30456ed2d27a0
|
|||||||
/**
|
/**
|
||||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||||
*
|
*
|
||||||
@@ -511,5 +560,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
@@ -513,5 +562,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||||
return value.getKey();
|
return value.getKey();
|
||||||
}
|
}
|
||||||
// Paper end - improve Registry
|
// Paper end - improve Registry
|
||||||
|
@ -480,10 +480,10 @@ index 6c9689baca1763e2ef79495d38618d587e792434..4583092c2d1ffe95be2831c5d5f0e904
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||||
index 94587a97fcea81a43b160b01d2c81cef2b7f4413..6bc1853ada3ea38bc36cb31fbb5ce246347fe5d4 100644
|
index 01ec84248a681180088fb1d7d22b80f8572b0305..0168f0a14a3e899e84c5e36963ff79950ab580fb 100644
|
||||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||||
@@ -46,7 +46,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
* official replacement for the aforementioned enum. Entirely incompatible
|
* official replacement for the aforementioned enum. Entirely incompatible
|
||||||
* changes may occur. Do not use this API in plugins.
|
* changes may occur. Do not use this API in plugins.
|
||||||
*/
|
*/
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Bjarne Koll <lynxplay101@gmail.com>
|
|
||||||
Date: Fri, 19 Jul 2024 19:09:21 +0200
|
|
||||||
Subject: [PATCH] Move CraftComplexRecipe to extend CraftingRecipe
|
|
||||||
|
|
||||||
A craft complex recipe wraps a CustomRecipe, which itself is a
|
|
||||||
CraftingRecipe.
|
|
||||||
As such, this complex recipe should also be a crafting recipe.
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/inventory/CraftingRecipe.java b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
|
||||||
index 37024b4736dd3897490ca51d08cf07901b01d59f..afa3de9ab78d01c448d450d8afbc7b1e7e62754c 100644
|
|
||||||
--- a/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
|
||||||
+++ b/src/main/java/org/bukkit/inventory/CraftingRecipe.java
|
|
||||||
@@ -11,8 +11,11 @@ import org.jetbrains.annotations.NotNull;
|
|
||||||
* Represents a shaped or shapeless crafting recipe.
|
|
||||||
*/
|
|
||||||
public abstract class CraftingRecipe implements Recipe, Keyed {
|
|
||||||
- private final NamespacedKey key;
|
|
||||||
- private final ItemStack output;
|
|
||||||
+ // Paper - make CraftComplexRecipe extend CraftingRecipe - start
|
|
||||||
+ protected NamespacedKey key;
|
|
||||||
+ protected ItemStack output;
|
|
||||||
+ protected CraftingRecipe() {}
|
|
||||||
+ // Paper - make CraftComplexRecipe extend CraftingRecipe - end
|
|
||||||
private String group = "";
|
|
||||||
private CraftingBookCategory category = CraftingBookCategory.MISC;
|
|
||||||
|
|
@ -1,97 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: ploppyperson <nathat890@outlook.com>
|
|
||||||
Date: Thu, 18 Jul 2024 16:37:58 +0200
|
|
||||||
Subject: [PATCH] Add CrafterCraftEvent
|
|
||||||
|
|
||||||
Ports the currently proposed CrafterCraftEvent
|
|
||||||
from upstream.
|
|
||||||
The type is experimental to account for spigot
|
|
||||||
potentially changing some api contracts, however
|
|
||||||
the event is required for a stable release and
|
|
||||||
waiting on spigot's PR queue is not an option.
|
|
||||||
|
|
||||||
See: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/1044/overview
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000000000000000000000000000000000000..8dec6d16aa3c3579eadd77f637c9afa54ee9a90f
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/main/java/org/bukkit/event/block/CrafterCraftEvent.java
|
|
||||||
@@ -0,0 +1,77 @@
|
|
||||||
+package org.bukkit.event.block;
|
|
||||||
+
|
|
||||||
+import org.bukkit.block.Block;
|
|
||||||
+import org.bukkit.event.Cancellable;
|
|
||||||
+import org.bukkit.event.HandlerList;
|
|
||||||
+import org.bukkit.inventory.CraftingRecipe;
|
|
||||||
+import org.bukkit.inventory.ItemStack;
|
|
||||||
+import org.jetbrains.annotations.NotNull;
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * Event called when a Crafter is about to craft an item
|
|
||||||
+ * @apiNote Currently still experimental as it is ported from an open, not merged, spigot PR.
|
|
||||||
+ * The event was pulled to allow protection plugins and the likes to properly manage crafters.
|
|
||||||
+ * The type remains experimental as upstream *may* change the event before pulling it, resulting in a breaking change.
|
|
||||||
+ */
|
|
||||||
+@org.jetbrains.annotations.ApiStatus.Experimental
|
|
||||||
+public class CrafterCraftEvent extends BlockEvent implements Cancellable {
|
|
||||||
+
|
|
||||||
+ private static final HandlerList handlers = new HandlerList();
|
|
||||||
+ private boolean cancelled;
|
|
||||||
+ private ItemStack result;
|
|
||||||
+ private final CraftingRecipe recipe;
|
|
||||||
+
|
|
||||||
+ @org.jetbrains.annotations.ApiStatus.Internal // Paper - internal constructor.
|
|
||||||
+ public CrafterCraftEvent(@NotNull Block theBlock, @NotNull CraftingRecipe recipe, @NotNull ItemStack result) {
|
|
||||||
+ super(theBlock);
|
|
||||||
+ this.result = result;
|
|
||||||
+ this.recipe = recipe;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Gets the result for the craft
|
|
||||||
+ * @return the result for the craft
|
|
||||||
+ */
|
|
||||||
+ @NotNull
|
|
||||||
+ public ItemStack getResult() {
|
|
||||||
+ return result.clone();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Sets the result of the craft
|
|
||||||
+ * @param result the result of the craft
|
|
||||||
+ */
|
|
||||||
+ public void setResult(@NotNull ItemStack result) {
|
|
||||||
+ this.result = result.clone();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * The recipe that was used to craft this item
|
|
||||||
+ * @return the recipe that was used to craft this item
|
|
||||||
+ */
|
|
||||||
+ @NotNull
|
|
||||||
+ public CraftingRecipe getRecipe() {
|
|
||||||
+ return recipe;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @NotNull
|
|
||||||
+ @Override
|
|
||||||
+ public HandlerList getHandlers() {
|
|
||||||
+ return handlers;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public boolean isCancelled() {
|
|
||||||
+ return cancelled;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ public void setCancelled(boolean cancel) {
|
|
||||||
+ this.cancelled = cancel;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @NotNull
|
|
||||||
+ public static HandlerList getHandlerList() {
|
|
||||||
+ return handlers;
|
|
||||||
+ }
|
|
||||||
+}
|
|
@ -131,10 +131,10 @@ index feca36209fd2405fab70f564f63e627b8b78ac18..396ec10a76bdadbf5be2f0e15e88eed4
|
|||||||
|
|
||||||
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
|
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 82b8485a4781105bce874485119110576d1e2d63..a07e26caf48acf9ef193a74497a201166bfbe098 100644
|
index 9bae4835882a7c1b5a623d57330c36cc61b9b6d1..273a6658deacbf00f6cc498cf3fcd20d144bd9e4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -210,7 +210,7 @@ public class Main {
|
@@ -199,7 +199,7 @@ public class Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||||
|
@ -351,6 +351,22 @@ index ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9..7d9dbed7281099b78d7f898885b37cdc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
|
index 544307fe34cbcfa286a7d7b30900ebea127d189e..5bda0bc976920f224586f2c0e083b771c676e307 100644
|
||||||
|
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
|
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
|
@@ -53,6 +53,11 @@ public abstract class AbstractTestingBase {
|
||||||
|
MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
|
||||||
|
// add tags and loot tables for unit tests
|
||||||
|
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
|
||||||
|
+ // Paper start - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||||
|
+ try {
|
||||||
|
+ Class.forName("org.bukkit.Registry");
|
||||||
|
+ } catch (ClassNotFoundException ignored) {}
|
||||||
|
+ // Paper end - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||||
|
layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||||
|
REGISTRY_CUSTOM = layers.compositeAccess().freeze();
|
||||||
|
// Register vanilla pack
|
||||||
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
||||||
index 1acdf5bc439c073c1777c2c4f5743ae082f4a621..183d30e3d3d413b05c762f374a964498d6ffdec4 100644
|
index 1acdf5bc439c073c1777c2c4f5743ae082f4a621..183d30e3d3d413b05c762f374a964498d6ffdec4 100644
|
||||||
--- a/src/test/java/org/bukkit/support/DummyServer.java
|
--- a/src/test/java/org/bukkit/support/DummyServer.java
|
||||||
|
@ -5065,7 +5065,7 @@ index e8fac2863c5feb875cf0c78f062b4b87acbcb49b..751900e0c2a946ba4291174c81b2bdbd
|
|||||||
world.serverLevelData.setDifficulty(config.difficulty);
|
world.serverLevelData.setDifficulty(config.difficulty);
|
||||||
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index a07e26caf48acf9ef193a74497a201166bfbe098..dbcde37cfdeb6141c3f5c4f8b95d60fca91c7977 100644
|
index 273a6658deacbf00f6cc498cf3fcd20d144bd9e4..cf06abf508fab734f5945e1d292c01512a50749e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -142,6 +142,19 @@ public class Main {
|
@@ -142,6 +142,19 @@ public class Main {
|
||||||
@ -5190,10 +5190,10 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
index 544307fe34cbcfa286a7d7b30900ebea127d189e..1b1d51a68c0abe7d8f0aa1172064192c71ae645e 100644
|
index 5bda0bc976920f224586f2c0e083b771c676e307..4e9612600822bc1b52b8528dff2783d43385ec73 100644
|
||||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||||
@@ -63,6 +63,7 @@ public abstract class AbstractTestingBase {
|
@@ -68,6 +68,7 @@ public abstract class AbstractTestingBase {
|
||||||
BIOMES = REGISTRY_CUSTOM.registryOrThrow(Registries.BIOME);
|
BIOMES = REGISTRY_CUSTOM.registryOrThrow(Registries.BIOME);
|
||||||
|
|
||||||
DummyServer.setup();
|
DummyServer.setup();
|
||||||
|
@ -5064,7 +5064,7 @@ index 12db4c5db3d7951df984db03d09d14d808e58699..44d4aee059d74676bffb8b6bc6f6ad4d
|
|||||||
@Override
|
@Override
|
||||||
public float getBukkitYaw() {
|
public float getBukkitYaw() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 15f0b0977fe7b41e29346df9d49120f14f02ea43..b6cb1de08e955dfc99a0cb736b2ed456c99fde5c 100644
|
index d7a3f704cce228c50d26f1ecd98e819eca561bfc..3457e1c9791b294b5e4dab478d90cdd1a1cf7fef 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -953,6 +953,25 @@ public final class ItemStack implements DataComponentHolder {
|
@@ -953,6 +953,25 @@ public final class ItemStack implements DataComponentHolder {
|
||||||
@ -5351,10 +5351,10 @@ index 497792978bdf0e6a53d772304770e8df3e7416ea..c5454b92ca2565461c799d7340160f9f
|
|||||||
public WorldBorder getWorldBorder() {
|
public WorldBorder getWorldBorder() {
|
||||||
return this.level.getWorldBorder();
|
return this.level.getWorldBorder();
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
index 9569d9d1c8f809420e08038e5bc38c2c7887ff90..d5d638d955dbcc1034bc79aace77d43e20db5995 100644
|
index e0594a1c381487b43bfc55212044e1b3122cee66..59fcaca90b67c03e1a6799e58061dbae3b1f1ceb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
@@ -834,12 +834,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
@@ -841,12 +841,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5369,7 +5369,7 @@ index 9569d9d1c8f809420e08038e5bc38c2c7887ff90..d5d638d955dbcc1034bc79aace77d43e
|
|||||||
|
|
||||||
this.legacySolid = this.calculateSolid();
|
this.legacySolid = this.calculateSolid();
|
||||||
}
|
}
|
||||||
@@ -886,8 +888,8 @@ public abstract class BlockBehaviour implements FeatureElement {
|
@@ -893,8 +895,8 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||||
return this.getBlock().getOcclusionShape(this.asState(), world, pos);
|
return this.getBlock().getOcclusionShape(this.asState(), world, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3242,7 +3242,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index b6cb1de08e955dfc99a0cb736b2ed456c99fde5c..abf502b8395bb0a8a32c1fdcd62532790deb1c6e 100644
|
index 3457e1c9791b294b5e4dab478d90cdd1a1cf7fef..1138d238caa18171b6562cc748c92cec03bfbb97 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder {
|
@@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder {
|
||||||
@ -3628,7 +3628,7 @@ index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 2122d7316f55ab5bec7058fe1b8ee3ceb42deea7..43790f555743e9945c1b82cf8f2f4719feedc165 100644
|
index 42a1a0588e2b506082499ac9791d039089a64631..9c1fab8db74757e1fb57d4f47099ba6e1536cd6d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -20,6 +20,12 @@ public class Main {
|
@@ -20,6 +20,12 @@ public class Main {
|
||||||
@ -4677,10 +4677,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
|
|||||||
@Override
|
@Override
|
||||||
public int getLineWidth() {
|
public int getLineWidth() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 39aad2d00227d94aa1d24c27a10d916b7d64888d..63e20db8ad84b332a4962d5cea83f1064b7c1a3d 100644
|
index 938a7ee49a727d5929d1d049c61d2881cf24ff9c..78f4bb474c85e32448a385e108707d92082bfe02 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -911,7 +911,7 @@ public class CraftEventFactory {
|
@@ -915,7 +915,7 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4689,7 +4689,7 @@ index 39aad2d00227d94aa1d24c27a10d916b7d64888d..63e20db8ad84b332a4962d5cea83f106
|
|||||||
CraftPlayer entity = victim.getBukkitEntity();
|
CraftPlayer entity = victim.getBukkitEntity();
|
||||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
|
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
|
||||||
@@ -944,7 +944,7 @@ public class CraftEventFactory {
|
@@ -948,7 +948,7 @@ public class CraftEventFactory {
|
||||||
* Server methods
|
* Server methods
|
||||||
*/
|
*/
|
||||||
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {
|
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {
|
||||||
@ -4803,10 +4803,10 @@ index c9cc23757a9fcc58d30b2915d4c5cfbc7d1c767a..fc0e1212022d1aa3506699b60ef33819
|
|||||||
return this.title;
|
return this.title;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
||||||
index 6871fbde3498f18274029638e0cd27d1a78bb1d7..5888a44d7f1f06e6308b068e57c295de366061cd 100644
|
index 07d406de7123593dc470af2723f2a9a2dc2157b0..01fbd8a55866af3e371c8a2eef23ef6e9ca3226d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
||||||
@@ -73,6 +73,13 @@ public class CraftInventoryView extends CraftAbstractInventoryView {
|
@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu> extends CraftAb
|
||||||
return CraftItemStack.asCraftMirror(this.container.getSlot(slot).getItem());
|
return CraftItemStack.asCraftMirror(this.container.getSlot(slot).getItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5165,10 +5165,10 @@ index c71a4971f127fdfc753306019313ce1a31201120..fd3b12477c30d1eabdbe57ea77902793
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index e56e6d07f297491c8f92598b8105bfebead7a0a1..86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d 100644
|
index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52baa05f0f3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -952,6 +952,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -959,6 +959,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5187,7 +5187,7 @@ index e56e6d07f297491c8f92598b8105bfebead7a0a1..86a5e4f7b2a0d50d0a58d88e10a277cf
|
|||||||
@Override
|
@Override
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
return CraftChatMessage.fromComponent(this.displayName);
|
return CraftChatMessage.fromComponent(this.displayName);
|
||||||
@@ -982,6 +994,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -989,6 +1001,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return this.itemName != null;
|
return this.itemName != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5206,7 +5206,7 @@ index e56e6d07f297491c8f92598b8105bfebead7a0a1..86a5e4f7b2a0d50d0a58d88e10a277cf
|
|||||||
@Override
|
@Override
|
||||||
public String getLocalizedName() {
|
public String getLocalizedName() {
|
||||||
return this.getDisplayName();
|
return this.getDisplayName();
|
||||||
@@ -1001,6 +1025,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1008,6 +1032,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return this.lore != null && !this.lore.isEmpty();
|
return this.lore != null && !this.lore.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -423,7 +423,7 @@ index bec1fdabbc3727c1f7297b2d23914a5179f4adcb..17df1085e29429b202a6f9003343b15b
|
|||||||
@Override
|
@Override
|
||||||
public PluginCommand getPluginCommand(String name) {
|
public PluginCommand getPluginCommand(String name) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d55d9d032 100644
|
index 9c1fab8db74757e1fb57d4f47099ba6e1536cd6d..3eecea2e6df217ccf2c432d02022c53443a37014 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
||||||
@ -434,7 +434,7 @@ index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d
|
|||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static boolean useJline = true;
|
public static boolean useJline = true;
|
||||||
@@ -207,6 +206,8 @@ public class Main {
|
@@ -196,6 +195,8 @@ public class Main {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -443,7 +443,7 @@ index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d
|
|||||||
// This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals
|
// This trick bypasses Maven Shade's clever rewriting of our getProperty call when using String literals
|
||||||
String jline_UnsupportedTerminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 'U', 'n', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
|
String jline_UnsupportedTerminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 'U', 'n', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
|
||||||
String jline_terminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
|
String jline_terminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
|
||||||
@@ -224,9 +225,18 @@ public class Main {
|
@@ -213,9 +214,18 @@ public class Main {
|
||||||
// This ensures the terminal literal will always match the jline implementation
|
// This ensures the terminal literal will always match the jline implementation
|
||||||
System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
|
System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
|
||||||
}
|
}
|
||||||
@ -462,7 +462,7 @@ index 43790f555743e9945c1b82cf8f2f4719feedc165..26dfb02286e836cad0242c71f743265d
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||||
@@ -242,6 +252,7 @@ public class Main {
|
@@ -231,6 +241,7 @@ public class Main {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
|
|||||||
debugging in an IDE pre-relocate.
|
debugging in an IDE pre-relocate.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb9d90aa92 100644
|
index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4f83c6f87 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
@@ -11,6 +11,7 @@ import java.util.Arrays;
|
@@ -11,6 +11,7 @@ import java.util.Arrays;
|
||||||
@ -27,7 +27,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb
|
|||||||
import joptsimple.OptionParser;
|
import joptsimple.OptionParser;
|
||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
import joptsimple.OptionSpec;
|
import joptsimple.OptionSpec;
|
||||||
@@ -99,6 +101,40 @@ public class Commodore {
|
@@ -100,6 +102,40 @@ public class Commodore {
|
||||||
private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
|
private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
|
||||||
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
OptionParser parser = new OptionParser();
|
OptionParser parser = new OptionParser();
|
||||||
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
|
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
|
||||||
@@ -252,9 +288,49 @@ public class Commodore {
|
@@ -253,9 +289,49 @@ public class Commodore {
|
||||||
}
|
}
|
||||||
|
|
||||||
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
|
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
|
||||||
@ -118,7 +118,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb
|
|||||||
name = FieldRename.rename(pluginVersion, owner, name);
|
name = FieldRename.rename(pluginVersion, owner, name);
|
||||||
|
|
||||||
if (modern) {
|
if (modern) {
|
||||||
@@ -374,6 +450,13 @@ public class Commodore {
|
@@ -375,6 +451,13 @@ public class Commodore {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb
|
|||||||
if (modern) {
|
if (modern) {
|
||||||
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
|
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
@@ -470,6 +553,13 @@ public class Commodore {
|
@@ -471,6 +554,13 @@ public class Commodore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visitLdcInsn(Object value) {
|
public void visitLdcInsn(Object value) {
|
||||||
@ -146,7 +146,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb
|
|||||||
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
|
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
|
||||||
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
|
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
|
||||||
return;
|
return;
|
||||||
@@ -480,6 +570,14 @@ public class Commodore {
|
@@ -481,6 +571,14 @@ public class Commodore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
|
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
|
||||||
@ -161,7 +161,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb
|
|||||||
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
|
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
|
||||||
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
|
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
|
||||||
Type samMethodType = (Type) bootstrapMethodArguments[0];
|
Type samMethodType = (Type) bootstrapMethodArguments[0];
|
||||||
@@ -496,7 +594,7 @@ public class Commodore {
|
@@ -497,7 +595,7 @@ public class Commodore {
|
||||||
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
|
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
|
||||||
methodArgs.add(newInstantiated);
|
methodArgs.add(newInstantiated);
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ index 4afaab8978d4c4d9b0e9339f1bea9a9a9963d20d..421ddf6ca955215dff77655a7eda62eb
|
|||||||
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
|
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -547,6 +645,12 @@ public class Commodore {
|
@@ -548,6 +646,12 @@ public class Commodore {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
|
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
|
||||||
|
@ -645,10 +645,10 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e
|
|||||||
return traceElements;
|
return traceElements;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
index 421ddf6ca955215dff77655a7eda62eb9d90aa92..8a1570ceb4755a1872911751943c84b8f06eb4c2 100644
|
index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
@@ -102,36 +102,26 @@ public class Commodore {
|
@@ -103,36 +103,26 @@ public class Commodore {
|
||||||
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
||||||
|
|
||||||
// Paper start - Plugin rewrites
|
// Paper start - Plugin rewrites
|
||||||
@ -696,7 +696,7 @@ index 421ddf6ca955215dff77655a7eda62eb9d90aa92..8a1570ceb4755a1872911751943c84b8
|
|||||||
}
|
}
|
||||||
// Paper end - Plugin rewrites
|
// Paper end - Plugin rewrites
|
||||||
|
|
||||||
@@ -214,6 +204,7 @@ public class Commodore {
|
@@ -215,6 +205,7 @@ public class Commodore {
|
||||||
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
|
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9 100644
|
index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a170651586722 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -969,11 +969,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -976,11 +976,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return CraftChatMessage.fromComponent(this.displayName);
|
return CraftChatMessage.fromComponent(this.displayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724d
|
|||||||
@Override
|
@Override
|
||||||
public boolean hasDisplayName() {
|
public boolean hasDisplayName() {
|
||||||
return this.displayName != null;
|
return this.displayName != null;
|
||||||
@@ -1147,6 +1159,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1154,6 +1166,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
|
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724d
|
|||||||
@Override
|
@Override
|
||||||
public void setLore(List<String> lore) {
|
public void setLore(List<String> lore) {
|
||||||
if (lore == null || lore.isEmpty()) {
|
if (lore == null || lore.isEmpty()) {
|
||||||
@@ -1161,6 +1181,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1168,6 +1188,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ index 86a5e4f7b2a0d50d0a58d88e10a277cfbd09bf9d..46e1fabf85cc0d92f79a7adf24e5724d
|
|||||||
@Override
|
@Override
|
||||||
public boolean hasCustomModelData() {
|
public boolean hasCustomModelData() {
|
||||||
return this.customModelData != null;
|
return this.customModelData != null;
|
||||||
@@ -1873,6 +1908,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1880,6 +1915,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Object object : addFrom) {
|
for (Object object : addFrom) {
|
||||||
|
@ -659,7 +659,7 @@ index acab477a4a026799319054c2eb4d0f2c99ab3d83..2a36e562967ec6174efe456e489c50ca
|
|||||||
public List<CraftPlayer> getOnlinePlayers() {
|
public List<CraftPlayer> getOnlinePlayers() {
|
||||||
return this.playerView;
|
return this.playerView;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 1c8049bbc08be77673d375205bd42a346ff951b8..1aa75b11ee3297e379baa111cf53e1cfcd8b016e 100644
|
index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec095627f311bc 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -15,6 +15,7 @@ import joptsimple.OptionSet;
|
@@ -15,6 +15,7 @@ import joptsimple.OptionSet;
|
||||||
@ -670,7 +670,7 @@ index 1c8049bbc08be77673d375205bd42a346ff951b8..1aa75b11ee3297e379baa111cf53e1cf
|
|||||||
public static boolean useJline = true;
|
public static boolean useJline = true;
|
||||||
public static boolean useConsole = true;
|
public static boolean useConsole = true;
|
||||||
|
|
||||||
@@ -252,15 +253,17 @@ public class Main {
|
@@ -241,15 +242,17 @@ public class Main {
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
System.err.println("*** Error, this build is outdated ***");
|
System.err.println("*** Error, this build is outdated ***");
|
||||||
|
@ -149,7 +149,7 @@ index 17fa2d3db112762bcb8b941b69b8ddcc53f47224..6c76aeddb34239a5acc204a17b2aa2d8
|
|||||||
|
|
||||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
|
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4f983c0f3 100644
|
index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea4ac527e0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
||||||
@ -197,7 +197,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4
|
|||||||
|
|
||||||
tag.entrySet().forEach((entry) -> {
|
tag.entrySet().forEach((entry) -> {
|
||||||
Holder<net.minecraft.world.item.enchantment.Enchantment> id = entry.getKey();
|
Holder<net.minecraft.world.item.enchantment.Enchantment> id = entry.getKey();
|
||||||
@@ -729,13 +731,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -736,13 +738,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
return modifiers;
|
return modifiers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4
|
|||||||
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
||||||
Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString());
|
Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString());
|
||||||
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
|
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
|
||||||
@@ -1072,14 +1074,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1079,14 +1081,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<Enchantment, Integer> getEnchants() {
|
public Map<Enchantment, Integer> getEnchants() {
|
||||||
@ -230,7 +230,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
|
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
|
||||||
@@ -1679,7 +1681,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -1686,7 +1688,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
clone.customModelData = this.customModelData;
|
clone.customModelData = this.customModelData;
|
||||||
clone.blockData = this.blockData;
|
clone.blockData = this.blockData;
|
||||||
if (this.enchantments != null) {
|
if (this.enchantments != null) {
|
||||||
@ -239,7 +239,7 @@ index 46e1fabf85cc0d92f79a7adf24e5724dc1dc08a9..69be26f8f47854f39cfed0559d944ef4
|
|||||||
}
|
}
|
||||||
if (this.hasAttributeModifiers()) {
|
if (this.hasAttributeModifiers()) {
|
||||||
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
||||||
@@ -2028,4 +2030,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -2036,4 +2038,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
|
||||||
return (result != null) ? result : Optional.empty();
|
return (result != null) ? result : Optional.empty();
|
||||||
}
|
}
|
||||||
|
@ -59,10 +59,10 @@ index 64db7e017b41bffcaac202ee4ecfd7df46d69331..14a821bfc6b20475889d3138b8da9e6b
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 63e20db8ad84b332a4962d5cea83f1064b7c1a3d..bb296f649afd143adad47595479532cfdd778b71 100644
|
index 78f4bb474c85e32448a385e108707d92082bfe02..b68068c783f782258f86e5ecf54664916f069e38 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1901,4 +1901,13 @@ public class CraftEventFactory {
|
@@ -1915,4 +1915,13 @@ public class CraftEventFactory {
|
||||||
|
|
||||||
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
|
Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,10 @@ index 63c10be6eacd7108b8b4795d76bf624e0614440a..243eb1e54293c763a06febff551c0513
|
|||||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null);
|
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null);
|
||||||
entitywitch.setNoAi(this.isNoAi());
|
entitywitch.setNoAi(this.isNoAi());
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index bb296f649afd143adad47595479532cfdd778b71..5cf1b15160647b6e8e42a167502643882a231c55 100644
|
index b68068c783f782258f86e5ecf54664916f069e38..44c416f812867f19a26aeefc5710a7aef9dfdf64 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1211,6 +1211,14 @@ public class CraftEventFactory {
|
@@ -1215,6 +1215,14 @@ public class CraftEventFactory {
|
||||||
return !event.isCancelled();
|
return !event.isCancelled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,10 +18,10 @@ index 56402312e44d12c859e2c4b39902d31b7cfd1573..25a45e680f9fdea90f43d59de87a3a50
|
|||||||
|
|
||||||
--this.count;
|
--this.count;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 5cf1b15160647b6e8e42a167502643882a231c55..6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb 100644
|
index 44c416f812867f19a26aeefc5710a7aef9dfdf64..a83b7f350bf20f944de92df76e112aaa49dc608d 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1164,6 +1164,17 @@ public class CraftEventFactory {
|
@@ -1168,6 +1168,17 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@ Subject: [PATCH] Add ProjectileCollideEvent
|
|||||||
Deprecated now and replaced with ProjectileHitEvent
|
Deprecated now and replaced with ProjectileHitEvent
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb..50a4e657508e21717a61900660d85203d9373e19 100644
|
index a83b7f350bf20f944de92df76e112aaa49dc608d..b5b237c56575e8ceb3e6471deec1e7712891a8e0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1308,6 +1308,17 @@ public class CraftEventFactory {
|
@@ -1321,6 +1321,16 @@ public class CraftEventFactory {
|
||||||
return CraftItemStack.asNMSCopy(bitem);
|
Bukkit.getPluginManager().callEvent(crafterCraftEvent);
|
||||||
|
return crafterCraftEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ @Deprecated
|
+ @Deprecated
|
||||||
+ public static com.destroystokyo.paper.event.entity.ProjectileCollideEvent callProjectileCollideEvent(Entity entity, EntityHitResult position) {
|
+ public static com.destroystokyo.paper.event.entity.ProjectileCollideEvent callProjectileCollideEvent(Entity entity, EntityHitResult position) {
|
||||||
@ -23,11 +23,10 @@ index 6ffc5b9eb2fa084c7cf397d944e6fc1d8d770dbb..50a4e657508e21717a61900660d85203
|
|||||||
+ return event;
|
+ return event;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
|
||||||
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
|
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
|
||||||
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
|
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
|
||||||
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
|
@@ -1346,8 +1356,15 @@ public class CraftEventFactory {
|
||||||
@@ -1332,8 +1343,15 @@ public class CraftEventFactory {
|
|
||||||
if (position.getType() == HitResult.Type.ENTITY) {
|
if (position.getType() == HitResult.Type.ENTITY) {
|
||||||
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
|
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,10 @@ index 8f1992188f7fd9e735569e099b36a7eafed47aae..061c89b985dafc79c808dd5f0e296b9f
|
|||||||
Bootstrap.isBootstrapped = true;
|
Bootstrap.isBootstrapped = true;
|
||||||
Instant instant = Instant.now();
|
Instant instant = Instant.now();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index fcc7cdd0adfcaa135d08ea36746dca980590d6eb..4c8d98598b5cdcdbe4a778f1ec142e3a7ab33196 100644
|
index 837db57c19df3d5c986a52edf3d9d8105cc87cde..446403f73fb1b5687d587889e6f32dce464d05a6 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -260,10 +260,12 @@ public class Main {
|
@@ -249,10 +249,12 @@ public class Main {
|
||||||
Calendar deadline = Calendar.getInstance();
|
Calendar deadline = Calendar.getInstance();
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
|
@ -13,7 +13,7 @@ starting point for future additions in this area.
|
|||||||
Fixes GH-559
|
Fixes GH-559
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
|
||||||
index 85aab880fdb2f23d09096f8f2b1ede4f068fa023..4ae9930c2d74e5b1e3ad0c2ecf6556dc59cbf23c 100644
|
index eef3517833ff5c0cf41b89973ebc972b8ed31e0f..c9fbc01be0b0e7fd1cafb091d06496f4ba1e7c2c 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -22,8 +22,8 @@ index 85aab880fdb2f23d09096f8f2b1ede4f068fa023..4ae9930c2d74e5b1e3ad0c2ecf6556dc
|
|||||||
+import com.destroystokyo.paper.inventory.meta.ArmorStandMeta;
|
+import com.destroystokyo.paper.inventory.meta.ArmorStandMeta;
|
||||||
import java.util.function.BiFunction;
|
import java.util.function.BiFunction;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.BannerItem;
|
||||||
@@ -95,7 +96,7 @@ public final class CraftItemMetas {
|
@@ -102,7 +103,7 @@ public final class CraftItemMetas {
|
||||||
item -> new CraftMetaSpawnEgg(item.getComponentsPatch()),
|
item -> new CraftMetaSpawnEgg(item.getComponentsPatch()),
|
||||||
(type, meta) -> meta instanceof CraftMetaSpawnEgg spawnEgg ? spawnEgg : new CraftMetaSpawnEgg(meta));
|
(type, meta) -> meta instanceof CraftMetaSpawnEgg spawnEgg ? spawnEgg : new CraftMetaSpawnEgg(meta));
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..59bdac414e8205ed608f79ef0d1502ac
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||||
index 99a555ca72cd95d760d68072242203deeddd0ce1..a1d8da4e0de3f84194f28d7d18fa795d53714590 100644
|
index b46032190dbb0d47ee3c1a11959f6278ddf5eb5a..0715f43f3f8235d28a12b9d49d78c765a946c53f 100644
|
||||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||||
@@ -364,6 +364,7 @@ public class ItemMetaTest extends AbstractTestingBase {
|
@@ -364,6 +364,7 @@ public class ItemMetaTest extends AbstractTestingBase {
|
||||||
|
@ -220,10 +220,10 @@ index 4602c3d0be94f0146a2b205268f70aaf85410f20..422c25577a0d95b31b5528fad8fc9b3a
|
|||||||
public void onEntityRemove(Entity entity) {
|
public void onEntityRemove(Entity entity) {
|
||||||
this.invertedVisibilityEntities.remove(entity.getUUID());
|
this.invertedVisibilityEntities.remove(entity.getUUID());
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
index 8a1570ceb4755a1872911751943c84b8f06eb4c2..38339b8b1b3b70bbbf0259d7095b02ee8c22b609 100644
|
index 65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f..e1b86308f737b957b6d00bc902b91856694b7cbf 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||||
@@ -448,6 +448,13 @@ public class Commodore {
|
@@ -449,6 +449,13 @@ public class Commodore {
|
||||||
}
|
}
|
||||||
// Paper end - Rewrite plugins
|
// Paper end - Rewrite plugins
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@ index a14e00d55930628333cc63b18727ea56dbdc4ee3..f6d01d21745391595d61b191832be4c2
|
|||||||
this.setUsingItem(true);
|
this.setUsingItem(true);
|
||||||
if (!this.isSilent()) {
|
if (!this.isSilent()) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 50a4e657508e21717a61900660d85203d9373e19..1c53b872b30bcd8535b8686015935025a4c9837f 100644
|
index b5b237c56575e8ceb3e6471deec1e7712891a8e0..cfdabb93c2d30845af9108552ed9bee9929250ce 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1947,4 +1947,14 @@ public class CraftEventFactory {
|
@@ -1960,4 +1960,14 @@ public class CraftEventFactory {
|
||||||
).callEvent();
|
).callEvent();
|
||||||
}
|
}
|
||||||
// Paper end - PlayerUseUnknownEntityEvent
|
// Paper end - PlayerUseUnknownEntityEvent
|
||||||
|
@ -273,10 +273,10 @@ index 6476c644d3da824c5ee4190cb45cde678ff1188f..a5f4ecb96c508b94a92a43c864c075f6
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
entity.setDeltaMovement(entity.getDeltaMovement().add(vec3d1));
|
entity.setDeltaMovement(entity.getDeltaMovement().add(vec3d1));
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 1c53b872b30bcd8535b8686015935025a4c9837f..0888692736ef62e741aa41d3a72b9b8c3075dfcd 100644
|
index cfdabb93c2d30845af9108552ed9bee9929250ce..e1b7bd5c23ba79b84ad257b7fb45e251da3978e5 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1909,19 +1909,33 @@ public class CraftEventFactory {
|
@@ -1922,19 +1922,33 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ index 72edfb965aca81c2d2442b794b42baa04ec713b3..a954d3b0ff0917d857002dba70c54b3f
|
|||||||
this.player.doCloseContainer();
|
this.player.doCloseContainer();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 9019e25f61d4fdb7c5d12ea7630b0bc23827ab6e..38cf3cf1cc7ebae4b6ca8a89dc026b5b4f0b4c2b 100644
|
index 26cee48ea3650aaf87fd2ba9c70d4ca9a88e2d87..25dee4848c8b2cff74075c6d26d384e71f706627 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -510,7 +510,7 @@ public abstract class PlayerList {
|
@@ -510,7 +510,7 @@ public abstract class PlayerList {
|
||||||
@ -178,10 +178,10 @@ index 326f36726c124385145c469566c2089439b5dd0f..0b4c5a2604f61a34b5666a9a83a2e644
|
|||||||
|
|
||||||
// Check if the fromWorld and toWorld are the same.
|
// Check if the fromWorld and toWorld are the same.
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 0888692736ef62e741aa41d3a72b9b8c3075dfcd..7fa68654c2e0c87dd779a1354fc103be4d7d7a46 100644
|
index e1b7bd5c23ba79b84ad257b7fb45e251da3978e5..ad271871b207b425ef8d599fe74a67d065d66686 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1277,7 +1277,7 @@ public class CraftEventFactory {
|
@@ -1281,7 +1281,7 @@ public class CraftEventFactory {
|
||||||
|
|
||||||
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
|
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
|
||||||
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
|
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
|
||||||
@ -190,7 +190,7 @@ index 0888692736ef62e741aa41d3a72b9b8c3075dfcd..7fa68654c2e0c87dd779a1354fc103be
|
|||||||
}
|
}
|
||||||
|
|
||||||
CraftServer server = player.level().getCraftServer();
|
CraftServer server = player.level().getCraftServer();
|
||||||
@@ -1464,8 +1464,18 @@ public class CraftEventFactory {
|
@@ -1477,8 +1477,18 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,10 +89,10 @@ index a9227581ec78a56e96dc3a342006e4a649906326..5929b450a26e7c3cf63de3dc1d0e67cb
|
|||||||
public boolean isClientSide() {
|
public boolean isClientSide() {
|
||||||
return this.isClientSide;
|
return this.isClientSide;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 7fa68654c2e0c87dd779a1354fc103be4d7d7a46..a221ae7ec1a7db9c38037fa71ea35b5309b99973 100644
|
index ad271871b207b425ef8d599fe74a67d065d66686..d1b473ef83df0ed4ae7cd9dd0525dac5e8a41223 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1314,6 +1314,14 @@ public class CraftEventFactory {
|
@@ -1327,6 +1327,14 @@ public class CraftEventFactory {
|
||||||
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
Projectile projectile = (Projectile) entity.getBukkitEntity();
|
||||||
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
|
org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity();
|
||||||
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
|
||||||
|
@ -7,10 +7,10 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
|
|||||||
and cloning it when one is needed.
|
and cloning it when one is needed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
index 4ac248f9f5f4f7aa95ddd6e3c3dab1ce94e73d66..d02f7a547dbe8943f82c07103b1fff203e4533c2 100644
|
index 59fcaca90b67c03e1a6799e58061dbae3b1f1ceb..46dd499c2023ec482ae7204d2894fb4100d9233b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||||
@@ -813,6 +813,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
@@ -820,6 +820,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||||
this.instrument = blockbase_info.instrument;
|
this.instrument = blockbase_info.instrument;
|
||||||
this.replaceable = blockbase_info.replaceable;
|
this.replaceable = blockbase_info.replaceable;
|
||||||
}
|
}
|
||||||
|
@ -443,10 +443,10 @@ index 92f9502a2d5721ebb1757a069a0f138db66628d7..6c5bd88777ff79c7408cf5ffed0f099a
|
|||||||
|
|
||||||
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index a221ae7ec1a7db9c38037fa71ea35b5309b99973..d3baf38cf45d13eeffedcc697468842e3ac117d3 100644
|
index d1b473ef83df0ed4ae7cd9dd0525dac5e8a41223..a9a2b35378d6654ba00a48737f596553445214aa 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -897,9 +897,16 @@ public class CraftEventFactory {
|
@@ -901,9 +901,16 @@ public class CraftEventFactory {
|
||||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||||
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
|
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
|
||||||
@ -463,7 +463,7 @@ index a221ae7ec1a7db9c38037fa71ea35b5309b99973..d3baf38cf45d13eeffedcc697468842e
|
|||||||
victim.expToDrop = event.getDroppedExp();
|
victim.expToDrop = event.getDroppedExp();
|
||||||
|
|
||||||
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
||||||
@@ -917,7 +924,14 @@ public class CraftEventFactory {
|
@@ -921,7 +928,14 @@ public class CraftEventFactory {
|
||||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
|
PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
|
||||||
event.setKeepInventory(keepInventory);
|
event.setKeepInventory(keepInventory);
|
||||||
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
|
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
|
||||||
@ -478,7 +478,7 @@ index a221ae7ec1a7db9c38037fa71ea35b5309b99973..d3baf38cf45d13eeffedcc697468842e
|
|||||||
|
|
||||||
victim.keepLevel = event.getKeepLevel();
|
victim.keepLevel = event.getKeepLevel();
|
||||||
victim.newLevel = event.getNewLevel();
|
victim.newLevel = event.getNewLevel();
|
||||||
@@ -940,6 +954,31 @@ public class CraftEventFactory {
|
@@ -944,6 +958,31 @@ public class CraftEventFactory {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,42 +6,31 @@ Subject: [PATCH] Improve java version check
|
|||||||
Co-Authored-By: MiniDigger <admin@benndorf.dev>
|
Co-Authored-By: MiniDigger <admin@benndorf.dev>
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 8245b38d37b4cee6f4e7b61d7af40a18e54a3f43..e226eda5efc0e45e59cb5f6251ed008b67d5299a 100644
|
index 446403f73fb1b5687d587889e6f32dce464d05a6..ed167d0d399924d54d9ff99c10ab8ee093efc149 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -203,23 +203,27 @@ public class Main {
|
@@ -203,11 +203,20 @@ public class Main {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Improve java version check
|
- float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
|
||||||
+ boolean skip = Boolean.getBoolean("Paper.IgnoreJavaVersion");
|
|
||||||
float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
|
|
||||||
- if (javaVersion < 61.0) {
|
|
||||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'.");
|
|
||||||
- return;
|
|
||||||
- }
|
|
||||||
- if (javaVersion > 66.0) {
|
- if (javaVersion > 66.0) {
|
||||||
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported.");
|
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported.");
|
||||||
+ boolean isOldVersion = javaVersion < 61.0;
|
- return;
|
||||||
+ if (!skip && isOldVersion) {
|
+ // Paper start - Improve java version check
|
||||||
+ System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 21. Check your Java version with the command 'java -version'. For more info see https://docs.papermc.io/misc/java-install");
|
+ boolean skip = Boolean.getBoolean("Paper.IgnoreJavaVersion");
|
||||||
return;
|
+ String javaVersionName = System.getProperty("java.version");
|
||||||
}
|
+ // J2SE SDK/JRE Version String Naming Convention
|
||||||
String javaVersionName = System.getProperty("java.version");
|
+ boolean isPreRelease = javaVersionName.contains("-");
|
||||||
// J2SE SDK/JRE Version String Naming Convention
|
+ if (isPreRelease) {
|
||||||
boolean isPreRelease = javaVersionName.contains("-");
|
+ if (!skip) {
|
||||||
- if (isPreRelease && javaVersion == 61.0) {
|
+ System.err.println("Unsupported Java detected (" + javaVersionName + "). You are running an unsupported, non official, version. Only general availability versions of Java are supported. Please update your Java version. See https://docs.papermc.io/paper/faq#unsupported-java-detected-what-do-i-do for more information.");
|
||||||
- System.err.println("Unsupported Java detected (" + javaVersionName + "). You are running an outdated, pre-release version. Only general availability versions of Java are supported. Please update your Java version.");
|
+ return;
|
||||||
+ if (!skip && isPreRelease) {
|
+ }
|
||||||
+ System.err.println("Unsupported Java detected (" + javaVersionName + "). You are running an unsupported, non official, version. Only general availability versions of Java are supported. Please update your Java version. See https://docs.papermc.io/paper/faq#unsupported-java-detected-what-do-i-do for more information.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (skip && (isOldVersion || isPreRelease)) {
|
|
||||||
+ System.err.println("Unsupported Java detected ("+ javaVersionName + "), but the check was skipped. Proceed with caution! ");
|
|
||||||
+ }
|
|
||||||
+ // Paper end - Improve java version check
|
|
||||||
+
|
+
|
||||||
|
+ System.err.println("Unsupported Java detected ("+ javaVersionName + "), but the check was skipped. Proceed with caution! ");
|
||||||
|
}
|
||||||
|
+ // Paper end - Improve java version check
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Paper start - Handled by TerminalConsoleAppender
|
// Paper start - Handled by TerminalConsoleAppender
|
||||||
/*
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index d3baf38cf45d13eeffedcc697468842e3ac117d3..3ba695a29dcf9e7137dae16835e6f7a375d560f7 100644
|
index a9a2b35378d6654ba00a48737f596553445214aa..7d21f3ec394b53461ca5fb73449b551fbe6e96aa 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -406,13 +406,18 @@ public class CraftEventFactory {
|
@@ -410,13 +410,18 @@ public class CraftEventFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
org.bukkit.inventory.ItemStack item;
|
org.bukkit.inventory.ItemStack item;
|
||||||
|
@ -124,10 +124,10 @@ index 92bb0c63330ad3a4cb13b2dc655020714e9b1ffd..cc1189c2d7dc57ba8f29aad4ba5d2a07
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 3ba695a29dcf9e7137dae16835e6f7a375d560f7..e0cbef395c479da40dc7079835f0eae1ee122da1 100644
|
index 7d21f3ec394b53461ca5fb73449b551fbe6e96aa..408f677337759f529fa41f6ba2b516b71a7940f1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -899,6 +899,11 @@ public class CraftEventFactory {
|
@@ -903,6 +903,11 @@ public class CraftEventFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) {
|
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) {
|
||||||
@ -139,7 +139,7 @@ index 3ba695a29dcf9e7137dae16835e6f7a375d560f7..e0cbef395c479da40dc7079835f0eae1
|
|||||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||||
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
|
||||||
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
|
EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
|
||||||
@@ -913,11 +918,13 @@ public class CraftEventFactory {
|
@@ -917,11 +922,13 @@ public class CraftEventFactory {
|
||||||
playDeathSound(victim, event);
|
playDeathSound(victim, event);
|
||||||
// Paper end
|
// Paper end
|
||||||
victim.expToDrop = event.getDroppedExp();
|
victim.expToDrop = event.getDroppedExp();
|
||||||
|
@ -77,10 +77,10 @@ index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c3670
|
|||||||
public java.util.UUID getTriggerEntityId() {
|
public java.util.UUID getTriggerEntityId() {
|
||||||
return getHandle().triggerEntityId;
|
return getHandle().triggerEntityId;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index e0cbef395c479da40dc7079835f0eae1ee122da1..ec364ab90df6276c1976e876337636f4bb06d097 100644
|
index 408f677337759f529fa41f6ba2b516b71a7940f1..1177a9310f686f3b4d75a713cdac75c5628e8bbb 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -708,15 +708,29 @@ public class CraftEventFactory {
|
@@ -712,15 +712,29 @@ public class CraftEventFactory {
|
||||||
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
|
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
|
||||||
double radius = world.spigotConfig.expMerge;
|
double radius = world.spigotConfig.expMerge;
|
||||||
if (radius > 0) {
|
if (radius > 0) {
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockStateMeta#clearBlockState
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
||||||
index 80ace77a9b11d63a1b2271c868c59711f5d2f89d..4faada5f974214f3054dc1bec9c79e2600c8df48 100644
|
index 301d883a7626e3abd222517400367fc40d6fa2bd..23dbc56edf0d16cf07ced2899942abae28397694 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
|
||||||
@@ -195,6 +195,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
@@ -198,6 +198,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
|
||||||
return this.blockEntityTag != null;
|
return this.blockEntityTag != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,3 +22,21 @@ index 80ace77a9b11d63a1b2271c868c59711f5d2f89d..4faada5f974214f3054dc1bec9c79e26
|
|||||||
@Override
|
@Override
|
||||||
public BlockState getBlockState() {
|
public BlockState getBlockState() {
|
||||||
return (this.blockEntityTag != null) ? this.blockEntityTag.copy() : CraftMetaBlockState.getBlockState(this.material, null);
|
return (this.blockEntityTag != null) ? this.blockEntityTag.copy() : CraftMetaBlockState.getBlockState(this.material, null);
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java
|
||||||
|
index 3542c6e72f5ff459d50b73fa210ea835f52dfa49..c8eec04685456d89cb41466cddcc3975d0ceeb29 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java
|
||||||
|
@@ -257,6 +257,13 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
|
||||||
|
this.banner = (Banner) blockState;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ // Paper start - add method to clear block state
|
||||||
|
+ @Override
|
||||||
|
+ public void clearBlockState() {
|
||||||
|
+ this.banner = null;
|
||||||
|
+ }
|
||||||
|
+ // Paper end - add method to clear block state
|
||||||
|
+
|
||||||
|
private static Banner getBlockState(DyeColor color) {
|
||||||
|
BlockPos pos = BlockPos.ZERO;
|
||||||
|
Material stateMaterial = CraftMetaShield.shieldToBannerHack(color);
|
||||||
|
@ -30,10 +30,10 @@ index de40e522960469b98f987bd688489740446d9f85..5678d2007d5adf45dec0638c5dd848b6
|
|||||||
public CraftAttributeMap(AttributeMap handle) {
|
public CraftAttributeMap(AttributeMap handle) {
|
||||||
this.handle = handle;
|
this.handle = handle;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
index 69be26f8f47854f39cfed0559d944ef4f983c0f3..0b87cfbdf039ee5bc017d2b1783c7c4853047952 100644
|
index 97c40582bca095532fff9a81515f38ea4ac527e0..5c76ba7f9ceb285d27e18369172612205be96224 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||||
@@ -695,7 +695,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -702,7 +702,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
|
||||||
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
|
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Adds a new event for all crafting stations that generate a result slot item
|
|||||||
Anvil, Grindstone and Smithing now extend this event
|
Anvil, Grindstone and Smithing now extend this event
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||||
index c6ec9fc6ccde2a5c086a2bfe32686954c074c31d..7198dc9ffc9a37dab3654e12aa497c442a9993c5 100644
|
index ffda2c984c5683edb38a56f04c53b0ea339e08fc..d685511104ac552dfc9ae2111e1bfb60fa812102 100644
|
||||||
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
--- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||||
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
+++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java
|
||||||
@@ -327,6 +327,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
@@ -327,6 +327,7 @@ public class AnvilMenu extends ItemCombinerMenu {
|
||||||
@ -56,7 +56,7 @@ index 62432c347b86fc79ab529a7dde66bef32d0424dd..be840717e180b6b5abd14db6cc926334
|
|||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||||
index fb7027985c6442fc50573e96031a05a3c64f4426..4bd720a97da27c4fd97788d4c504c0174f0f6c25 100644
|
index 69ed0753c224cb7746762b4b94c4d79d608951b8..2de558dd205a1078fdcac1bce256d059b9bf5d5f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
--- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||||
+++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
+++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java
|
||||||
@@ -249,7 +249,8 @@ public class LoomMenu extends AbstractContainerMenu {
|
@@ -249,7 +249,8 @@ public class LoomMenu extends AbstractContainerMenu {
|
||||||
@ -82,7 +82,7 @@ index 0735705def4f9505b7f16df2497cc78bbf5a8373..86e51fcce767d265ee0d3beb611be211
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||||
index 04d9793a83c724350f74616558f650082f9805d9..bb29107cb15e2ec644a14cabb3cf91f4bde5471d 100644
|
index 30ea1f9e97db86a2ad7baeea4f5a76c821874daa..5b4f03128499b0c1a4b8c5f5ccd17e4bdb391e81 100644
|
||||||
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||||
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
|
||||||
@@ -182,6 +182,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
@@ -182,6 +182,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
|
||||||
@ -94,13 +94,13 @@ index 04d9793a83c724350f74616558f650082f9805d9..bb29107cb15e2ec644a14cabb3cf91f4
|
|||||||
|
|
||||||
private static SingleRecipeInput createRecipeInput(Container inventory) {
|
private static SingleRecipeInput createRecipeInput(Container inventory) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb0987222e4894a5 100644
|
index 1177a9310f686f3b4d75a713cdac75c5628e8bbb..838ad7bc8a7488adf52d462e1a3f2faa275bebd0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -1666,6 +1666,12 @@ public class CraftEventFactory {
|
@@ -1679,6 +1679,12 @@ public class CraftEventFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PrepareAnvilEvent callPrepareAnvilEvent(InventoryView view, ItemStack item) {
|
public static PrepareAnvilEvent callPrepareAnvilEvent(AnvilView view, ItemStack item) {
|
||||||
+ // Paper start - Add PrepareResultEvent
|
+ // Paper start - Add PrepareResultEvent
|
||||||
+ if (true) {
|
+ if (true) {
|
||||||
+ view.getTopInventory().setItem(net.minecraft.world.inventory.AnvilMenu.RESULT_SLOT, CraftItemStack.asCraftMirror(item));
|
+ view.getTopInventory().setItem(net.minecraft.world.inventory.AnvilMenu.RESULT_SLOT, CraftItemStack.asCraftMirror(item));
|
||||||
@ -110,7 +110,7 @@ index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb098722
|
|||||||
PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone());
|
PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone());
|
||||||
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
|
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
|
||||||
event.getInventory().setItem(2, event.getResult());
|
event.getInventory().setItem(2, event.getResult());
|
||||||
@@ -1673,6 +1679,12 @@ public class CraftEventFactory {
|
@@ -1686,6 +1692,12 @@ public class CraftEventFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) {
|
public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) {
|
||||||
@ -123,7 +123,7 @@ index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb098722
|
|||||||
PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone());
|
PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone());
|
||||||
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
|
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
|
||||||
event.getInventory().setItem(2, event.getResult());
|
event.getInventory().setItem(2, event.getResult());
|
||||||
@@ -1680,12 +1692,39 @@ public class CraftEventFactory {
|
@@ -1693,12 +1705,39 @@ public class CraftEventFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) {
|
public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) {
|
||||||
@ -145,8 +145,8 @@ index ec364ab90df6276c1976e876337636f4bb06d097..3159e52006ad348bfce4905dcb098722
|
|||||||
+ InventoryView view = container.getBukkitView();
|
+ InventoryView view = container.getBukkitView();
|
||||||
+ org.bukkit.inventory.ItemStack origItem = view.getTopInventory().getItem(resultSlot);
|
+ org.bukkit.inventory.ItemStack origItem = view.getTopInventory().getItem(resultSlot);
|
||||||
+ CraftItemStack result = origItem != null ? CraftItemStack.asCraftCopy(origItem) : null;
|
+ CraftItemStack result = origItem != null ? CraftItemStack.asCraftCopy(origItem) : null;
|
||||||
+ if (view.getTopInventory() instanceof org.bukkit.inventory.AnvilInventory) {
|
+ if (view.getTopInventory() instanceof org.bukkit.inventory.AnvilInventory && view instanceof AnvilView anvilView) {
|
||||||
+ event = new PrepareAnvilEvent(view, result);
|
+ event = new PrepareAnvilEvent(anvilView, result);
|
||||||
+ } else if (view.getTopInventory() instanceof org.bukkit.inventory.GrindstoneInventory) {
|
+ } else if (view.getTopInventory() instanceof org.bukkit.inventory.GrindstoneInventory) {
|
||||||
+ event = new PrepareGrindstoneEvent(view, result);
|
+ event = new PrepareGrindstoneEvent(view, result);
|
||||||
+ } else if (view.getTopInventory() instanceof org.bukkit.inventory.SmithingInventory) {
|
+ } else if (view.getTopInventory() instanceof org.bukkit.inventory.SmithingInventory) {
|
||||||
|
@ -7,10 +7,10 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a
|
|||||||
village bell. Passes along the bell block and the player who rang it.
|
village bell. Passes along the bell block and the player who rang it.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
index 3159e52006ad348bfce4905dcb0987222e4894a5..c803948c713fa898430f478dddfb2a75f6d355ef 100644
|
index a3e359d174e4c175e49a6e7c03cbca0661cf8b34..2596159784a6ae0502b9a1b5a7cc573966021380 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||||
@@ -372,10 +372,11 @@ public class CraftEventFactory {
|
@@ -376,10 +376,11 @@ public class CraftEventFactory {
|
||||||
return tradeSelectEvent;
|
return tradeSelectEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,119 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
||||||
Date: Fri, 21 Aug 2020 20:57:54 +0200
|
|
||||||
Subject: [PATCH] PortalCreateEvent needs to know its entity
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
||||||
index cc8825acea0d84b36194313656a6f70d8c049072..7f7445a2b68fd2e6e5fcd509d950a0f8d680c1fe 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
||||||
@@ -522,7 +522,7 @@ public final class ItemStack implements DataComponentHolder {
|
|
||||||
net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition);
|
|
||||||
|
|
||||||
if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
|
|
||||||
- block.onPlace(world, newblockposition, oldBlock, true);
|
|
||||||
+ block.onPlace(world, newblockposition, oldBlock, true, context); // Paper - pass context
|
|
||||||
}
|
|
||||||
|
|
||||||
world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
|
|
||||||
index e499a5eb843af3e2417bcb31add3c63443c0deff..993538f613e52ecd009f01e7b68fddba76b6a3e8 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
|
|
||||||
@@ -144,12 +144,19 @@ public abstract class BaseFireBlock extends Block {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
|
||||||
+ // Paper start - UseOnContext param
|
|
||||||
+ this.onPlace(state, world, pos, oldState, notify, null);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, @javax.annotation.Nullable net.minecraft.world.item.context.UseOnContext context) {
|
|
||||||
+ // Paper end - UseOnContext param
|
|
||||||
if (!oldState.is(state.getBlock())) {
|
|
||||||
if (BaseFireBlock.inPortalDimension(world)) {
|
|
||||||
Optional<PortalShape> optional = PortalShape.findEmptyPortalShape(world, pos, Direction.Axis.X);
|
|
||||||
|
|
||||||
if (optional.isPresent()) {
|
|
||||||
- ((PortalShape) optional.get()).createPortalBlocks();
|
|
||||||
+ ((PortalShape) optional.get()).createPortalBlocks(context); // Paper - pass context param
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
|
||||||
index ceaa2a7048afc4955d3695af5291e83a79d83c5d..5dad1aa26a8908cba6a08398a4bad27f31d4c2c0 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
|
||||||
@@ -368,8 +368,10 @@ public class FireBlock extends BaseFireBlock {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
- protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
|
||||||
- super.onPlace(state, world, pos, oldState, notify);
|
|
||||||
+ // Paper start - UseOnContext param
|
|
||||||
+ protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) {
|
|
||||||
+ super.onPlace(state, world, pos, oldState, notify, context);
|
|
||||||
+ // Paper end - UseOnContext param
|
|
||||||
world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random));
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
|
||||||
index 34f03184f018d00be7c5884f29f98a9ebe461475..6fe078fdf619c4df664f1dce6a0f5d202c21b35e 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
|
||||||
@@ -154,6 +154,12 @@ public abstract class BlockBehaviour implements FeatureElement {
|
|
||||||
DebugPackets.sendNeighborsUpdatePacket(world, pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // Paper start - UseOnContext param
|
|
||||||
+ protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) {
|
|
||||||
+ this.onPlace(state, world, pos, oldState, notify);
|
|
||||||
+ }
|
|
||||||
+ // Paper end - UseOnContext param
|
|
||||||
+
|
|
||||||
protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
|
||||||
org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot
|
|
||||||
}
|
|
||||||
@@ -1080,6 +1086,12 @@ public abstract class BlockBehaviour implements FeatureElement {
|
|
||||||
this.getBlock().updateIndirectNeighbourShapes(this.asState(), world, pos, flags, maxUpdateDepth);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ // Paper start
|
|
||||||
+ public void onPlace(Level world, BlockPos pos, BlockState state, boolean notify, net.minecraft.world.item.context.UseOnContext context) {
|
|
||||||
+ this.getBlock().onPlace(this.asState(), world, pos, state, notify, context);
|
|
||||||
+ }
|
|
||||||
+ // Paper end
|
|
||||||
+
|
|
||||||
public void onPlace(Level world, BlockPos pos, BlockState state, boolean notify) {
|
|
||||||
this.getBlock().onPlace(this.asState(), world, pos, state, notify);
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
|
||||||
index bb22b12b05de29bed00e433630c91f233fa9a366..57139a0b8adcd1ea25cd100be78402681856ee75 100644
|
|
||||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
|
||||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
|
||||||
@@ -189,7 +189,14 @@ public class PortalShape {
|
|
||||||
}
|
|
||||||
|
|
||||||
// CraftBukkit start - return boolean
|
|
||||||
+ @io.papermc.paper.annotation.DoNotUse @Deprecated // Paper
|
|
||||||
public boolean createPortalBlocks() {
|
|
||||||
+ // Paper start - UseOnContext param
|
|
||||||
+ return this.createPortalBlocks(null);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public boolean createPortalBlocks(@Nullable net.minecraft.world.item.context.UseOnContext useOnContext) {
|
|
||||||
+ // Paper end - UseOnContext param
|
|
||||||
org.bukkit.World bworld = this.level.getMinecraftWorld().getWorld();
|
|
||||||
|
|
||||||
// Copy below for loop
|
|
||||||
@@ -199,7 +206,7 @@ public class PortalShape {
|
|
||||||
this.blocks.setBlock(blockposition, iblockdata, 18);
|
|
||||||
});
|
|
||||||
|
|
||||||
- PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) this.blocks.getList(), bworld, null, PortalCreateEvent.CreateReason.FIRE);
|
|
||||||
+ PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blocks.getList(), bworld, useOnContext == null || useOnContext.getPlayer() == null ? null : useOnContext.getPlayer().getBukkitEntity(), PortalCreateEvent.CreateReason.FIRE); // Paper - pass entity param
|
|
||||||
this.level.getMinecraftWorld().getServer().server.getPluginManager().callEvent(event);
|
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
|
@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling
|
|||||||
cases where a captured entry is overriden) - but for now this will do.
|
cases where a captured entry is overriden) - but for now this will do.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 5a3a89c568d42a2adbc2b6e2631fd4b70e54f0bf..cfd5d3e50197b38d0ffef6debbb7f5b4b208382a 100644
|
index 60b04a16c6cb0a7109bda5c16e23c1d56ab7afad..144d243e0d6ba3ae3f0b0bf457fa516e2b4f416f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@ -15,7 +15,7 @@ manually reload the advancement data for all players, which
|
|||||||
normally takes place as a part of the datapack reloading.
|
normally takes place as a part of the datapack reloading.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 22fc5bf2024f70f85cc278ddd374bff0a6d626fa..12c4f68623119427a30c1eec28b4aff0400aa8c0 100644
|
index 2979277847635c0bef54d06be30e5051557cc5e9..5fe9b94c342a91d6fb3bc582ac7e84cb25b90a9e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -317,7 +317,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -317,7 +317,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -52,7 +52,7 @@ index a3c67bdc2c08b3550534f37d15b0db90b479e34f..24bf661e76fb421a8be565d9ea68edf7
|
|||||||
this.connection.disconnect(disconnectiondetails);
|
this.connection.disconnect(disconnectiondetails);
|
||||||
}));
|
}));
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 51426da5f3e7b9f8631880a04cef0a58b00233df..ec080eb8e3930b6c5cc08c3061535b379a99a7d1 100644
|
index c322d8284b4d17d6b9a949d85849892d7c88817e..f11309e0a067546aa5b14272156087664dbdd021 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -570,7 +570,7 @@ public abstract class PlayerList {
|
@@ -570,7 +570,7 @@ public abstract class PlayerList {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 99799563942693ae36188092d76054fdff97d4ca..766242aa6930b37630be77e421b4b5675c5feb0d 100644
|
index 1292e7b9889777448b728ef3bb3ae4cb25d42d61..a3b1a19fb28dfba93ae04ea0859f744ede1579f6 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -2707,7 +2707,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -2707,7 +2707,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren