Interface SpawnDetectionLogic
- All Known Implementing Classes:
PartialDetectionLogic
,SimpleDetectionLogic
public interface SpawnDetectionLogic
Detection logic for replacement for when an entity spawns
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<SpawnDetectionLogic> -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<? extends SpawnDetectionLogic> codec()
Gets the codec for this detection logicboolean
shouldReplaceSpawn
(net.neoforged.neoforge.event.entity.EntityJoinLevelEvent event) Checks if the spawn should be replaced
-
Field Details
-
CODEC
-
-
Method Details
-
codec
com.mojang.serialization.MapCodec<? extends SpawnDetectionLogic> codec()Gets the codec for this detection logic- Returns:
- The codec
-
shouldReplaceSpawn
boolean shouldReplaceSpawn(net.neoforged.neoforge.event.entity.EntityJoinLevelEvent event) Checks if the spawn should be replaced- Parameters:
event
- The spawn event
-