Flower Butterfly Spawns inherits Forestry's configs constraints (#45)

This commit is contained in:
DrParadox7 authored and GitHub committed 2024-03-29 23:41:24 +01:00
1 parent 1a6e6b3c2c
commit 5409309b36
1 file changed
+2 -1
@@ -42,6 +42,7 @@ import forestry.api.genetics.IPollinatable;
import forestry.api.lepidopterology.IButterfly;
import forestry.api.lepidopterology.IButterflyNursery;
import forestry.lepidopterology.entities.EntityButterfly;
import forestry.plugins.PluginLepidopterology;
public class TileEntityFlower extends TileEntity implements IPollinatable, IButterflyNursery {
@@ -456,7 +457,7 @@ public class TileEntityFlower extends TileEntity implements IPollinatable, IButt
if (worldObj.rand.nextFloat() >= spawn.getGenome().getPrimary().getRarity() * 0.5f) {
return;
}
if (worldObj.countEntities(EntityButterfly.class) > 100) {
if (worldObj.countEntities(EntityButterfly.class) > PluginLepidopterology.spawnConstraint) {
return;
}
if (!spawn.canSpawn(worldObj, x, y, z)) {