@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
|
||||
@@ -51,6 +51,19 @@
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
@@ -53,6 +53,19 @@
|
||||
import org.joml.Vector3f;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
+// CraftBukkit start
|
||||
@@ -20,7 +20,7 @@
|
||||
public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -88,6 +101,7 @@
|
||||
@@ -90,6 +103,7 @@
|
||||
private final PathPoint[] nodes;
|
||||
private final int[] nodeAdjacency;
|
||||
private final Path openSet;
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
|
||||
super(EntityTypes.ENDER_DRAGON, world);
|
||||
@@ -109,6 +123,7 @@
|
||||
@@ -111,6 +125,7 @@
|
||||
this.noPhysics = true;
|
||||
this.noCulling = true;
|
||||
this.phaseManager = new DragonControllerManager(this);
|
||||
@@ -36,16 +36,16 @@
|
||||
}
|
||||
|
||||
public void setDragonFight(EnderDragonBattle enderdragonbattle) {
|
||||
@@ -267,7 +282,7 @@
|
||||
@@ -258,7 +273,7 @@
|
||||
|
||||
Vec3D vec3d1 = idragoncontroller.getFlyTargetLocation();
|
||||
|
||||
- if (vec3d1 != null) {
|
||||
+ if (vec3d1 != null && idragoncontroller.getPhase() != DragonControllerPhase.HOVERING) { // CraftBukkit - Don't move when hovering
|
||||
d0 = vec3d1.x - this.getX();
|
||||
d1 = vec3d1.y - this.getY();
|
||||
d2 = vec3d1.z - this.getZ();
|
||||
@@ -408,7 +423,14 @@
|
||||
double d0 = vec3d1.x - this.getX();
|
||||
double d1 = vec3d1.y - this.getY();
|
||||
double d2 = vec3d1.z - this.getZ();
|
||||
@@ -399,7 +414,14 @@
|
||||
if (this.nearestCrystal.isRemoved()) {
|
||||
this.nearestCrystal = null;
|
||||
} else if (this.tickCount % 10 == 0 && this.getHealth() < this.getMaxHealth()) {
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,6 +505,9 @@
|
||||
@@ -474,6 +496,9 @@
|
||||
int j1 = MathHelper.floor(axisalignedbb.maxZ);
|
||||
boolean flag = false;
|
||||
boolean flag1 = false;
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
for (int k1 = i; k1 <= l; ++k1) {
|
||||
for (int l1 = j; l1 <= i1; ++l1) {
|
||||
@@ -492,7 +517,11 @@
|
||||
@@ -483,7 +508,11 @@
|
||||
|
||||
if (!iblockdata.isAir() && !iblockdata.is(TagsBlock.DRAGON_TRANSPARENT)) {
|
||||
if (this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is(TagsBlock.DRAGON_IMMUNE)) {
|
||||
@@ -84,7 +84,7 @@
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
@@ -501,6 +530,51 @@
|
||||
@@ -492,6 +521,51 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
if (flag1) {
|
||||
BlockPosition blockposition1 = new BlockPosition(i + this.random.nextInt(l - i + 1), j + this.random.nextInt(i1 - j + 1), k + this.random.nextInt(j1 - k + 1));
|
||||
|
||||
@@ -565,6 +639,21 @@
|
||||
@@ -556,6 +630,21 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
@Override
|
||||
protected void tickDeath() {
|
||||
if (this.dragonFight != null) {
|
||||
@@ -580,15 +669,20 @@
|
||||
@@ -571,15 +660,20 @@
|
||||
this.level().addParticle(Particles.EXPLOSION_EMITTER, this.getX() + (double) f, this.getY() + 2.0D + (double) f1, this.getZ() + (double) f2, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
EntityExperienceOrb.award((WorldServer) this.level(), this.position(), MathHelper.floor((float) short0 * 0.08F));
|
||||
}
|
||||
|
||||
@@ -599,7 +693,7 @@
|
||||
@@ -590,7 +684,7 @@
|
||||
|
||||
this.move(EnumMoveType.SELF, new Vec3D(0.0D, 0.10000000149011612D, 0.0D));
|
||||
if (this.dragonDeathTime == 200 && this.level() instanceof WorldServer) {
|
||||
@@ -189,7 +189,7 @@
|
||||
EntityExperienceOrb.award((WorldServer) this.level(), this.position(), MathHelper.floor((float) short0 * 0.2F));
|
||||
}
|
||||
|
||||
@@ -820,6 +914,7 @@
|
||||
@@ -811,6 +905,7 @@
|
||||
super.addAdditionalSaveData(nbttagcompound);
|
||||
nbttagcompound.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId());
|
||||
nbttagcompound.putInt("DragonDeathTime", this.dragonDeathTime);
|
||||
@@ -197,7 +197,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -833,6 +928,11 @@
|
||||
@@ -824,6 +919,11 @@
|
||||
this.dragonDeathTime = nbttagcompound.getInt("DragonDeathTime");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user