Update to Minecraft 1.16.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-08-12 07:00:00 +10:00
parent 5e5f7f19dc
commit 6a9e00d4b6
208 changed files with 2144 additions and 2455 deletions

View File

@@ -15,9 +15,9 @@
private static final Logger LOGGER = LogManager.getLogger();
@@ -38,6 +44,7 @@
private final PathPoint[] bQ = new PathPoint[24];
private final int[] bR = new int[24];
private final Path bS = new Path();
private final PathPoint[] bJ = new PathPoint[24];
private final int[] bK = new int[24];
private final Path bL = new Path();
+ private Explosion explosionSource = new Explosion(null, this, null, null, Double.NaN, Double.NaN, Double.NaN, Float.NaN, true, Explosion.Effect.DESTROY); // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
@@ -105,12 +105,12 @@
+ Block nmsBlock = craftBlock.getNMS().getBlock();
+ if (nmsBlock.a(explosionSource)) {
+ TileEntity tileentity = nmsBlock.isTileEntity() ? this.world.getTileEntity(blockposition) : null;
+ LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.POSITION, blockposition).set(LootContextParameters.TOOL, ItemStack.b).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
+ LootTableInfo.Builder loottableinfo_builder = (new LootTableInfo.Builder((WorldServer) this.world)).a(this.world.random).set(LootContextParameters.ORIGIN, Vec3D.a(blockposition)).set(LootContextParameters.TOOL, ItemStack.b).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
+
+ craftBlock.getNMS().a(loottableinfo_builder).forEach((itemstack) -> {
+ Block.a(world, blockposition, itemstack);
+ });
+ craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.b);
+ craftBlock.getNMS().dropNaturally((WorldServer) world, blockposition, ItemStack.b);
+ }
+ nmsBlock.wasExploded(world, blockposition, explosionSource);
+