#Need help adding making block waxable

2 messages · Page 1 of 1 (latest)

glossy seal
#

Hey everyone I'm in the process of making some block waxable in my mod and found this bit of code in the HoneycombItem class with a list of the unwaxed to waxed blocks does anyone know how I could change that list without breaking other mods that add more waxable blocks ? Or is there a much better way to make block waxable? Thanks in advance ^^ (I shortened the list in the message for readability)

public static final Supplier<BiMap<Block, Block>> UNWAXED_TO_WAXED_BLOCKS = Suppliers.memoize(() -> { return ImmutableBiMap.builder().put(Blocks.COPPER_BLOCK, Blocks.WAXED_COPPER_BLOCK).put(Blocks.EXPOSED_COPPER, Blocks.WAXED_EXPOSED_COPPER).build(); }); public static final Supplier<BiMap<Block, Block>> WAXED_TO_UNWAXED_BLOCKS = Suppliers.memoize(() -> { return ((BiMap)UNWAXED_TO_WAXED_BLOCKS.get()).inverse(); });

dapper axle
#

Fabric API includes a helper for this.
OxidizableBlocksRegistry#registerWaxableBlockPair(unwaxed, waxed)