Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
966 stars 545 forks source link

Inventory click error sometimes when edit a Programmable Android script #2634

Closed andris155 closed 3 years ago

andris155 commented 3 years ago

:round_pushpin: Description (REQUIRED)

Inventory click error sometimes when edit a Programmable Android script.

:bookmark_tabs: Steps to reproduce the Issue (REQUIRED)

  1. Open Android memory core.
  2. Click to > Back button.
Capture
  1. Cause sometime error.

:bulb: Expected behavior (REQUIRED)

No inventory click error.

:scroll: Server Log

https://pastebin.com/E2CHV80Z

:compass: Environment (REQUIRED)

[13:19:39 INFO]: Yatopia v1_16_R3 [13:19:39 INFO]: CS-CoreLib vDEV - 92 (git e9150d72) [13:19:39 INFO]: Slimefun vDEV - 766 (git 5aa5ca1a) [13:19:39 INFO]: Metrics build: #17 [13:19:39 INFO]: [13:19:39 INFO]: Installed Addons: (12) [13:19:39 INFO]: DyedBackpacks vDEV - 11 (git b8eda0c7) [13:19:39 INFO]: RestrictedCreative v2.4.4 [13:19:39 INFO]: ExtraTools vDEV - 23 (git 9299a65c) [13:19:39 INFO]: PomaExpansion vDEV - 10 (git 3f46213c) [13:19:39 INFO]: LiteXpansion vDEV - 100 (git cae4353e) [13:19:39 INFO]: SlimefunOreChunks vDEV - 10 (git 91df3b8e) [13:19:39 INFO]: HotbarPets vDEV - 32 (git 977f0591) [13:19:39 INFO]: EcoPower vDEV - 2 (git b0c0c875) [13:19:39 INFO]: ExtraGear vDEV - 12 (git 4570ea2c) [13:19:39 INFO]: SlimefunLuckyBlocks vDEV - 30 (git 26824119) [13:19:39 INFO]: FluffyMachines vDEV - 55 (git e54c1b54) [13:19:39 INFO]: SlimefunPomaFix v1.0-SNAPSHOT

TheBusyBiscuit commented 3 years ago

Please use pastebin...

andris155 commented 3 years ago

I updated to pastebin link.

WalshyDev commented 3 years ago

It seems like this is due to the android moving while the inventory is open, I believe what is happening is it's trying to get the inventory from the old block (before it moved) but obviously that does not exist anymore. I'm not exactly sure the best resolution for this. As far as I'm aware there isn't exactly a good way to find what android this was and it seems like it would be awkward and expensive anyway.

I guess we just need to close inv and say like "can't edit android while it's moving" or something?

For ref, this is the line: https://github.com/Slimefun/Slimefun4/blob/5aa5ca1aed4c8df5bfc56c70ceea112834da9a9d/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java#L492

@andris155 could you confirm that the android was moving?

AlexLander123 commented 3 years ago

It seems like this is due to the android moving while the inventory is open, I believe what is happening is it's trying to get the inventory from the old block (before it moved) but obviously that does not exist anymore. I'm not exactly sure the best resolution for this. As far as I'm aware there isn't exactly a good way to find what android this was and it seems like it would be awkward and expensive anyway.

I guess we just need to close inv and say like "can't edit android while it's moving" or something?

For ref, this is the line:

https://github.com/Slimefun/Slimefun4/blob/5aa5ca1aed4c8df5bfc56c70ceea112834da9a9d/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java#L492

@andris155 could you confirm that the android was moving?

The android would be paused while the script is being edited right? (As soon as you click on the Memory Core item)

andris155 commented 3 years ago

It seems like this is due to the android moving while the inventory is open, I believe what is happening is it's trying to get the inventory from the old block (before it moved) but obviously that does not exist anymore. I'm not exactly sure the best resolution for this. As far as I'm aware there isn't exactly a good way to find what android this was and it seems like it would be awkward and expensive anyway.

I guess we just need to close inv and say like "can't edit android while it's moving" or something?

For ref, this is the line:

https://github.com/Slimefun/Slimefun4/blob/5aa5ca1aed4c8df5bfc56c70ceea112834da9a9d/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/androids/ProgrammableAndroid.java#L492

@andris155 could you confirm that the android was moving?

Maybe yes. I don't know. Server players reported this error.