mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 08:39:58 +03:00
29 lines
1.8 KiB
Diff
29 lines
1.8 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/ai/EntityAISkeletonRiders.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAISkeletonRiders.java
|
|
@@ -40,6 +40,7 @@
|
|
for (int i = 0; i < 3; ++i)
|
|
{
|
|
EntityHorse entityhorse = this.createHorse(difficultyinstance);
|
|
+ if (entityhorse == null) continue; // CraftBukkit
|
|
EntitySkeleton entityskeleton1 = this.createSkeleton(difficultyinstance, entityhorse);
|
|
entityskeleton1.startRiding(entityhorse);
|
|
entityhorse.addVelocity(this.horse.getRNG().nextGaussian() * 0.5D, 0.0D, this.horse.getRNG().nextGaussian() * 0.5D);
|
|
@@ -56,7 +57,7 @@
|
|
entityhorse.setType(HorseType.SKELETON);
|
|
entityhorse.setHorseTamed(true);
|
|
entityhorse.setGrowingAge(0);
|
|
- entityhorse.worldObj.spawnEntityInWorld(entityhorse);
|
|
+ if (!entityhorse.worldObj.addEntity(entityhorse, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRAP)) return null; // CraftBukkit
|
|
return entityhorse;
|
|
}
|
|
|
|
@@ -75,7 +76,7 @@
|
|
|
|
EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getHeldItemMainhand(), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false);
|
|
EnchantmentHelper.addRandomEnchantment(entityskeleton.getRNG(), entityskeleton.getItemStackFromSlot(EntityEquipmentSlot.HEAD), (int)(5.0F + p_188514_1_.getClampedAdditionalDifficulty() * (float)entityskeleton.getRNG().nextInt(18)), false);
|
|
- entityskeleton.worldObj.spawnEntityInWorld(entityskeleton);
|
|
+ if (!entityskeleton.worldObj.addEntity(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY)) return null; // CraftBukkit
|
|
return entityskeleton;
|
|
}
|
|
}
|