BCLib/src/main/java/org/betterx/bclib/interfaces/SpawnRule.java
2022-05-18 23:56:23 +02:00

17 lines
572 B
Java

package org.betterx.bclib.interfaces;
import net.minecraft.core.BlockPos;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.MobSpawnType;
import net.minecraft.world.level.LevelAccessor;
@FunctionalInterface
public interface SpawnRule<M extends Mob> {
boolean canSpawn(EntityType<M> type,
LevelAccessor world,
MobSpawnType spawnReason,
BlockPos pos,
RandomSource random);
}