MrCrayfish's Furniture Mod: Refurbished

MrCrayfish's Furniture Mod: Refurbished

22M Downloads

Fridge/ Freezer nbt incorrectly applied after picking Fridge with nbt

Quatryl23 opened this issue ยท 1 comments

commented

Describe the bug

If you apply nbt data to the Fridge block, for example by setting a loot table,
and then ctrl-middle-click that Fridge block, you recieve the Fridge block item.
If you place that in the world, however, the nbt data is applied to the Freezer block instead of the Fridge.
In the case of a loot table, the items appear in the Freezer inventory slots when right-clicking it.

To Reproduce

  1. Be in creative mode with cheats enabled.
  2. Place a Fridge.
  3. Execute /data merge block ~ ~-1 ~ {LootTable:"minecraft:chests/simple_dungeon"} while standing on top of the Fridge.
  4. Pick the fridge block by ctrl-middle-clicking it. The Fridge item will appear in your inventory with the +NBT tooltip.
  5. Place the picked item down. A Fridge will appear, but with the nbt data on the Freezer block.
  6. Open the freezer and see the items in there instead of the Fridge inventory, which you can check by opening the original Fridge block.

Expected behavior

The nbt data would correctly apply to the Fridge part of the multiblock-Fridge-construct and not the Freezer one.

Mod Version

1.0.14

Minecraft Version

1.20.1

Modloader

Forge

Crash Log (if applicable)

No response

Additional context

No response

commented

I think a possible solution to this would be adding an additional boolean field to the picked itemstack that saves if a Fridge or Freezer was middle-clicked to obtain the itemstack and to read this on placement to control if the nbt data belongs to the Fridge or the Freezer