Loader spawn position check

- The modded chunk generator hands VolmLib the bound loader for chunk-generation creature checks
- Each loader build tests its spawn position check: Forge and NeoForge fire MobSpawnEvent.PositionCheck and honor a denial, Fabric applies the vanilla rule and obstruction checks
This commit is contained in:
Brian Neumann-Fopiano committed 2026-09-29 03:56:40 -04:00
1 parent 92e5daa13e
commit 4da9661885
5 files changed
+167

No files matched your search

@@ -9,6 +9,9 @@ import art.arcane.volmlib.nativelib.minecraft26_2.modded.ModdedServerAccess;
import art.arcane.volmlib.nativelib.minecraft26_2.modded.ModdedServerLevels;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.EntitySpawnReason;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.level.ServerLevelAccessor;
import net.minecraft.world.level.block.state.BlockState;
import org.junit.Rule;
import org.junit.Test;
@@ -83,6 +86,11 @@ public class ModdedPlatformPathsTest {
public boolean canBreakBlock(ServerLevel level, ServerPlayer player, BlockPos position, BlockState state) {
return false;
}
@Override
public boolean checkSpawnPosition(Mob mob, ServerLevelAccessor level, EntitySpawnReason reason) {
return false;
}
});
}