Document that player.get_main_inventory() will be nil while in remote view
Document that player.get_main_inventory() will be nil while in remote view
The current documentation seems to suggest that the only case where it can be nil is if the entity is not a player. But in my testing, it's also nil if you're looking at the map/remote view. This is unexpected (intuitively, why would player.get_main_inventory() not work just because the player is looking at the map?). So I would suggest documenting this.
Re: Document that player.get_main_inventory() will be nil while in remote view
There is an angle where this is a bug rather than a documentation issue. I think I sit in that angle
Re: Document that player.get_main_inventory() will be nil while in remote view
The only report is listed as "not a bug", you might consider trying your luck with an API request.PennyJim wrote: Thu Dec 19, 2024 2:33 pm There is an angle where this is a bug rather than a documentation issue. I think I sit in that angle
Re: Document that player.get_main_inventory() will be nil while in remote view
Bah :(
I can kind of understand it.. with a get physical inventory, I think I'd be more okay
I can kind of understand it.. with a get physical inventory, I think I'd be more okay
Re: Document that player.get_main_inventory() will be nil while in remote view
Personally, I think the current behavior makes sense. You don't have an inventory when in remote view. And I bet it would return nil for some other controllers too, like spectator. All of them should be documented.