You are browsing as a guest. Sign up (or log in) to start making projects!

4h 58m 43s logged

Made some changes to how the mod works
Now the mod has two modes

if you want instant return then you have to enable immediate_respawn game rule
or else you will get the death screen telling you to return by death

there are now sfx added to the mod

////Rant
tell me why the hell does minecraft have 2 distinct playsound methods one in server and one in client???

only the client one playes the sound, the server one seemed to nothig and there is no java docs suggesting to use the one over the other and when to use what

I spent 1 hour 30 mins trying to figure this out and then had to resort to asking in the fabric server for help
luckly the community was extreamly helpfull and I fixed the issue

as for the reason why its done this way:
the server method is actually the main method but it does not play the sound for the sender, since its assuemed that the sender could be code or a thing that can’t hear sound

the same method in serverlevel which you get by senderPlayer.level().playSound(@nullable except entity, source entity, SoundEvent, soundevent, SoundCategory soundCategory);

calles two method, one for the sender since we know its the player ( this is a client method in LocalPlayer which extends the AbstractClientPlayer )

and the normal server method which runs for everyone except the sender

this is all fine but tell me why is this not documented

well now it is

0
7

Comments 0

No comments yet. Be the first!