Update to Minecraft 1.14-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-04-23 12:00:00 +10:00
parent 0e98365784
commit a0f2b74c8d
560 changed files with 10642 additions and 10867 deletions

View File

@@ -11,56 +11,54 @@
+
public class BlockWitherSkull extends BlockSkull {
private static ShapeDetector c;
@@ -23,6 +28,7 @@
@Nullable
@@ -26,6 +31,7 @@
}
public static void a(World world, BlockPosition blockposition, TileEntitySkull tileentityskull) {
+ if (world.captureBlockStates) return; // CraftBukkit
Block block = tileentityskull.getBlock().getBlock();
boolean flag = block == Blocks.WITHER_SKELETON_SKULL || block == Blocks.WITHER_SKELETON_WALL_SKULL;
if (!world.isClientSide) {
Block block = tileentityskull.getBlock().getBlock();
boolean flag = block == Blocks.WITHER_SKELETON_SKULL || block == Blocks.WITHER_SKELETON_WALL_SKULL;
@@ -35,12 +41,14 @@
ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = shapedetector.a(world, blockposition);
@@ -31,6 +37,8 @@
ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = shapedetector.a(world, blockposition);
if (shapedetector_shapedetectorcollection != null) {
+ // CraftBukkit start - Use BlockStateListPopulator
+ BlockStateListPopulator blockList = new BlockStateListPopulator(world);
for (int i = 0; i < shapedetector.c(); ++i) {
for (int j = 0; j < shapedetector.b(); ++j) {
ShapeDetectorBlock shapedetectorblock = shapedetector_shapedetectorcollection.a(i, j, 0);
if (shapedetector_shapedetectorcollection != null) {
+ // CraftBukkit start - Use BlockStateListPopulator
+ BlockStateListPopulator blockList = new BlockStateListPopulator(world);
int i;
for (i = 0; i < 3; ++i) {
@@ -39,7 +47,7 @@
for (i = 0; i < shapedetector.c(); ++i) {
for (int j = 0; j < shapedetector.b(); ++j) {
- world.setTypeAndData(shapedetector_shapedetectorcollection.a(i, j, 0).getPosition(), Blocks.AIR.getBlockData(), 2);
+ blockList.setTypeAndData(shapedetector_shapedetectorcollection.a(i, j, 0).getPosition(), Blocks.AIR.getBlockData(), 2); // CraftBukkit
- world.setTypeAndData(shapedetectorblock.getPosition(), Blocks.AIR.getBlockData(), 2);
- world.triggerEffect(2001, shapedetectorblock.getPosition(), Block.getCombinedId(shapedetectorblock.a()));
+ blockList.setTypeAndData(shapedetectorblock.getPosition(), Blocks.AIR.getBlockData(), 2); // CraftBukkit
+ // world.triggerEffect(2001, shapedetectorblock.getPosition(), Block.getCombinedId(shapedetectorblock.a())); // CraftBukkit
}
}
}
@@ -50,6 +58,16 @@
entitywither.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.55D, (double) blockposition2.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
entitywither.aQ = shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F;
entitywither.l();
+ // CraftBukkit start
+ if (!world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
+ // Restore drop status from above
+ for (i = 0; i < 3; ++i) {
+ TileEntitySkull.setShouldDrop(world, shapedetector_shapedetectorcollection.a(i, 0, 0).getPosition(), true);
@@ -50,6 +58,15 @@
entitywither.setPositionRotation((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
entitywither.aK = shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F;
entitywither.l();
+ // CraftBukkit start
+ if (!world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
+ return;
+ }
+ return;
+ }
+ blockList.updateList();
+ // CraftBukkit end
Iterator iterator = world.a(EntityPlayer.class, entitywither.getBoundingBox().g(50.0D)).iterator();
+ for (BlockPosition pos : blockList.getBlocks()) {
+ world.triggerEffect(2001, pos, Block.getCombinedId(world.getType(pos)));
+ }
+ blockList.updateList();
+ // CraftBukkit end
Iterator iterator = world.a(EntityPlayer.class, entitywither.getBoundingBox().g(50.0D)).iterator();
while (iterator.hasNext()) {
@@ -58,7 +76,7 @@
CriterionTriggers.n.a(entityplayer, (Entity) entitywither);
}
while (iterator.hasNext()) {
@@ -58,7 +75,7 @@
CriterionTriggers.n.a(entityplayer, (Entity) entitywither);
}
- world.addEntity(entitywither);
+ // world.addEntity(entitywither); // CraftBukkit - moved up
int k;
- world.addEntity(entitywither);
+ // world.addEntity(entitywither); // CraftBukkit - moved up
for (int k = 0; k < shapedetector.c(); ++k) {
for (int l = 0; l < shapedetector.b(); ++l) {