Carpet

Carpet

2M Downloads

Fake player is unable to have food with /player use command

Over-There-Is opened this issue ยท 7 comments

commented

Minecraft version: 1.15.2
Since I'm not the operator, I don't know which version of fabric we're using.
Fake player is not able to have any food except cake.

commented

Try in 1.16.1?

commented

Not sure if you are doing that wrong, but you need to make him keep holding the use button, /player [name] use makes him use for one gametick, which isnt enough for eating, only cake.
Instead use /player [name] use continuous, which will make him keep holding down use button, untill you run /player [name] use again

commented

Neither continuous nor once doesn't work

commented

It worked for me in 1.15.2 (was carpet 1.3.x)

commented

well, did try with current 1.15.2 and it worked just fine. Verified with
/script run map(['health', 'hunger', 'saturation'],player('Steve')~_)

Pretty sure your server is either rocking some really old carpet version or one of the knockoff carpet brands.

commented

@gnembon
I can confirm this worked for me, however when I tried this with myself it did not work.
What I tried is:
/player [name] attack interval 16
/player [name] use conitnous - is more like quick repeat (click click click click) of the use command rather than holding it down.
So the player never eats. - My player only ate after I opened the chat window or opened the game to LAN and pressed ESC.
fabric-carpet-1.16-1.4.0+v200623

commented

Well, it doesn't work on connected client players since client is sending different information to the server (server makes you use item, but client says - I am not using). Properly implementing more complex item interactions on actual players and overriding signals that come from connected clients would be a significant work. That would be not only a lot of fanagling, but also lots of new code that needs to be maintained by someone across future updates, which I am not looking forward to.

Player actions are primarily intended for fake and shadowed players. The fact that some of them work on actual players is a miracle on its own.

Won't fix for now. Will look into it in the future when carpet is my primary job.