geforkt von Mirrors/Paper
Add Option to Nerf Mobs from Spawners
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
efce291f2e
Commit
fc81df77cf
@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNearPlayer(Level world, BlockPos pos) {
|
public boolean isNearPlayer(Level world, BlockPos pos) {
|
||||||
@@ -157,13 +158,18 @@
|
@@ -157,13 +158,24 @@
|
||||||
((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.SPAWNER, (SpawnGroupData) null);
|
((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.SPAWNER, (SpawnGroupData) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17,6 +17,12 @@
|
|||||||
|
|
||||||
Objects.requireNonNull(entityinsentient);
|
Objects.requireNonNull(entityinsentient);
|
||||||
optional1.ifPresent(entityinsentient::equip);
|
optional1.ifPresent(entityinsentient::equip);
|
||||||
|
+ // Spigot Start
|
||||||
|
+ if ( entityinsentient.level().spigotConfig.nerfSpawnerMobs )
|
||||||
|
+ {
|
||||||
|
+ entityinsentient.aware = false;
|
||||||
|
+ }
|
||||||
|
+ // Spigot End
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (!world.tryAddFreshEntityWithPassengers(entity)) {
|
- if (!world.tryAddFreshEntityWithPassengers(entity)) {
|
||||||
|
@ -262,4 +262,11 @@ public class SpigotWorldConfig
|
|||||||
this.zombieAggressiveTowardsVillager = this.getBoolean( "zombie-aggressive-towards-villager", true );
|
this.zombieAggressiveTowardsVillager = this.getBoolean( "zombie-aggressive-towards-villager", true );
|
||||||
this.log( "Zombie Aggressive Towards Villager: " + this.zombieAggressiveTowardsVillager );
|
this.log( "Zombie Aggressive Towards Villager: " + this.zombieAggressiveTowardsVillager );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean nerfSpawnerMobs;
|
||||||
|
private void nerfSpawnerMobs()
|
||||||
|
{
|
||||||
|
this.nerfSpawnerMobs = this.getBoolean( "nerf-spawner-mobs", false );
|
||||||
|
this.log( "Nerfing mobs spawned from spawners: " + this.nerfSpawnerMobs );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren