diff --git a/Common/src/main/java/net/potionstudios/biomeswevegone/world/entity/BWGEntities.java b/Common/src/main/java/net/potionstudios/biomeswevegone/world/entity/BWGEntities.java index f0ccee534..a4239999a 100644 --- a/Common/src/main/java/net/potionstudios/biomeswevegone/world/entity/BWGEntities.java +++ b/Common/src/main/java/net/potionstudios/biomeswevegone/world/entity/BWGEntities.java @@ -40,11 +40,11 @@ private static Supplier> createEntity(String id @SuppressWarnings("unchecked") public static void registerSpawnPlacements(Consumer> consumer) { - consumer.accept((SpawnPlacement) new SpawnPlacement<>(MAN_O_WAR, SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ManOWar::checkManOWarSpawnRules)); - consumer.accept((SpawnPlacement) new SpawnPlacement<>(ODDION, SpawnPlacementTypes.ON_GROUND, Heightmap.Types.WORLD_SURFACE, Oddion::checkOddionSpawnRules)); + consumer.accept((SpawnPlacement) new SpawnPlacement<>(MAN_O_WAR.get(), SpawnPlacementTypes.IN_WATER, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, ManOWar::checkManOWarSpawnRules)); + consumer.accept((SpawnPlacement) new SpawnPlacement<>(ODDION.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.WORLD_SURFACE, Oddion::checkOddionSpawnRules)); } - public record SpawnPlacement(Supplier> entityType, SpawnPlacementType spawnPlacementType, Heightmap.Types heightmapType, SpawnPlacements.SpawnPredicate predicate) {} + public record SpawnPlacement(EntityType entityType, SpawnPlacementType spawnPlacementType, Heightmap.Types heightmapType, SpawnPlacements.SpawnPredicate predicate) {} /** * Registers Entity Attributes diff --git a/Fabric/src/main/java/net/potionstudios/biomeswevegone/fabric/BiomesWeveGoneFabric.java b/Fabric/src/main/java/net/potionstudios/biomeswevegone/fabric/BiomesWeveGoneFabric.java index 6fa8a14a7..4022199d9 100644 --- a/Fabric/src/main/java/net/potionstudios/biomeswevegone/fabric/BiomesWeveGoneFabric.java +++ b/Fabric/src/main/java/net/potionstudios/biomeswevegone/fabric/BiomesWeveGoneFabric.java @@ -34,7 +34,7 @@ public static void initializeBiomesWeveGone(String initializedFrom) { BiomesWeveGone.init(); VanillaCompatFabric.init(); BWGEntities.registerEntityAttributes(FabricDefaultAttributeRegistry::register); - BWGEntities.registerSpawnPlacements((consumer) -> SpawnPlacements.register(consumer.entityType().get(), consumer.spawnPlacementType(), consumer.heightmapType(), consumer.predicate())); + BWGEntities.registerSpawnPlacements((consumer) -> SpawnPlacements.register(consumer.entityType(), consumer.spawnPlacementType(), consumer.heightmapType(), consumer.predicate())); BiomesWeveGone.commonSetup(); BiomesWeveGone.postInit(); ServerLifecycleEvents.SERVER_STARTING.register(BiomesWeveGone::serverStart); diff --git a/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/BiomesWeveGoneForge.java b/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/BiomesWeveGoneForge.java index 509db9a9c..16b274212 100644 --- a/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/BiomesWeveGoneForge.java +++ b/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/BiomesWeveGoneForge.java @@ -37,7 +37,7 @@ public BiomesWeveGoneForge(final FMLJavaModLoadingContext context) { MOD_BUS.addListener(this::onPostInitialize); EVENT_BUS.addListener(this::onServerStarting); MOD_BUS.addListener((EntityAttributeCreationEvent event) -> BWGEntities.registerEntityAttributes(event::put)); - MOD_BUS.addListener((SpawnPlacementRegisterEvent event) -> BWGEntities.registerSpawnPlacements((consumer) -> event.register(consumer.entityType().get(), consumer.spawnPlacementType(), consumer.heightmapType(), consumer.predicate(), SpawnPlacementRegisterEvent.Operation.OR))); + MOD_BUS.addListener((SpawnPlacementRegisterEvent event) -> BWGEntities.registerSpawnPlacements((consumer) -> event.register(consumer.entityType(), consumer.spawnPlacementType(), consumer.heightmapType(), consumer.predicate(), SpawnPlacementRegisterEvent.Operation.OR))); VanillaCompatForge.registerVanillaCompatEvents(EVENT_BUS); DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> BiomesWeveGoneClientForge.init(MOD_BUS)); LootModifiersRegister.register(MOD_BUS); diff --git a/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/BiomesWeveGoneNeoForge.java b/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/BiomesWeveGoneNeoForge.java index e4d1d4ad2..12d455e82 100644 --- a/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/BiomesWeveGoneNeoForge.java +++ b/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/BiomesWeveGoneNeoForge.java @@ -26,7 +26,7 @@ public BiomesWeveGoneNeoForge(final IEventBus eventBus) { eventBus.addListener(this::onPostInitialize); EVENT_BUS.addListener(this::onServerStarting); eventBus.addListener((EntityAttributeCreationEvent event) -> BWGEntities.registerEntityAttributes(event::put)); - eventBus.addListener((RegisterSpawnPlacementsEvent event) -> BWGEntities.registerSpawnPlacements((consumer) -> event.register(consumer.entityType().get(), consumer.spawnPlacementType(), consumer.heightmapType(), consumer.predicate(), RegisterSpawnPlacementsEvent.Operation.OR))); + eventBus.addListener((RegisterSpawnPlacementsEvent event) -> BWGEntities.registerSpawnPlacements((consumer) -> event.register(consumer.entityType(), consumer.spawnPlacementType(), consumer.heightmapType(), consumer.predicate(), RegisterSpawnPlacementsEvent.Operation.OR))); VanillaCompatNeoForge.registerVanillaCompatEvents(EVENT_BUS); LootModifiersRegister.register(eventBus); }