package info.u_team.u_team_test.init;

import info.u_team.u_team_test.entity.TestLiving;
import net.minecraft.world.entity.SpawnPlacements;
import net.minecraft.world.level.levelgen.Heightmap;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;

public class TestSpawnPlacementRegistries {
	
	private static void setup(FMLCommonSetupEvent event) {
		event.enqueueWork(() -> {
			SpawnPlacements.register(TestEntityTypes.TEST_LIVING.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, TestLiving::checkTestLivingSpawnRules);
		});
	}
	
	public static void registerMod(IEventBus bus) {
		bus.addListener(TestSpawnPlacementRegistries::setup);
	}
	
}

@@ -221,25 +221,43 @@
 vent
-bus.api.I
+.entity.SpawnPlacementRegister
 Event
-Bus
 ;%0Aim
@@ -284,47 +284,108 @@
 rge.
-fml.
 event.
-lifecycle.FMLCommonSetup
+entity.SpawnPlacementRegisterEvent.Operation;%0Aimport net.minecraftforge.eventbus.api.I
 Event
+Bus
 ;%0A%0Ap
@@ -454,89 +454,61 @@
 oid 
-setup(FMLCommonSetupEvent event) %7B%0A%09%09event.enqueueWork(() -%3E %7B%0A%09%09%09SpawnPlacem
+register(SpawnPlacementRegisterEvent event) %7B%0A%09%09ev
 ent
-s
 .reg
@@ -664,14 +664,22 @@
 ules
-);%0A%09%09%7D
+, Operation.OR
 );%0A%09
@@ -783,13 +783,16 @@
 es::
-setup
+register
 );%0A%09

Use event in test mod for spawn placement registry