mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Shulker spawn from bullet options
(0 - 1) / 5.0 = -0.2 (can never happen because self is included in count) (1 - 1) / 5.0 = 0.0 1.0 - 0.0 = 1.0 100% (just self) (2 - 1) / 5.0 = 0.2 1.0 - 0.2 = 0.8 80% (1 other shulker) (3 - 1) / 5.0 = 0.4 1.0 - 0.4 = 0.6 60% (2 other shulkers) (4 - 1) / 5.0 = 0.6 1.0 - 0.6 = 0.4 40% (3 other shulkers) (5 - 1) / 5.0 = 0.8 1.0 - 0.8 = 0.2 20% (4 other shulkers) (6 - 1) / 5.0 = 1.0 1.0 - 1.0 = 0.0 0% (5 other shulkers) (7 - 1) / 5.0 = 1.2 1.0 - 1.2 = -0.2 0% (6 other shulkers)
This commit is contained in:
committed by
granny
parent
d760f5436f
commit
e09623ae80
@@ -1985,6 +1985,11 @@ public class PurpurWorldConfig {
|
||||
public double shulkerMaxHealth = 30.0D;
|
||||
public double shulkerScale = 1.0D;
|
||||
public boolean shulkerTakeDamageFromWater = false;
|
||||
public float shulkerSpawnFromBulletBaseChance = 1.0F;
|
||||
public boolean shulkerSpawnFromBulletRequireOpenLid = true;
|
||||
public double shulkerSpawnFromBulletNearbyRange = 8.0D;
|
||||
public String shulkerSpawnFromBulletNearbyEquation = "(nearby - 1) / 5.0";
|
||||
public boolean shulkerSpawnFromBulletRandomColor = false;
|
||||
private void shulkerSettings() {
|
||||
shulkerRidable = getBoolean("mobs.shulker.ridable", shulkerRidable);
|
||||
shulkerRidableInWater = getBoolean("mobs.shulker.ridable-in-water", shulkerRidableInWater);
|
||||
@@ -1997,6 +2002,11 @@ public class PurpurWorldConfig {
|
||||
shulkerMaxHealth = getDouble("mobs.shulker.attributes.max_health", shulkerMaxHealth);
|
||||
shulkerScale = Mth.clamp(getDouble("mobs.shulker.attributes.scale", shulkerScale), 0.0625D, Shulker.MAX_SCALE);
|
||||
shulkerTakeDamageFromWater = getBoolean("mobs.shulker.takes-damage-from-water", shulkerTakeDamageFromWater);
|
||||
shulkerSpawnFromBulletBaseChance = (float) getDouble("mobs.shulker.spawn-from-bullet.base-chance", shulkerSpawnFromBulletBaseChance);
|
||||
shulkerSpawnFromBulletRequireOpenLid = getBoolean("mobs.shulker.spawn-from-bullet.require-open-lid", shulkerSpawnFromBulletRequireOpenLid);
|
||||
shulkerSpawnFromBulletNearbyRange = getDouble("mobs.shulker.spawn-from-bullet.nearby-range", shulkerSpawnFromBulletNearbyRange);
|
||||
shulkerSpawnFromBulletNearbyEquation = getString("mobs.shulker.spawn-from-bullet.nearby-equation", shulkerSpawnFromBulletNearbyEquation);
|
||||
shulkerSpawnFromBulletRandomColor = getBoolean("mobs.shulker.spawn-from-bullet.random-color", shulkerSpawnFromBulletRandomColor);
|
||||
}
|
||||
|
||||
public boolean silverfishRidable = false;
|
||||
|
||||
Reference in New Issue
Block a user