geforkt von Mirrors/Paper
58 Zeilen
2.7 KiB
Diff
58 Zeilen
2.7 KiB
Diff
--- a/net/minecraft/server/EntityTurtle.java
|
|
+++ b/net/minecraft/server/EntityTurtle.java
|
|
@@ -130,11 +130,11 @@
|
|
this.goalSelector.a(1, new EntityTurtle.a(this, 1.0D));
|
|
this.goalSelector.a(1, new EntityTurtle.d(this, 1.0D));
|
|
this.goalSelector.a(2, new EntityTurtle.i(this, 1.1D, Blocks.SEAGRASS.getItem()));
|
|
- this.goalSelector.a(3, new EntityTurtle.c(this, 1.0D, null));
|
|
+ this.goalSelector.a(3, new EntityTurtle.c(this, 1.0D)); // CraftBukkit - decompile error
|
|
this.goalSelector.a(4, new EntityTurtle.b(this, 1.0D));
|
|
this.goalSelector.a(7, new EntityTurtle.j(this, 1.0D));
|
|
this.goalSelector.a(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
|
|
- this.goalSelector.a(9, new EntityTurtle.h(this, 1.0D, 100, null));
|
|
+ this.goalSelector.a(9, new EntityTurtle.h(this, 1.0D, 100)); // CraftBukkit - decompile error
|
|
}
|
|
|
|
protected void initAttributes() {
|
|
@@ -232,7 +232,9 @@
|
|
protected void l() {
|
|
super.l();
|
|
if (this.world.getGameRules().getBoolean("doMobLoot")) {
|
|
+ this.forceDrops = true; // CraftBukkit
|
|
this.a((IMaterial) Items.SCUTE, 1);
|
|
+ this.forceDrops = false; // CraftBukkit
|
|
}
|
|
|
|
}
|
|
@@ -263,7 +265,9 @@
|
|
}
|
|
|
|
public void onLightningStrike(EntityLightning entitylightning) {
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = entitylightning; // CraftBukkit
|
|
this.damageEntity(DamageSource.LIGHTNING, Float.MAX_VALUE);
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.entityDamage = null; // CraftBukkit
|
|
}
|
|
|
|
public void die(DamageSource damagesource) {
|
|
@@ -423,15 +427,19 @@
|
|
} else if (this.f.bK > 200) {
|
|
World world = this.f.world;
|
|
|
|
+ // CraftBukkit start
|
|
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.f, this.d.up(), Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, Integer.valueOf(this.f.random.nextInt(4) + 1))).isCancelled()) {
|
|
world.a((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_LAY_EGG, SoundCategory.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
|
|
world.setTypeAndData(this.d.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, this.f.random.nextInt(4) + 1), 3);
|
|
+ }
|
|
+ // CraftBukkit end
|
|
this.f.s(false);
|
|
this.f.t(false);
|
|
this.f.d(600);
|
|
}
|
|
|
|
if (this.f.dz()) {
|
|
- EntityTurtle.g(this.f);
|
|
+ this.f.bK++; // CraftBukkit - decompile error
|
|
}
|
|
}
|
|
|