mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 22:44:32 +00:00
Allow configuration of the zombie additional summoning mechanic. The vanilla mechanic is a little borked at times.
This commit is contained in:
1 parent
29606e2c39
commit
5f5b509c7a
2 files changed
+24
-1
No files matched your search
@@ -51,7 +51,7 @@ public class ForgeDummyContainer extends DummyModContainer implements WorldAcces
|
||||
public static boolean disableStitchedFileSaving = false;
|
||||
public static boolean forceDuplicateFluidBlockCrash = true;
|
||||
public static boolean fullBoundingBoxLadders = false;
|
||||
|
||||
public static double zombieSummonBaseChance = 0.1;
|
||||
public static int[] blendRanges = { 20, 15, 10, 5 };
|
||||
|
||||
public ForgeDummyContainer()
|
||||
@@ -145,6 +145,10 @@ public class ForgeDummyContainer extends DummyModContainer implements WorldAcces
|
||||
prop.comment = "Control the range of sky blending for colored skies in biomes.";
|
||||
blendRanges = prop.getIntList();
|
||||
|
||||
prop = config.get(Configuration.CATEGORY_GENERAL, "zombieBaseSummonChance", 0.1);
|
||||
prop.comment = "Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.";
|
||||
zombieSummonBaseChance = prop.getDouble(0.1);
|
||||
|
||||
if (config.hasChanged())
|
||||
{
|
||||
config.save();
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
--- ../src_base/minecraft/net/minecraft/entity/monster/EntityZombie.java
|
||||
+++ ../src_work/minecraft/net/minecraft/entity/monster/EntityZombie.java
|
||||
@@ -34,6 +34,7 @@
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
+import net.minecraftforge.common.ForgeDummyContainer;
|
||||
|
||||
public class EntityZombie extends EntityMob
|
||||
{
|
||||
@@ -70,7 +71,7 @@
|
||||
this.getEntityAttribute(SharedMonsterAttributes.followRange).setAttribute(40.0D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setAttribute(0.23000000417232513D);
|
||||
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setAttribute(3.0D);
|
||||
- this.getAttributeMap().func_111150_b(field_110186_bp).setAttribute(this.rand.nextDouble() * 0.10000000149011612D);
|
||||
+ this.getAttributeMap().func_111150_b(field_110186_bp).setAttribute(this.rand.nextDouble() * ForgeDummyContainer.zombieSummonBaseChance);
|
||||
}
|
||||
|
||||
protected void entityInit()
|
||||
Reference in new issue
Block a user