Animania Cats & Dogs

Animania Cats & Dogs

454k Downloads

Client decides what to put in trough

Tschipp opened this issue ยท 8 comments

commented

From @zerotiger on October 16, 2017 2:0

When I change the config "troughFood", on clientside I am able to put that into a trough on a server (Only tested on my own dedicated server)
This means that if a client adds "minecraft:stone", they will be able to put stone into any trough on any server, not matter the config of the server. At least that is the conclusion I made after trying a few different things.

Copied from original issue: capnkirok/animania#391

commented

From @zerotiger on October 16, 2017 2:4

The reason I encountered this was because I wanted to see if I could change the serverside config on my server, in-game on the client. When it worked, I was skeptical if it actually worked or something was wrong with the trough.
I tried changing the config clientside and then joining the server afterwards. I was still able to put whatever, I had to chosen into the the trough and the serverside config had not been updated, when I checked it.

commented

From @zerotiger on October 16, 2017 2:7

I should also ask, is there a way to change the Animania settings in-game on a server?

commented

Ah, interesting. Yeah thanks for exposing this, it really could be that the check is only client side.

commented

From @capnkirok on March 19, 2018 22:0

@Tschipp this one is for you

commented

From @zerotiger on March 19, 2018 23:16

I don't think the client should even be doing any checks, unless the config is synchronized. It should just send a request packet and the server should do the checks.
At least, that's what I think

commented

The item may appear in the trough, but it actually isn't. Only on the client.

commented

Isn't that still an issue?

commented

Not really and there's nothing I can do about it. I can't just handle item insertion on the server, because if the server has more items in the config, those wouldn't show up to the client as valid items. Also, no items can ever be duplicated.