@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/level/block/BlockSponge.java
|
||||
+++ b/net/minecraft/world/level/block/BlockSponge.java
|
||||
@@ -16,6 +16,13 @@
|
||||
import net.minecraft.world.level.material.FluidTypes;
|
||||
@@ -15,6 +15,13 @@
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -13,8 +13,8 @@
|
||||
+
|
||||
public class BlockSponge extends Block {
|
||||
|
||||
protected BlockSponge(BlockBase.Info blockbase_info) {
|
||||
@@ -48,6 +55,7 @@
|
||||
public static final int MAX_DEPTH = 6;
|
||||
@@ -50,6 +57,7 @@
|
||||
|
||||
queue.add(new Tuple<>(blockposition, 0));
|
||||
int i = 0;
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
while (!queue.isEmpty()) {
|
||||
Tuple<BlockPosition, Integer> tuple = (Tuple) queue.poll();
|
||||
@@ -59,27 +67,31 @@
|
||||
@@ -61,27 +69,31 @@
|
||||
for (int l = 0; l < k; ++l) {
|
||||
EnumDirection enumdirection = aenumdirection[l];
|
||||
BlockPosition blockposition2 = blockposition1.shift(enumdirection);
|
||||
@@ -35,8 +35,8 @@
|
||||
Material material = iblockdata.getMaterial();
|
||||
|
||||
if (fluid.a((Tag) TagsFluid.WATER)) {
|
||||
- if (iblockdata.getBlock() instanceof IFluidSource && ((IFluidSource) iblockdata.getBlock()).removeFluid(world, blockposition2, iblockdata) != FluidTypes.EMPTY) {
|
||||
+ if (iblockdata.getBlock() instanceof IFluidSource && ((IFluidSource) iblockdata.getBlock()).removeFluid(blockList, blockposition2, iblockdata) != FluidTypes.EMPTY) { // CraftBukkit
|
||||
- if (iblockdata.getBlock() instanceof IFluidSource && !((IFluidSource) iblockdata.getBlock()).removeFluid(world, blockposition2, iblockdata).isEmpty()) {
|
||||
+ if (iblockdata.getBlock() instanceof IFluidSource && !((IFluidSource) iblockdata.getBlock()).removeFluid(blockList, blockposition2, iblockdata).isEmpty()) { // CraftBukkit
|
||||
++i;
|
||||
if (j < 6) {
|
||||
queue.add(new Tuple<>(blockposition2, j + 1));
|
||||
@@ -49,9 +49,9 @@
|
||||
queue.add(new Tuple<>(blockposition2, j + 1));
|
||||
}
|
||||
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||
- TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
||||
- TileEntity tileentity = iblockdata.isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
||||
+ // CraftBukkit start
|
||||
+ // TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
||||
+ // TileEntity tileentity = iblockdata.isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
||||
|
||||
- a(iblockdata, (GeneratorAccess) world, blockposition2, tileentity);
|
||||
- world.setTypeAndData(blockposition2, Blocks.AIR.getBlockData(), 3);
|
||||
@@ -61,7 +61,7 @@
|
||||
++i;
|
||||
if (j < 6) {
|
||||
queue.add(new Tuple<>(blockposition2, j + 1));
|
||||
@@ -92,6 +104,39 @@
|
||||
@@ -94,6 +106,39 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -84,12 +84,12 @@
|
||||
+ Material material = iblockdata.getMaterial();
|
||||
+
|
||||
+ if (fluid.a(TagsFluid.WATER)) {
|
||||
+ if (iblockdata.getBlock() instanceof IFluidSource && ((IFluidSource) iblockdata.getBlock()).removeFluid(blockList, blockposition2, iblockdata) != FluidTypes.EMPTY) {
|
||||
+ if (iblockdata.getBlock() instanceof IFluidSource && !((IFluidSource) iblockdata.getBlock()).removeFluid(blockList, blockposition2, iblockdata).isEmpty()) {
|
||||
+ // NOP
|
||||
+ } else if (iblockdata.getBlock() instanceof BlockFluids) {
|
||||
+ // NOP
|
||||
+ } else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
|
||||
+ TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
||||
+ TileEntity tileentity = iblockdata.isTileEntity() ? world.getTileEntity(blockposition2) : null;
|
||||
+
|
||||
+ a(iblockdata, world, blockposition2, tileentity);
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user