So I'm trying to get the player to interact with a trapdoor when it does not have a bucket in its inventory to try out player interaction with entities. only Entity.closest(arg) gives an error simply because closest is not a valid method as seen below.
Now my question is, how would one make a player interact with a certain entity in the way described above. Also I'm rather curious as to how one would implent the use of x and y coordinates so that there is no mistake, in the unlikley event of there being mutiple trapdoors, to which trapdoor the player has to interact with.
Cheers,
Chazler