Skip to content

Commit

Permalink
Fix mobs not loading their prefabs if only prefabs encoded (#19)
Browse files Browse the repository at this point in the history
* Bump geary

* Add workflow dispatch option for publish

* Consider having prefabs as having components, fixes some old bugged entities
  • Loading branch information
0ffz authored Dec 18, 2023
1 parent 8041b57 commit c378f29
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fun PersistentDataContainer.decodeComponents(): DecodedEntityData =

/** Verifies a [PersistentDataContainer] has a tag identifying it as containing Geary components. */
var PersistentDataContainer.hasComponentsEncoded: Boolean
get() = has(COMPONENTS_KEY, PersistentDataType.BYTE)
get() = has(COMPONENTS_KEY, PersistentDataType.BYTE) || has(PREFABS_KEY, PersistentDataType.BYTE_ARRAY)
set(value) {
when {
value -> if (!hasComponentsEncoded) set(COMPONENTS_KEY, PersistentDataType.BYTE, 1)
Expand Down

0 comments on commit c378f29

Please sign in to comment.