mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Piglin portal spawn modifier
Allows changing the modifier for the piglin spawn chance from a portal block based on the world difficulty. For example, with the default vanilla value of 2000 there is a 2 out of 2000 chance for a piglin to spawn in a portal block each tick in normal mode. Equation: random.nextInt(modifier) < difficulty Difficulties: 0 - peaceful 1 - easy 2 - normal 3 - hard
This commit is contained in:
committed by
granny
parent
8ce5e9f17f
commit
5ea7aa4cc1
@@ -1707,6 +1707,7 @@ public class PurpurWorldConfig {
|
||||
public double piglinScale = 1.0D;
|
||||
public boolean piglinBypassMobGriefing = false;
|
||||
public boolean piglinTakeDamageFromWater = false;
|
||||
public int piglinPortalSpawnModifier = 2000;
|
||||
private void piglinSettings() {
|
||||
piglinRidable = getBoolean("mobs.piglin.ridable", piglinRidable);
|
||||
piglinRidableInWater = getBoolean("mobs.piglin.ridable-in-water", piglinRidableInWater);
|
||||
@@ -1720,6 +1721,7 @@ public class PurpurWorldConfig {
|
||||
piglinScale = Mth.clamp(getDouble("mobs.piglin.attributes.scale", piglinScale), 0.0625D, 16.0D);
|
||||
piglinBypassMobGriefing = getBoolean("mobs.piglin.bypass-mob-griefing", piglinBypassMobGriefing);
|
||||
piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater);
|
||||
piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier);
|
||||
}
|
||||
|
||||
public boolean piglinBruteRidable = false;
|
||||
|
||||
Reference in New Issue
Block a user