Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
SPIGOT-4527: Fix sponges with waterlogged blocks
Dieser Commit ist enthalten in:
Ursprung
6ec8ea5cf4
Commit
b446cb5d74
@ -46,12 +46,12 @@
|
||||
++i;
|
||||
if (j < 6) {
|
||||
linkedlist.add(new Tuple(blockposition2, j + 1));
|
||||
@@ -75,6 +82,31 @@
|
||||
@@ -75,6 +82,37 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
+ // CraftBukkit start
|
||||
+ List<CraftBlockState> blocks = blockList.getList();
|
||||
+ List<CraftBlockState> blocks = blockList.getList(); // Is a clone
|
||||
+ if (!blocks.isEmpty()) {
|
||||
+ final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
+
|
||||
@ -65,12 +65,18 @@
|
||||
+ for (CraftBlockState block : blocks) {
|
||||
+ BlockPosition blockposition2 = new BlockPosition(block.getX(), block.getY(), block.getZ());
|
||||
+ IBlockData iblockdata = world.getType(blockposition2);
|
||||
+ Fluid fluid = world.getFluid(blockposition2);
|
||||
+ Material material = iblockdata.getMaterial();
|
||||
+
|
||||
+ if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||
+ iblockdata.a(world, blockposition2, 0);
|
||||
+ if (fluid.a(TagsFluid.WATER)) {
|
||||
+ if (iblockdata.getBlock() instanceof IFluidSource && ((IFluidSource) iblockdata.getBlock()).a(blockList, blockposition2, iblockdata) != FluidTypes.a) {
|
||||
+ // NOP
|
||||
+ } else if (iblockdata.getBlock() instanceof BlockFluids) {
|
||||
+ // NOP
|
||||
+ } else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||
+ iblockdata.a(world, blockposition2, 0);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag());
|
||||
+ }
|
||||
+ }
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren