@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/projectile/EntityEgg.java
|
||||
+++ b/net/minecraft/world/entity/projectile/EntityEgg.java
|
||||
@@ -11,6 +11,16 @@
|
||||
@@ -12,6 +12,16 @@
|
||||
import net.minecraft.world.phys.MovingObjectPosition;
|
||||
import net.minecraft.world.phys.MovingObjectPositionEntity;
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
+
|
||||
public class EntityEgg extends EntityProjectileThrowable {
|
||||
|
||||
public EntityEgg(EntityTypes<? extends EntityEgg> entitytypes, World world) {
|
||||
@@ -47,26 +57,53 @@
|
||||
private static final EntitySize ZERO_SIZED_DIMENSIONS = EntitySize.fixed(0.0F, 0.0F);
|
||||
@@ -50,30 +60,58 @@
|
||||
protected void onHit(MovingObjectPosition movingobjectposition) {
|
||||
super.onHit(movingobjectposition);
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -59,14 +59,18 @@
|
||||
|
||||
if (entitychicken != null) {
|
||||
- entitychicken.setAge(-24000);
|
||||
- entitychicken.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F);
|
||||
- this.level().addFreshEntity(entitychicken);
|
||||
+ // CraftBukkit start
|
||||
+ if (entitychicken.getBukkitEntity() instanceof Ageable) {
|
||||
+ ((Ageable) entitychicken.getBukkitEntity()).setBaby();
|
||||
+ }
|
||||
+ this.level().addFreshEntity(entitychicken, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG);
|
||||
+ // CraftBukkit end
|
||||
entitychicken.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F);
|
||||
if (!entitychicken.fudgePositionAfterSizeChange(EntityEgg.ZERO_SIZED_DIMENSIONS)) {
|
||||
break;
|
||||
}
|
||||
|
||||
- this.level().addFreshEntity(entitychicken);
|
||||
+ this.level().addFreshEntity(entitychicken, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); // CraftBukkit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user