Litematica (Forge)

Litematica (Forge)

336k Downloads

Noteblock pitch is not considered when marking blocks as incorrect.

maxicode2 opened this issue ยท 1 comments

commented

Minecraft version
Which Minecraft version are you playing on? 1.12.2 with LiteLoader 1.12.2 and Forge 14..23.5.2854

Mod version and malilib version
Litematica Version: 1.12.2-0.0.0-dev.20200615.020552
MaLiLib Version: 1.12.2-0.10.0-dev.31

Other mods
ChatTweaks 5.3.3 (LiteLoader)
MiniHUD 0.19.0-dev.20210614.021420 (LiteLoader)
Tweakeroo 0.10.0-dev.20210322.164728 (LiteLoader)

Mouse Tweaks 2.10 (Forge)
WorldEdit 6.1.10 (Forge)

Description of the bug
Litematica does not consider noteblock pitch when marking blocks as incorrect.

Expected behavior (if not clear from the description)
A clear and concise description of what you expected to happen.

To Reproduce (if not clear from the description already)
Steps to reproduce the behavior:

  1. Create a new world
  2. Place a noteblock and tune it to something other than the default note
  3. Save it as a schematic
  4. Load the schematic you just created
  5. Fill in the schematic manually (don't use paste)
  6. Schematica will consider the schematic complete even though the noteblock is not tuned to the correct note.
commented

This is an unfortunate issues in 1.12.2 and earlier MC versions, as none of the note block properties are in the block state before 1.13. The Litematica renderer only checks the block state when it checks whether or not it should render an overlay for the block. So all note blocks look identical to the renderer.

Fixing this would require adding a custom system for defining that certain blocks should also check the block entity data, and what properties from it they should check for. Furthermore the instrument is not even stored in the block entity data, but the note block simply checks the block underneath itself only when the note is being played.

So basically fixing this in 1.12 would require a bunch of kind of hacky extra checks to be added to the renderer. I'd rather not add such new systems, as I will then need to immediately rip them out again in the 1.13.2 port. But maybe if I just keep it simple and hard coded only for noteblocks directly in the renderer without adding a "proper" system for it at all... Then the change would be relatively small.

But also the server does not even sync the note to the client at all in the block entity data... So actually checking the note is not even possible (except for adding an even hackier thing for check the integrated server world if in single player). So all in all I think the benefit of adding this is not worth the additional hacky stuff that it would need, and it would not work in multiplayer anyway... And in 1.13.2+ it works as-is because all the data was moved properly to the block state properties.