squeek502 / AppleCore

An API for modifying the food and hunger mechanics of Minecraft
The Unlicense
55 stars 24 forks source link

Weird Incompatibility with Minestuck #128

Closed Darkmega18 closed 6 years ago

Darkmega18 commented 6 years ago

https://github.com/mraof/Minestuck/issues/169

As detailed here, a mechanic in minestuck that is essential to progress within it just magically stops working due to something in applecore or appleskin. It involves linking a pair of blocks together and using a special player mode called "edit mode" within it. however the button to be clicked to activate it's effects just fails to work at all while the mods are present. I'm putting this here in hopes that you can work with them to nut out the cause or put in some form of fix on either sides of you. Thanks.

squeek502 commented 6 years ago

From the Minestuck issue:

Since skin won't work without core

This isn't true. If you don't have other mods that do require AppleCore, then you can just remove AppleCore.

From taking a quick look at the Minestuck code, it's unclear how AppleCore could be interfering, though. Can you confirm that the bug happens with only Minestuck and AppleCore installed?

Darkmega18 commented 6 years ago

Roger. I'll whirl it up right now then.

Darkmega18 commented 6 years ago

HMMM. THIS MIGHT BE IT. (since running through curse I never had my console up like on technic until I went looking for it) (screenshot cause copying it from the MC console puts it in a big graph with formatting and stuff, and I don't want to have to pastebin something that small) applecore minestuck derp

I'm guessing something about the minestuck editmode player entity doesn't have food etc. Since you leave behind what is essentially a player dummy next to your computer when you go to edit mode someone's stuff. but you get kicked back to it if something nudges it away from the comp or damages it. but yes, that came up for all 8 times I clicked the button. :V

squeek502 commented 6 years ago

Ok, I see what's going wrong now, thanks for looking into it. Will have to think about how best to fix it.

EDIT: Talking to my future self:

Minestuck adds a FoodStats to its EntityDecoy, which gets updated here. AppleCore expects the player field to always be set after the a constructor is called (which is then used by getMaxHunger), which we can't rely on. We could only add the getMaxHunger stuff to the player constructor, not to the default. Past that, onUpdate would still fail because the player field is null, but we could set the player field from onUpdate in this case...?

Darkmega18 commented 6 years ago

always glad to help, good luck. :D

Darkmega18 commented 6 years ago

is this fixable from your side in a soonish timeframe? I'm hoping to test minestuck with a moderately large RPGish pack idea I've got in the works, but I can't give it a whirl make a start without this bug stopped. :< although I can test everything else in it in the meantime.

squeek502 commented 6 years ago

Should be able to get to it in the next few days.

Darkmega18 commented 6 years ago

Roger-roger, thanks. :D

kirderf1 commented 6 years ago

From my end, I suppose I could change the FoodStats initiation to handle any exceptions with just a warning message, and then proceed to not simulate the FoodStats at all, since it's not really a crucial part of the decoy simulation.

Darkmega18 commented 6 years ago

:o if that could be done quickly without much bother, by all means. this is kinda stifling my testing progress. T_T' if you meant simulate, can you just log ticks of how long a player stays in build mode then when you transfer back out of build mode you apply a hefty exhaustion to them upon switching back? rather than doing fancy stuff that seems to blow applecore here up?

kirderf1 commented 6 years ago

Oops, let's pretend that "t" was never there in the first place. Anyways, I'm not sure if everything would work as intended with that method (primarily looking at starvation damage), but it's still a decent way to work around the problem. Either way, the fix as I've described it has been implemented.

Darkmega18 commented 6 years ago

Ahh, the light at the end of the tunnel of this week which was quite busy. thats awesome @kirderf1 all fine now. HOWEVER, it's now giving me something else, but its not stopping edit mode from working atleast. but I'll send it through on the minestuck issues.