OHakimen / MorePeripherals

Adds new peripherals for CC:Tweaked
MIT License
8 stars 2 forks source link

Beehive interface gets replaced by beehive (state issue) #26

Closed crazyvinvin closed 1 year ago

crazyvinvin commented 1 year ago

When calling collecthoney()on the beehive interface with a beehive connected, this replaces the beehive interface with a beehive. Looking at the java code I think what you're trying to do is to get a new hive with honey level set to 0 and replace the old one. However currently it's replacing the interface with a beehive. And the old beehive stays (with honey level 5).

Before: image

After: image

On our server we have 8 beehives wrapped on 8 different beehive interfaces. And when collecting honey from all of them only the first interface is replaced by a beehive (probably it is replaced everytime we collect honey from any beehive, not sure why it replaces the first interface and not the interface connected). This causes it to be able to collect infinite honey (because the others are not set to 0, which is the only condition to collect honey)

I also want to adress that the beehive that replaces the interface does NOT have the same bees inside that the old beehive did (so it doesn't copy those over). It should definitely keep all state properties, just change the honey level.

Kind Regards, Vincent MCS