Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
275173e538
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: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
45 Zeilen
2.4 KiB
Diff
45 Zeilen
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
Date: Sun, 26 Mar 2023 18:07:56 -0700
|
|
Subject: [PATCH] Fix beehives generating from using bonemeal
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
index 90ed64613717e104fc31d7e8d5df964c92119052..50141d426dc93149dc48d876487649aab7e74380 100644
|
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
|
@@ -392,6 +392,7 @@ public final class ItemStack {
|
|
}
|
|
for (CraftBlockState blockstate : blocks) {
|
|
world.setBlock(blockstate.getPosition(),blockstate.getHandle(), blockstate.getFlag()); // SPIGOT-7248 - manual update to avoid physics where appropriate
|
|
+ if (blockstate instanceof org.bukkit.craftbukkit.block.CapturedBlockState capturedBlockState) capturedBlockState.checkTreeBlockHack(); // Paper
|
|
}
|
|
entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
|
|
index fb6454cc64ebc549f61ad7d51efb16ef15f8384d..a3d5e319473e2f6316b3ef8edf719296e02d85a1 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
|
|
@@ -25,6 +25,12 @@ public final class CapturedBlockState extends CraftBlockState {
|
|
public boolean update(boolean force, boolean applyPhysics) {
|
|
boolean result = super.update(force, applyPhysics);
|
|
|
|
+ // Paper start
|
|
+ this.checkTreeBlockHack();
|
|
+ return result;
|
|
+ }
|
|
+ public void checkTreeBlockHack() {
|
|
+ // Paper end
|
|
// SPIGOT-5537: Horrible hack to manually add bees given World.captureTreeGeneration does not support tiles
|
|
if (this.treeBlock && getType() == Material.BEE_NEST) {
|
|
WorldGenLevel generatoraccessseed = this.world.getHandle();
|
|
@@ -47,7 +53,7 @@ public final class CapturedBlockState extends CraftBlockState {
|
|
// End copied block
|
|
}
|
|
|
|
- return result;
|
|
+ // Paper
|
|
}
|
|
|
|
public static CapturedBlockState getBlockState(Level world, BlockPos pos, int flag) {
|