Skip to content

Conversation

@ItsDoot
Copy link
Member

@ItsDoot ItsDoot commented Jul 2, 2020

Adds value accessors for the following keys to Living:

  • ABSORPTION
  • ACTIVE_ITEM
  • EYE_HEIGHT
  • EYE_POSITION
  • FALL_DISTANCE
  • MAX_AIR
  • REMAINING_AIR
  • STUCK_ARROWS
  • WALKING_SPEED

@ItsDoot ItsDoot requested a review from gabizou as a code owner July 2, 2020 20:42
@ItsDoot ItsDoot changed the title [API-8] Add Living#eyeHeight and Living#eyePosition [API-8] Add missing entity value accessors Jul 3, 2020
@ItsDoot ItsDoot changed the title [API-8] Add missing entity value accessors [API-8] Add missing Living value accessors Jul 3, 2020
* {@link Keys#ACTIVE_ITEM}
* @return The active item, such as food being eaten
*/
default Value.Mutable<ItemStackSnapshot> activeItem() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabizou

Can you give some guidance on how the Values in these interfaces should be returned to consumers?

Like, should they always be Value.Mutable? Just Value? Does it depend on what it is returning and what you can do with it in the game?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am preferring they're always Mutable from entities. It does make sense that they are reflective of their Key variables, but at the end of the day, the developer is likely to want to mutate the value and maybe offer it back, or present it to another entity after mutation.

@ImMorpheus ImMorpheus added the api: 8 (u) version: 1.16 (unsupported since Oct 17th 2023) label Jul 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: 8 (u) version: 1.16 (unsupported since Oct 17th 2023)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants