hi there! i'm currently attempting to mixin into PlayerEntity, in order to change findRespawnPosition's return value to just be the player's current position, or their last death position, which should be the same
this is what i've got so far
i reckon i have to do something regarding Optional but i'm honestly not sure what or how
#Change respawn position to player's current position/last death position
1 messages · Page 1 of 1 (latest)
!!mixinthis PlayerEntity
((PlayerEntity) (Object) this)
This can be used to pass in this to a method that requires a PlayerEntity as a parameter.
A @Shadow should be used to access methods and fields of PlayerEntity, but ((PlayerEntity) (Object) this) can be used to get access to public methods and fields and should be used in limitation.
right, so should i use ((PlayerEntity) (Object) this) regardless?