-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new item that contains only the necessary visual components … #3137
Conversation
…that can be destroyed when we change items. ( workaround to copying entities not really working as intended )
Hooray Jenkins reported success with all tests good! |
@@ -103,7 +100,7 @@ public void ensureHeldItemIsMountedOnLoad(OnChangedComponent event, EntityRef en | |||
CharacterHeldItemComponent characterHeldItemComponent = localPlayer.getCharacterEntity().getComponent(CharacterHeldItemComponent.class); | |||
if (characterHeldItemComponent != null) { | |||
// special case of sending in null so that the initial load works | |||
linkHeldItemLocationForLocalPlayer(characterHeldItemComponent.selectedItem, null); | |||
linkHeldItemLocationForLocalPlayer(characterHeldItemComponent.selectedItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment immediately above this now appears to be out of date.
@bbarker, this is the fix in question. |
@jellysnake thanks! I was able to cherry pick and merge this on top of 1.5.0 and it seems to run. I'd like to drop it in as a replacement to my existing stable/Launcher install of Tersalogy if possible for further testing (and fun). As I'm on Linux this looks to be under
They appear to be mislabeled in their filename; this was checked out from 1.5.0, but anyway, I suspect I should just copy |
Fixed it according to the mentioned issues. Now there shouldn't be any null warnings present and any module can add visual stuff to the item as long as the component implements |
Hooray Jenkins reported success with all tests good! |
@jellysnake @Cervator Cool, not a big deal but was thinking that might be the way to go about testing (and then making) a 1.5.1 release - correct me if I'm wrong. |
So we haven't really needed true hot fixes to past releases before, but maybe this would be an interesting experiment :-) I'm not sure what happened with those The game Launcher maintains two dirs: installs and data. Each version of the game it maintains gets its own, or at least its own install dir, I forget. The jars in the v1.5.0 dir there should be updated to make the game executed by the launcher use a hot fix like that. The install + data dir defaults are probably both under your home dir. To do a proper hot fix we'd branch off master or the v1.5.0 tag (same thing at the moment) to add a single commit to fix this on top. Interestingly that would produce v1.5.1 - which is also the current next release that would come out of I'd guess we would make such a branch then build, test, and release v1.5.1 (again pushing to Adhering to SemVer is fun! As to the actual bug at hand yay simplifying code. Although is introducing For the testing I can say things are better (again) - but unless my workspace is dusty I was still able to provoke it, just back down at 0,0,0 :-) After one reload, single player: And a second: I could also replicate it for the host in a server-client + client multiplayer session, but not for the client, and I expect headless would be entirely free from the issue. So we're back to about 99% fixed + merge-worthy IMHO. Unsure if it is worth doing a full round of hotfix release experimenting, although we rarely get such opportunities so maybe :-) TL;DR: Nearly fixed, happy to merge it, but wouldn't mind hearing a bit more feedback first |
Right, about that. Was too focused on the "not appear where you load" and not breaking inventory and stuff that I managed to forget about the core issue that brought this all up. If making a child interface isn't a good idea, we can always go back to manually doing everything, or if anyone has a better idea I'm open to suggestions. Will also think about what other cases might there be for child interfaces and how it might impact code. Certainly found my fair share of anomalies. Should have another update today to fix that, think I've found a reason for it existing but I'll investigate why the save system still wants to keep the item... |
I've submitted a fix that bypasses the issue with FP items still being saved. Still need to look into why they're saved in the first place, but that may be in an unrelated issue |
Hooray Jenkins reported success with all tests good! |
Poked about some more and couldn't find any issues. Yay! Maybe this one is finally done for good :-) Thanks @portokaliu and others! |
This should be a fix to #3126
I've reworked a bit of the system to use as few new entities as really needed. No more items will be lost and no objects floating in the world upon loading.
The downsides are: