Update to Minecraft 1.13-pre7

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-07-15 10:00:00 +10:00
parent d1e91a8adb
commit 7e0a66fdd5
608 changed files with 17788 additions and 9378 deletions

View File

@@ -1,7 +1,7 @@
--- a/net/minecraft/server/BlockSoil.java
+++ b/net/minecraft/server/BlockSoil.java
@@ -4,6 +4,11 @@
import java.util.List;
@@ -3,6 +3,11 @@
import java.util.Iterator;
import java.util.Random;
+// CraftBukkit start
@@ -11,8 +11,8 @@
+
public class BlockSoil extends Block {
public static final BlockStateInteger MOISTURE = BlockStateInteger.of("moisture", 0, 7);
@@ -45,14 +50,38 @@
public static final BlockStateInteger MOISTURE = BlockProperties.ah;
@@ -63,14 +68,37 @@
}
public void fallOn(World world, BlockPosition blockposition, Entity entity, float f) {
@@ -31,24 +31,23 @@
+ return;
+ }
+
+ if (CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.DIRT, 0).isCancelled()) {
+ if (CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
b(world, blockposition);
b(world.getType(blockposition), world, blockposition);
}
- super.fallOn(world, blockposition, entity, f);
+ // super.fallOn(world, blockposition, entity, f); // CraftBukkit - moved up
}
protected static void b(World world, BlockPosition blockposition) {
protected static void b(IBlockData iblockdata, World world, BlockPosition blockposition) {
+ // CraftBukkit start
+ org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ if (CraftEventFactory.callBlockFadeEvent(block, Blocks.DIRT).isCancelled()) {
+ if (CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.DIRT.getBlockData()).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
AxisAlignedBB axisalignedbb = BlockSoil.c.a(blockposition);
List list = world.getEntities((Entity) null, axisalignedbb);
world.setTypeUpdate(blockposition, a(iblockdata, Blocks.DIRT.getBlockData(), (GeneratorAccess) world, blockposition));
}