Interface SpawnDetectionLogic
- All Known Implementing Classes:
AbstractDetectionLogic
,PartialDetectionLogic
,SimpleDetectionLogic
public interface SpawnDetectionLogic
Detection logic for replacement for when an entity spawns
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
The ID to be used for identification in the datapacksvoid
read
(com.google.gson.Gson context, com.google.gson.JsonElement element) Reads the data required from the datapack JSONboolean
shouldReplaceSpawn
(net.minecraftforge.event.entity.EntityJoinLevelEvent event) Checks if the spawn should be replaced
-
Method Details
-
getId
String getId()The ID to be used for identification in the datapacks- Returns:
- The unique ID
-
shouldReplaceSpawn
boolean shouldReplaceSpawn(net.minecraftforge.event.entity.EntityJoinLevelEvent event) Checks if the spawn should be replaced- Parameters:
event
- The spawn event
-
read
void read(com.google.gson.Gson context, com.google.gson.JsonElement element) Reads the data required from the datapack JSON- Parameters:
context
- The gsonelement
- The json element of the file
-