Skip to content

Fix floppy disk in drive not restoring visually in-world on reload - #64

Merged
RobertCochran merged 1 commit into
PC-Logix:main-MC1.21.1from
RobertCochran:fix-missing-floppy-visual
Aug 22, 2026
Merged

Fix floppy disk in drive not restoring visually in-world on reload#64
RobertCochran merged 1 commit into
PC-Logix:main-MC1.21.1from
RobertCochran:fix-missing-floppy-visual

Conversation

@RobertCochran

Copy link
Copy Markdown
Collaborator

Attempts to fix an issue where the floppy disk does not visually restore in-world on disk drive reload (save+quit, server relog, etc).

Comment on lines -146 to -156
override def loadForClient(nbt: CompoundTag, provider: HolderLookup.Provider): Unit = {
super.loadForClient(nbt, provider)
if (nbt.contains(DiskTag)) {
setItem(0, ItemStack.parseOptional(provider, nbt.getCompound(DiskTag)))
}
}

override def saveForClient(nbt: CompoundTag, provider: HolderLookup.Provider): Unit = {
super.saveForClient(nbt, provider)
if (!items(0).isEmpty) nbt.setNewCompoundTag(DiskTag, _ => items(0).save(provider))
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like these specialization methods were causing conflicts on world save/load? Removing them and just directly propagating to super.{load,save}ForClient() seems to have fixed the visual issue with no notice of any breakage based on my handful of minutes testing.

@RobertCochran
RobertCochran merged commit b66d95e into PC-Logix:main-MC1.21.1 Aug 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant