From 86e28de0095847687f9ea91c8ebf01996a7dfdbc Mon Sep 17 00:00:00 2001 From: Thiakil Date: Tue, 9 Jul 2024 19:33:48 +0800 Subject: [PATCH] rename RegisterSpawnPlacementsEvent usages. Fixes #8156 --- .../impl/EntityTypeDeferredRegister.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/mekanism/common/registration/impl/EntityTypeDeferredRegister.java b/src/main/java/mekanism/common/registration/impl/EntityTypeDeferredRegister.java index 2c8d32dea79..3f821b08aa3 100644 --- a/src/main/java/mekanism/common/registration/impl/EntityTypeDeferredRegister.java +++ b/src/main/java/mekanism/common/registration/impl/EntityTypeDeferredRegister.java @@ -19,7 +19,7 @@ import net.minecraft.world.level.levelgen.Heightmap; import net.neoforged.bus.api.IEventBus; import net.neoforged.neoforge.event.entity.EntityAttributeCreationEvent; -import net.neoforged.neoforge.event.entity.SpawnPlacementRegisterEvent; +import net.neoforged.neoforge.event.entity.RegisterSpawnPlacementsEvent; import org.jetbrains.annotations.NotNull; public class EntityTypeDeferredRegister extends MekanismDeferredRegister> { @@ -39,12 +39,12 @@ public MekanismDeferredHolder, EntityType public MekanismDeferredHolder, EntityType> registerBasicPlacement(String name, Supplier> builder, Supplier attributes, SpawnPlacements.SpawnPredicate placementPredicate) { return register(name, builder, attributes, SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, placementPredicate, - SpawnPlacementRegisterEvent.Operation.AND); + RegisterSpawnPlacementsEvent.Operation.AND); } public MekanismDeferredHolder, EntityType> register(String name, Supplier> builder, Supplier attributes, @Nullable SpawnPlacementType placementType, @Nullable Heightmap.Types heightmap, - SpawnPlacements.SpawnPredicate placementPredicate, SpawnPlacementRegisterEvent.Operation placementOperation) { + SpawnPlacements.SpawnPredicate placementPredicate, RegisterSpawnPlacementsEvent.Operation placementOperation) { MekanismDeferredHolder, EntityType> entityTypeRO = register(name, builder, attributes); livingEntityPlacements.put(entityTypeRO, new SpawnPlacementData<>(placementType, heightmap, placementPredicate, placementOperation)); return entityTypeRO; @@ -81,7 +81,7 @@ private void registerEntityAttributes(EntityAttributeCreationEvent event) { } } - private void registerPlacements(SpawnPlacementRegisterEvent event) { + private void registerPlacements(RegisterSpawnPlacementsEvent event) { if (livingEntityPlacements == null) { Mekanism.logger.error("Entity Placements have already been set. This should not happen."); } else { @@ -96,9 +96,9 @@ private void registerPlacements(SpawnPlacementRegisterEvent event) { private record SpawnPlacementData(@Nullable SpawnPlacementType placementType, @Nullable Heightmap.Types heightmap, SpawnPlacements.SpawnPredicate predicate, - SpawnPlacementRegisterEvent.Operation operation) { + RegisterSpawnPlacementsEvent.Operation operation) { - private void register(SpawnPlacementRegisterEvent event, EntityType entityType) { + private void register(RegisterSpawnPlacementsEvent event, EntityType entityType) { event.register((EntityType) entityType, placementType, heightmap, predicate, operation); } }