Skip to content

Commit

Permalink
Prevent hirschgeists from spawning naturally within 300 blocks of ano…
Browse files Browse the repository at this point in the history
…ther hirschgeist
  • Loading branch information
itsmeow committed Jun 12, 2021
1 parent b83ebc9 commit 9ff511a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/dev/itsmeow/whisperwoods/init/ModEntities.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.MobEntity;
import net.minecraft.item.Items;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.Difficulty;
import net.minecraftforge.common.BiomeDictionary.Type;
import net.minecraftforge.eventbus.api.IEventBus;
Expand Down Expand Up @@ -70,6 +71,7 @@ public static void subscribe(IEventBus modBus) {

public static final EntityTypeContainer<EntityHirschgeist> HIRSCHGEIST = H.add(EntityHirschgeist.class, EntityHirschgeist::new, "hirschgeist", b -> b
.spawn(EntityClassification.CREATURE, 2, 1, 1)
.defaultPlacement((t, w, e, p, r) -> w.getEntitiesWithinAABB(EntityHirschgeist.class, new AxisAlignedBB(p).grow(300D)).size() == 0)
.egg(0xfffff, 0x00000)
.size(3F, 4F)
.biomes(Type.FOREST));
Expand Down

0 comments on commit 9ff511a

Please sign in to comment.