mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 11:25:55 +03:00
33 lines
1.6 KiB
Diff
33 lines
1.6 KiB
Diff
--- ../src-base/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java
|
|
+++ ../src-work/minecraft/net/minecraft/tileentity/MobSpawnerBaseLogic.java
|
|
@@ -20,7 +20,7 @@
|
|
|
|
public abstract class MobSpawnerBaseLogic
|
|
{
|
|
- private int spawnDelay = 20;
|
|
+ public int spawnDelay = 20;
|
|
private final List<WeightedSpawnerEntity> minecartToSpawn = Lists.<WeightedSpawnerEntity>newArrayList();
|
|
private WeightedSpawnerEntity randomEntity = new WeightedSpawnerEntity();
|
|
private double mobRotation;
|
|
@@ -33,7 +33,7 @@
|
|
private int activatingRangeFromPlayer = 16;
|
|
private int spawnRange = 4;
|
|
|
|
- private String getEntityNameToSpawn()
|
|
+ public String getEntityNameToSpawn()
|
|
{
|
|
return this.randomEntity.getNbt().getString("id");
|
|
}
|
|
@@ -124,7 +124,10 @@
|
|
if (!net.minecraftforge.event.ForgeEventFactory.doSpecialSpawn(entityliving, this.getSpawnerWorld(), (float)entity.posX, (float)entity.posY, (float)entity.posZ))
|
|
((EntityLiving)entity).onInitialSpawn(world.getDifficultyForLocation(new BlockPos(entity)), (IEntityLivingData)null);
|
|
}
|
|
-
|
|
+ if (entity.worldObj.spigotConfig.nerfSpawnerMobs) entity.fromMobSpawner = true; // Spigot Start
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockpos).isCancelled()) {
|
|
+ continue;
|
|
+ }
|
|
AnvilChunkLoader.spawnEntity(entity, world);
|
|
world.playEvent(2004, blockpos, 0);
|
|
|