MineColonies

MineColonies

53M Downloads

Lumberjack - Not saving cutting down tree correctly.

bob0bob opened this issue · 8 comments

commented

Minecolonies version

minecolonies-universal-1.12.2-0.8.6934

Expected behavior

If you go into the gui and select which tree to cut down. The gui appears to save the data correctly.

Actual behavior

But if you use the new "TOGGLE" button. It doesn't work. it is not sending message out to the server the data changes. So the building is not getting the new settings for each and every sapplings.
A loop for each settings should be processed and a message send for each one.

Also, if at one point you had a mod that put in new trees and then removed. On loading in new data, you should check because they get reverted to "AIR" and then if instance of air. Delete the item, meaning the item is gone from Minecraft.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

commented
commented

Ok. I've submitted the bug fixes for the Lumberjack building readFromNBT. It will read in the saving of what tree to cut now.

Also, Changed the world loading to check if the block doesn't exist any more of the sapling and if it doesn't then skip it. That way if a mod is removed you don't have "AIR" for tons of sapplings.

commented

Fixed in PR #2593

For what I did. The "TOGGLE" button still needs to send out a message to update the buildings on what has changed.

commented

Also, based on the code. It never reads in the NBT in BuildingLumberJack.
function readFromNBT. gets calls but first if of " if (treesToFell.isEmpty())" is never true. On Init of the class function "checkTreesToFell()" gets called that populates it based on minecraft. so the readFromNBT is not process because its not empty. An prevents the settings from loading.

Its a very simple fix for the readFromNBT. to solve. I'll submit code changes for this one.

This "TOGGLE" button still needs work. Don't know who did this one, but should be fixed. I'm not sure you want to send out 1000+ messages to do an update or have a new messages that stores them all in one and send out one message. That is what I would do. This is why I'm not going to fix it. Let who ever is working on this decide how it should be done.

commented

@bob0bob can we close this?

commented

That is something @Raycoms said they would fix. I fixed the individual checkbox but the "All" checkbox does nothing. It really should be disable until @Raycoms has time to correct his addition.

commented

This is still an issue in minecolonies-1.12.2-0.9.127-ALPHA-universal.jar. If I toggle by itself to turn everything off it doesn't work. I have to toggle and then turn something on to have it save. Should I be expecting that @bob0bob ?

It's not a huge deal as that would be what you'd normally do but I was trying to use it as a way to stop the lumberjack from doing any work.

commented

should be done