mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
b3a8254758
By: md_5 <git@md-5.net>
47 lines
2.7 KiB
Diff
47 lines
2.7 KiB
Diff
--- a/net/minecraft/world/level/block/MultifaceBlock.java
|
|
+++ b/net/minecraft/world/level/block/MultifaceBlock.java
|
|
@@ -45,7 +45,7 @@
|
|
private static final VoxelShape NORTH_AABB = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 16.0D, 1.0D);
|
|
private static final VoxelShape SOUTH_AABB = Block.a(0.0D, 0.0D, 15.0D, 16.0D, 16.0D, 16.0D);
|
|
private static final Map<EnumDirection, BlockStateBoolean> PROPERTY_BY_DIRECTION = BlockSprawling.PROPERTY_BY_DIRECTION;
|
|
- private static final Map<EnumDirection, VoxelShape> SHAPE_BY_DIRECTION = (Map) SystemUtils.a((Object) Maps.newEnumMap(EnumDirection.class), (enummap) -> {
|
|
+ private static final Map<EnumDirection, VoxelShape> SHAPE_BY_DIRECTION = (Map) SystemUtils.a(Maps.newEnumMap(EnumDirection.class), (enummap) -> { // CraftBukkit - decompile error
|
|
enummap.put(EnumDirection.NORTH, MultifaceBlock.NORTH_AABB);
|
|
enummap.put(EnumDirection.EAST, MultifaceBlock.EAST_AABB);
|
|
enummap.put(EnumDirection.SOUTH, MultifaceBlock.SOUTH_AABB);
|
|
@@ -134,7 +134,7 @@
|
|
|
|
return (IBlockData) Arrays.stream(blockactioncontext.f()).map((enumdirection) -> {
|
|
return this.c(iblockdata, (IBlockAccess) world, blockposition, enumdirection);
|
|
- }).filter(Objects::nonNull).findFirst().orElse((Object) null);
|
|
+ }).filter(Objects::nonNull).findFirst().orElse(null); // CraftBukkit - decompile error
|
|
}
|
|
|
|
@Nullable
|
|
@@ -226,7 +226,7 @@
|
|
if (optional.isPresent()) {
|
|
Pair<BlockPosition, EnumDirection> pair = (Pair) optional.get();
|
|
|
|
- return this.a(generatoraccess, (BlockPosition) pair.getFirst(), (EnumDirection) pair.getSecond(), flag);
|
|
+ return this.a(generatoraccess, (BlockPosition) pair.getFirst(), (EnumDirection) pair.getSecond(), flag, blockposition); // CraftBukkit
|
|
} else {
|
|
return false;
|
|
}
|
|
@@ -271,7 +271,7 @@
|
|
}
|
|
}
|
|
|
|
- private boolean a(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection enumdirection, boolean flag) {
|
|
+ private boolean a(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection enumdirection, boolean flag, BlockPosition source) { // CraftBukkit
|
|
IBlockData iblockdata = generatoraccess.getType(blockposition);
|
|
IBlockData iblockdata1 = this.c(iblockdata, (IBlockAccess) generatoraccess, blockposition, enumdirection);
|
|
|
|
@@ -280,7 +280,7 @@
|
|
generatoraccess.A(blockposition).e(blockposition);
|
|
}
|
|
|
|
- return generatoraccess.setTypeAndData(blockposition, iblockdata1, 2);
|
|
+ return org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, source, blockposition, iblockdata1, 2); // CraftBukkit
|
|
} else {
|
|
return false;
|
|
}
|