Skip to content

Items in FD specific containers do not transfer NBT data to Data Components #1262

@ChrysanthCow

Description

@ChrysanthCow

Minecraft version

1.21.1

Farmer's Delight version

1.2.1

NeoForge version

21.1.221

Description

Original Issue

Original Issue Description (Written by @Unariginal)
When upgrading our server to 1.21.1 from 1.20.1, all items stack counts, enchantments, and shulker contents have been erased from Cabinets in the world. Both for every compat cabinets and built-in farmer's delight cabinets.

This would also affect Cooking Pots and any other block entity that may contain items.

Quote from @Patbox

Assuming all itemstacks are stored in Items nbt field, you could use vanilla transform for this.
The code for defining layout of block entities is relatively simple, so here's mine for reference: https://github.com/Patbox/PolyDecorations/blob/master/src/main/java/eu/pb4/polydecorations/mixin/datafixer/Schema1460Mixin.java

Worth noting this will only allow data fixing of container data on version upgrades.
This would also apply to any other data change mojang does in future.

Steps to reproduce

  1. Load into a Farmer's Delight world on 1.20.1
  2. Place items inside a FD specific container.
  3. Reload the world jn 1.21.1.
  4. Witness item loss.

Mod list

I'll have to get you a modlist as soon as I test this on a minimal instance. The original find was on Refabricated which makes this irrelevant.

Logs

No response

Minimal instance

  • I have tested this on a minimal instance

Performance and shader mods

  • I am using performance or shader mods

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedLooking for contributors to help with this

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions