Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -14,23 +14,23 @@
public class EntityEnderDragon extends EntityInsentient implements IMonster {
private static final Logger LOGGER = LogManager.getLogger();
@@ -35,6 +41,7 @@
private final PathPoint[] bT = new PathPoint[24];
private final int[] bU = new int[24];
private final Path bV = new Path();
@@ -38,6 +44,7 @@
private final PathPoint[] bR = new PathPoint[24];
private final int[] bS = new int[24];
private final Path bT = new Path();
+ private Explosion explosionSource = new Explosion(null, this, 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) {
super(EntityTypes.ENDER_DRAGON, world);
@@ -173,7 +180,7 @@
@@ -177,7 +184,7 @@
Vec3D vec3d1 = idragoncontroller.g();
- if (vec3d1 != null) {
+ if (vec3d1 != null && idragoncontroller.getControllerPhase() != DragonControllerPhase.HOVER) { // CraftBukkit - Don't move when hovering
d0 = vec3d1.x - this.locX;
d1 = vec3d1.y - this.locY;
d2 = vec3d1.z - this.locZ;
d0 = vec3d1.x - this.locX();
d1 = vec3d1.y - this.locY();
d2 = vec3d1.z - this.locZ();
@@ -315,7 +322,14 @@
if (this.currentEnderCrystal.dead) {
this.currentEnderCrystal = null;
@@ -47,7 +47,7 @@
}
}
@@ -388,6 +402,9 @@
@@ -390,6 +404,9 @@
int j1 = MathHelper.floor(axisalignedbb.maxZ);
boolean flag = false;
boolean flag1 = false;
@@ -57,7 +57,7 @@
for (int k1 = i; k1 <= l; ++k1) {
for (int l1 = j; l1 <= i1; ++l1) {
@@ -398,7 +415,11 @@
@@ -400,7 +417,11 @@
if (!iblockdata.isAir() && iblockdata.getMaterial() != Material.FIRE) {
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && !TagsBlock.DRAGON_IMMUNE.isTagged(block)) {
@@ -70,7 +70,7 @@
} else {
flag = true;
}
@@ -407,6 +428,48 @@
@@ -409,6 +430,51 @@
}
}
@@ -107,7 +107,10 @@
+ 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.a).set(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).setOptional(LootContextParameters.BLOCK_ENTITY, tileentity);
+
+ Block.b(craftBlock.getNMS(), loottableinfo_builder);
+ craftBlock.getNMS().a(loottableinfo_builder).forEach((itemstack) -> {
+ Block.a(world, blockposition, itemstack);
+ });
+ craftBlock.getNMS().dropNaturally(world, blockposition, ItemStack.a);
+ }
+ nmsBlock.wasExploded(world, blockposition, explosionSource);
+