Open Moondarker opened 3 years ago
Versions prior to 1.16 also do a similar thing (for instance, MCP names, public static final Block BRICK_STAIRS = register("brick_stairs", new StairsBlock(BRICKS.getDefaultState(), Block.Properties.from(BRICKS)));
from circa 1.14), which I think is handled by this code (but I'm not 100% sure):
I'm not sure why that wouldn't be working now.
Whoops, I didn't notice that there was similar code in <=1.15, looks like they just made an abstract class and moved most of stuff previously done in class Block
to abstract class AbstractBlock
, including method /*Abstract*/Block.Properties.from(/*Abstract*/Block blockIn)
I'm not sure why wouldn't it work, signatures should look pretty similar, but again, I can only guess based on Burger's output and MCP-mapped Minecraft code :(
Since 1.16 some blocks are just inheriting things like hardness and blast resistance from parent blocks, some examples are:
brick_stairs ... AbstractBlock.Properties.from(BRICKS)
quartz_stairs ... AbstractBlock.Properties.from(QUARTZ_BLOCK)
cobblestone_wall ... AbstractBlock.Properties.from(COBBLESTONE)
granite_slab ... AbstractBlock.Properties.from(GRANITE)
gilded_blackstone ... AbstractBlock.Properties.from(BLACKSTONE)
Complete list of affected properties:
material, hardness, resistance, blocksMovement, ticksRandomly, lightLevel, blockColors, soundType, slipperiness, speedFactor, variableOpacity, isSolid, isAir, requiresTool
All these blocks lose inherited properties in burger output, I'd love to fix it myself, but I'm not experienced enough to make burger follow such method calls and extract parents properties :( Thanks for the great tools, Pokechu and contributors!