-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tracking fixes, entity type, MM conversion (#20)
* Consider having prefabs as having components, fixes some old bugged entities * Add GearyEntityAddToWorldEvent, add migrators for swapping entity types or swapping to MythicMobs * Fix encoding components on chunk unload or server restart * Bump version
- Loading branch information
Showing
16 changed files
with
203 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...tlin/com/mineinabyss/geary/papermc/tracking/entities/events/GearyEntityAddToWorldEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.mineinabyss.geary.papermc.tracking.entities.events | ||
|
||
import com.mineinabyss.geary.datatypes.GearyEntity | ||
import com.mineinabyss.idofront.typealiases.BukkitEntity | ||
import org.bukkit.event.Event | ||
import org.bukkit.event.HandlerList | ||
|
||
|
||
/** | ||
* Called when a bukkit entity is added to the world and registered with Geary. | ||
* | ||
* Will avoid multiple calls like the Paper event currently does | ||
*/ | ||
class GearyEntityAddToWorldEvent( | ||
val gearyEntity: GearyEntity, | ||
val entity: BukkitEntity, | ||
) : Event() { | ||
companion object { | ||
@JvmStatic | ||
private val HANDLER_LIST = HandlerList() | ||
|
||
@JvmStatic | ||
fun getHandlerList() = HANDLER_LIST | ||
} | ||
|
||
override fun getHandlers() = HANDLER_LIST | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../entities/systems/AttemptSpawnListener.kt → ...tems/attemptspawn/AttemptSpawnListener.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.