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

@@ -1,8 +1,8 @@
--- a/net/minecraft/server/BlockPumpkinCarved.java
+++ b/net/minecraft/server/BlockPumpkinCarved.java
@@ -3,6 +3,12 @@
import java.util.Iterator;
@@ -4,6 +4,12 @@
import java.util.function.Predicate;
import javax.annotation.Nullable;
+// CraftBukkit start
+import org.bukkit.craftbukkit.util.BlockStateListPopulator;
@@ -13,20 +13,22 @@
public class BlockPumpkinCarved extends BlockFacingHorizontal {
public static final BlockStateDirection a = BlockFacingHorizontal.FACING;
@@ -38,18 +44,24 @@
ShapeDetectorBlock shapedetectorblock;
int k;
@@ -42,19 +48,28 @@
EntityPlayer entityplayer;
int j;
+ BlockStateListPopulator blockList = new BlockStateListPopulator(world); // CraftBukkit - Use BlockStateListPopulator
if (shapedetector_shapedetectorcollection != null) {
for (i = 0; i < this.e().b(); ++i) {
ShapeDetectorBlock shapedetectorblock1 = shapedetector_shapedetectorcollection.a(0, i, 0);
for (i = 0; i < this.getSnowmanShape().b(); ++i) {
ShapeDetectorBlock shapedetectorblock = shapedetector_shapedetectorcollection.a(0, i, 0);
- world.setTypeAndData(shapedetectorblock1.getPosition(), Blocks.AIR.getBlockData(), 2);
+ blockList.setTypeAndData(shapedetectorblock1.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
}
EntitySnowman entitysnowman = new EntitySnowman(world);
EntitySnowman entitysnowman = (EntitySnowman) EntityTypes.SNOW_GOLEM.a(world);
BlockPosition blockposition1 = shapedetector_shapedetectorcollection.a(0, 2, 0).getPosition();
entitysnowman.setPositionRotation((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.05D, (double) blockposition1.getZ() + 0.5D, 0.0F, 0.0F);
@@ -35,21 +37,26 @@
+ if (!world.addEntity(entitysnowman, SpawnReason.BUILD_SNOWMAN)) {
+ return;
+ }
+ for (BlockPosition pos : blockList.getBlocks()) {
+ world.triggerEffect(2001, pos, Block.getCombinedId(world.getType(pos)));
+ }
+ blockList.updateList();
+ // CraftBukkit end
iterator = world.a(EntityPlayer.class, entitysnowman.getBoundingBox().g(5.0D)).iterator();
while (iterator.hasNext()) {
@@ -70,7 +82,7 @@
if (shapedetector_shapedetectorcollection != null) {
for (i = 0; i < this.g().c(); ++i) {
for (int l = 0; l < this.g().b(); ++l) {
- world.setTypeAndData(shapedetector_shapedetectorcollection.a(i, l, 0).getPosition(), Blocks.AIR.getBlockData(), 2);
+ blockList.setTypeAndData(shapedetector_shapedetectorcollection.a(i, l, 0).getPosition(), Blocks.AIR.getBlockData(), 2); // CraftBukkit
@@ -74,8 +89,8 @@
for (int k = 0; k < this.getIronGolemShape().b(); ++k) {
ShapeDetectorBlock shapedetectorblock2 = shapedetector_shapedetectorcollection.a(i, k, 0);
- world.setTypeAndData(shapedetectorblock2.getPosition(), Blocks.AIR.getBlockData(), 2);
- world.triggerEffect(2001, shapedetectorblock2.getPosition(), Block.getCombinedId(shapedetectorblock2.a()));
+ blockList.setTypeAndData(shapedetectorblock2.getPosition(), Blocks.AIR.getBlockData(), 2); // CraftBukkit
+ // world.triggerEffect(2001, shapedetectorblock2.getPosition(), Block.getCombinedId(shapedetectorblock2.a())); // CraftBukkit
}
}
@@ -79,7 +91,12 @@
@@ -84,7 +99,15 @@
entityirongolem.setPlayerCreated(true);
entityirongolem.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.05D, (double) blockposition2.getZ() + 0.5D, 0.0F, 0.0F);
@@ -58,6 +65,9 @@
+ if (!world.addEntity(entityirongolem, SpawnReason.BUILD_IRONGOLEM)) {
+ return;
+ }
+ for (BlockPosition pos : blockList.getBlocks()) {
+ world.triggerEffect(2001, pos, Block.getCombinedId(world.getType(pos)));
+ }
+ blockList.updateList();
+ // CraftBukkit end
iterator = world.a(EntityPlayer.class, entityirongolem.getBoundingBox().g(5.0D)).iterator();