Update to Minecraft 1.16.2

This commit is contained in:
md_5
2020-08-12 07:00:00 +10:00
parent 4b9bc9daa5
commit 9c9fb593f5
208 changed files with 2144 additions and 2455 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/server/BlockFire.java
+++ b/net/minecraft/server/BlockFire.java
@@ -5,6 +5,13 @@
import java.util.Map;
import java.util.Random;
@@ -8,6 +8,13 @@
import java.util.function.Function;
import java.util.stream.Collectors;
+// CraftBukkit start
+import org.bukkit.craftbukkit.block.CraftBlockState;
@@ -14,7 +14,7 @@
public class BlockFire extends BlockFireAbstract {
public static final BlockStateInteger AGE = BlockProperties.aj;
@@ -26,7 +33,24 @@
@@ -64,7 +71,24 @@
@Override
public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
@@ -29,7 +29,7 @@
+ blockState.setData(Blocks.AIR.getBlockData());
+
+ BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
+ generatoraccess.getMinecraftWorld().getMinecraftServer().server.getPluginManager().callEvent(event);
+ ((World) generatoraccess).getServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {
+ return blockState.getHandle();
@@ -40,7 +40,7 @@
}
@Override
@@ -97,7 +121,7 @@
@@ -113,7 +137,7 @@
worldserver.getBlockTickList().a(blockposition, this, a(worldserver.random));
if (worldserver.getGameRules().getBoolean(GameRules.DO_FIRE_TICK)) {
if (!iblockdata.canPlace(worldserver, blockposition)) {
@@ -49,7 +49,7 @@
}
IBlockData iblockdata1 = worldserver.getType(blockposition.down());
@@ -105,7 +129,7 @@
@@ -121,7 +145,7 @@
int i = (Integer) iblockdata.get(BlockFire.AGE);
if (!flag && worldserver.isRaining() && this.a((World) worldserver, blockposition) && random.nextFloat() < 0.2F + (float) i * 0.03F) {
@@ -58,7 +58,7 @@
} else {
int j = Math.min(15, i + random.nextInt(3) / 2);
@@ -119,14 +143,14 @@
@@ -135,14 +159,14 @@
BlockPosition blockposition1 = blockposition.down();
if (!worldserver.getType(blockposition1).d(worldserver, blockposition1, EnumDirection.UP) || i > 3) {
@@ -75,7 +75,7 @@
return;
}
}
@@ -134,12 +158,14 @@
@@ -150,12 +174,14 @@
boolean flag1 = worldserver.u(blockposition);
int k = flag1 ? -50 : 0;
@@ -96,7 +96,7 @@
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
for (int l = -1; l <= 1; ++l) {
@@ -165,7 +191,15 @@
@@ -181,7 +207,15 @@
if (i2 > 0 && random.nextInt(k1) <= i2 && (!worldserver.isRaining() || !this.a((World) worldserver, (BlockPosition) blockposition_mutableblockposition))) {
int j2 = Math.min(15, i + random.nextInt(5) / 4);
@@ -113,7 +113,7 @@
}
}
}
@@ -189,12 +223,24 @@
@@ -205,12 +239,24 @@
return iblockdata.b(BlockProperties.C) && (Boolean) iblockdata.get(BlockProperties.C) ? 0 : this.flameChances.getInt(iblockdata.getBlock());
}