diff --git a/patches/server/1048-Initialisation-improvements-II.patch b/patches/server/1048-Initialisation-improvements-II.patch index 37781dfc8e..6d2acff881 100644 --- a/patches/server/1048-Initialisation-improvements-II.patch +++ b/patches/server/1048-Initialisation-improvements-II.patch @@ -1,5 +1,5 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Lixfel +From: Chaoscaot Date: Fri, 23 Jun 2023 15:56:45 +0200 Subject: [PATCH] Initialisation improvements II @@ -95,6 +95,24 @@ index 4f4f4cb6037c2a46ffcf427f5812164bbb98b8b7..eef5249db9a5808216397dd03b882dcb return ret == null ? FLATTENED_BY_ID[0] : ret; } +diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +index d3dbc896d611f0f719bb257c01789e1fdae751b0..800c04b5cb13e12280ad40ae105f959b06d5cea0 100644 +--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java ++++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +@@ -224,13 +224,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface + // Spigot end + io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // Paper - load mappings for stacktrace deobf and etc. + // Paper start - initialize global and world-defaults configuration +- try { +- Main.paperConfig.get(); +- } catch (InterruptedException e) { +- Thread.currentThread().interrupt(); +- } catch (ExecutionException e) { +- throw new IOException(e); +- } + this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess()); + this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); + // Paper end - initialize global and world-defaults configuration diff --git a/src/main/java/net/minecraft/util/datafix/fixes/BlockStateData.java b/src/main/java/net/minecraft/util/datafix/fixes/BlockStateData.java index 6b1af6df2427a6c2f7954c89935bf33279d58204..51f32a847c954846fb0c18e802287a26d507ee9f 100644 --- a/src/main/java/net/minecraft/util/datafix/fixes/BlockStateData.java @@ -9747,3 +9765,44 @@ index 475cd0583e99495ca0df665da19cc382a8d5e7ea..3f31a3115c69fd976ccb1e396018d94b } } } +diff --git a/src/main/java/net/minecraft/world/level/block/WallBlock.java b/src/main/java/net/minecraft/world/level/block/WallBlock.java +index 24eb3b5c805a5df9b029b4a2a98f2a3720065e5e..355f48538ca84d383034e3cdef46b964d986b292 100644 +--- a/src/main/java/net/minecraft/world/level/block/WallBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/WallBlock.java +@@ -72,8 +72,6 @@ public class WallBlock extends Block implements SimpleWaterloggedBlock { + .setValue(WEST_WALL, WallSide.NONE) + .setValue(WATERLOGGED, Boolean.valueOf(false)) + ); +- this.shapeByIndex = this.makeShapes(4.0F, 3.0F, 16.0F, 0.0F, 14.0F, 16.0F); +- this.collisionShapeByIndex = this.makeShapes(4.0F, 3.0F, 24.0F, 0.0F, 24.0F, 24.0F); + } + + private static VoxelShape applyWallShape(VoxelShape base, WallSide wallShape, VoxelShape tall, VoxelShape low) { +@@ -114,12 +112,6 @@ public class WallBlock extends Block implements SimpleWaterloggedBlock { + voxelShape10 = Shapes.or(voxelShape10, voxelShape); + } + +- BlockState blockState = this.defaultBlockState() +- .setValue(UP, boolean_) +- .setValue(EAST_WALL, wallSide) +- .setValue(WEST_WALL, wallSide3) +- .setValue(NORTH_WALL, wallSide2) +- .setValue(SOUTH_WALL, wallSide4); + builder.put(ImmutableMap.of(UP, boolean_, EAST_WALL, wallSide, WEST_WALL, wallSide3, NORTH_WALL, wallSide2, SOUTH_WALL, wallSide4, WATERLOGGED, Boolean.FALSE), voxelShape10); + builder.put(ImmutableMap.of(UP, boolean_, EAST_WALL, wallSide, WEST_WALL, wallSide3, NORTH_WALL, wallSide2, SOUTH_WALL, wallSide4, WATERLOGGED, Boolean.TRUE), voxelShape10); + } +diff --git a/src/main/java/net/minecraft/world/level/block/state/StateDefinition.java b/src/main/java/net/minecraft/world/level/block/state/StateDefinition.java +index 0df8011cd0809045986179e49ef7e2f459168f07..3a449e13951ea183b9ae7910a424b51e841608da 100644 +--- a/src/main/java/net/minecraft/world/level/block/state/StateDefinition.java ++++ b/src/main/java/net/minecraft/world/level/block/state/StateDefinition.java +@@ -62,7 +62,9 @@ public class StateDefinition> { + S stateHolderx = factory.create(owner, reference2ObjectArrayMap, mapCodec2); + list.add(stateHolderx); + +- stateHolder.populateNeighbours(table, table.put(immutableMap, stateHolder)); ++ int index = table.put(reference2ObjectArrayMap, stateHolderx); ++ ++ stateHolderx.populateNeighbours(table, index); + }); + + this.states = ImmutableList.copyOf(list);