Core Mode-Change Bug
Mew2K opened this issue · comments
Issue Description: Whenever a core mode-change occurs on this map, the core's material does not get replaced with the designated block type. No errors/warnings are thrown to the console regarding this bug.
Map: Bamboo Valley III
Version: PGM-0.16-SNAPSHOT-8998d10d.jar
Video:
Minecraft.1.20.4.-.Multiplayer.3rd-party.Server.2024-05-22.19-27-35.mp4
Stack Trace: None
It looks like when the countdown for the mode change is up, the core module tries to replace the blocks by comparing the material data yielded by the block that exists there in the world against the material data yielded by the actual text provided in the map XML. The issue here seems to be in that the block data between the material data differs, and therefore PGM thinks the block is not an objective material and skips over it. As far as I can tell there is no way to supply meaningful block data via the XML definition so it ends up having a null BlockData, whereas the actual block has some meaningful non-null BlockData, so the MaterialData equals reports that the materialdatas are not equal. I'm not sure what the best way is to go about this but I've made it so in the equals implementation of the MaterialData, if either of the associated BlockData's are null it just compares the material only, treating the null
as "accept any blockdata from what is being compared against".