mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
And allow for tweaking baby chance as well.
This commit is contained in:
1 parent
5f5b509c7a
commit
de69b7dfd0
2 files changed
+14
No files matched your search
@@ -53,6 +53,7 @@ public class ForgeDummyContainer extends DummyModContainer implements WorldAcces
|
||||
public static boolean fullBoundingBoxLadders = false;
|
||||
public static double zombieSummonBaseChance = 0.1;
|
||||
public static int[] blendRanges = { 20, 15, 10, 5 };
|
||||
public static float zombieBabyChance = 0.05f;
|
||||
|
||||
public ForgeDummyContainer()
|
||||
{
|
||||
@@ -149,6 +150,10 @@ public class ForgeDummyContainer extends DummyModContainer implements WorldAcces
|
||||
prop.comment = "Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.";
|
||||
zombieSummonBaseChance = prop.getDouble(0.1);
|
||||
|
||||
prop = config.get(Configuration.CATEGORY_GENERAL, "zombieBabyChance", 0.05);
|
||||
prop.comment = "Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.";
|
||||
zombieBabyChance = (float) prop.getDouble(0.05);
|
||||
|
||||
if (config.hasChanged())
|
||||
{
|
||||
config.save();
|
||||
|
||||
@@ -17,3 +17,12 @@
|
||||
}
|
||||
|
||||
protected void entityInit()
|
||||
@@ -442,7 +443,7 @@
|
||||
|
||||
if (par1EntityLivingData1 == null)
|
||||
{
|
||||
- par1EntityLivingData1 = new EntityZombieGroupData(this, this.worldObj.rand.nextFloat() < 0.05F, this.worldObj.rand.nextFloat() < 0.05F, (EntityZombieINNER1)null);
|
||||
+ par1EntityLivingData1 = new EntityZombieGroupData(this, this.worldObj.rand.nextFloat() < 0.05F, this.worldObj.rand.nextFloat() < ForgeDummyContainer.zombieBabyChance, (EntityZombieINNER1)null);
|
||||
}
|
||||
|
||||
if (par1EntityLivingData1 instanceof EntityZombieGroupData)
|
||||
Reference in new issue
Block a user