Updated Upstream (Bukkit/CraftBukkit/Spigot)

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:
9590b610 SPIGOT-6749: Library Loader does not correctly isolate dependencies

CraftBukkit Changes:
11c9299f #940: Fixed a NPE during CraftBlockEntityState#update.
960f3109 #937: Fixes related to unplaced BlockStates and the recent world generation changes.
4faf479e SPIGOT-6754: We ignore any still present TileEntity now when we create a BlockState for a block of type AIR.
a72d5404 SPIGOT-6754: Temporarily restore previous behaviour for tile entities with removed blocks

Spigot Changes:
dc75aca8 Remove redundant 'Log null TileEntity Owner' patch
This commit is contained in:
Shane Freeder 2021-10-15 12:43:19 +01:00
parent 8575248648
commit 4276013833
No known key found for this signature in database
GPG key ID: A3F61EA5A085289C
12 changed files with 34 additions and 89 deletions

View file

@ -10,7 +10,7 @@ tile entity type to determine the block state factory and falls back on
the material type of the block at that location.
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77385902a8 100644
index b794e04036df00dd9633b9bd808591f499238387..a20505b6badaf2d709bd95fa01d0617b86b35fe2 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
@@ -19,6 +19,7 @@ import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
@ -21,7 +21,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
import net.minecraft.world.level.block.entity.CampfireBlockEntity;
import net.minecraft.world.level.block.entity.ChestBlockEntity;
@@ -109,6 +110,12 @@ public final class CraftBlockStates {
@@ -110,6 +111,12 @@ public final class CraftBlockStates {
return new CraftBlockState(world, blockPosition, blockData);
}
};
@ -34,7 +34,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
static {
register(
@@ -129,7 +136,7 @@ public final class CraftBlockStates {
@@ -130,7 +137,7 @@ public final class CraftBlockStates {
Material.SPRUCE_WALL_SIGN,
Material.WARPED_SIGN,
Material.WARPED_WALL_SIGN
@ -43,7 +43,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
);
register(
@@ -146,7 +153,7 @@ public final class CraftBlockStates {
@@ -147,7 +154,7 @@ public final class CraftBlockStates {
Material.WITHER_SKELETON_WALL_SKULL,
Material.ZOMBIE_HEAD,
Material.ZOMBIE_WALL_HEAD
@ -52,7 +52,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
);
register(
@@ -154,7 +161,7 @@ public final class CraftBlockStates {
@@ -155,7 +162,7 @@ public final class CraftBlockStates {
Material.COMMAND_BLOCK,
Material.REPEATING_COMMAND_BLOCK,
Material.CHAIN_COMMAND_BLOCK
@ -61,7 +61,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
);
register(
@@ -191,7 +198,7 @@ public final class CraftBlockStates {
@@ -192,7 +199,7 @@ public final class CraftBlockStates {
Material.WHITE_WALL_BANNER,
Material.YELLOW_BANNER,
Material.YELLOW_WALL_BANNER
@ -70,7 +70,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
);
register(
@@ -213,7 +220,7 @@ public final class CraftBlockStates {
@@ -214,7 +221,7 @@ public final class CraftBlockStates {
Material.GREEN_SHULKER_BOX,
Material.RED_SHULKER_BOX,
Material.BLACK_SHULKER_BOX
@ -79,7 +79,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
);
register(
@@ -234,54 +241,51 @@ public final class CraftBlockStates {
@@ -235,54 +242,51 @@ public final class CraftBlockStates {
Material.RED_BED,
Material.WHITE_BED,
Material.YELLOW_BED
@ -165,7 +165,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
}
private static void register(Material blockType, BlockStateFactory<?> factory) {
@@ -290,15 +294,17 @@ public final class CraftBlockStates {
@@ -291,15 +295,17 @@ public final class CraftBlockStates {
private static <T extends BlockEntity, B extends CraftBlockEntityState<T>> void register(
Material blockType,
@ -184,7 +184,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
Class<B> blockStateType,
BiFunction<World, T, B> blockStateConstructor,
BiFunction<BlockPos, net.minecraft.world.level.block.state.BlockState, T> tileEntityConstructor
@@ -307,17 +313,35 @@ public final class CraftBlockStates {
@@ -308,17 +314,35 @@ public final class CraftBlockStates {
for (Material blockType : blockTypes) {
CraftBlockStates.register(blockType, factory);
}
@ -220,7 +220,7 @@ index a5c0fe5ba6ca4bed8914edcdcd21275145d11aee..5f497e0b9d2c7b23672f6480aa86aa77
public static BlockState getBlockState(Block block) {
Preconditions.checkNotNull(block, "block is null");
CraftBlock craftBlock = (CraftBlock) block;
@@ -360,7 +384,7 @@ public final class CraftBlockStates {
@@ -361,7 +385,7 @@ public final class CraftBlockStates {
if (world != null && tileEntity == null && CraftBlockStates.isTileEntityOptional(material)) {
factory = CraftBlockStates.DEFAULT_FACTORY;
} else {