Fix interact action not specifying entity id when originating from Lua
This commit is contained in:
parent
17c9664ee9
commit
d1e478b6ef
@ -541,11 +541,11 @@ open class WorldObject(val config: Registry.Entry<ObjectDefinition>) : TileEntit
|
|||||||
return InteractAction.NONE
|
return InteractAction.NONE
|
||||||
else if (result[0] is ByteString) {
|
else if (result[0] is ByteString) {
|
||||||
val decoded = (result[0] as ByteString).decode()
|
val decoded = (result[0] as ByteString).decode()
|
||||||
return InteractAction(InteractAction.Type.entries.firstOrNull { it.jsonName == decoded } ?: throw NoSuchElementException("Unknown interaction action type $decoded!"))
|
return InteractAction(InteractAction.Type.entries.firstOrNull { it.jsonName == decoded } ?: throw NoSuchElementException("Unknown interaction action type $decoded!"), entityID)
|
||||||
} else {
|
} else {
|
||||||
val data = result[0] as Table
|
val data = result[0] as Table
|
||||||
val decoded = (data[1L] as ByteString).decode()
|
val decoded = (data[1L] as ByteString).decode()
|
||||||
return InteractAction(InteractAction.Type.entries.firstOrNull { it.jsonName == decoded } ?: throw NoSuchElementException("Unknown interaction action type $decoded!"), 0, toJsonFromLua(data[2L]))
|
return InteractAction(InteractAction.Type.entries.firstOrNull { it.jsonName == decoded } ?: throw NoSuchElementException("Unknown interaction action type $decoded!"), entityID, toJsonFromLua(data[2L]))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user