I am not sure how it cause issues with the CustomStateMapper working only for the first Block ID pedestal0.
It is common pre-init where a dynamic amount of pedestal blocks are created:
for (int i = 0; i < configuration.getInt("amountOfPedestals", Configuration.CATEGORY_GENERAL, 1, 0, Integer.MAX_VALUE, "The amount of pedestal multiplied by 16 that will be generated"); ++i) {
BRPedestal pedestal = new BRPedestal("pedestal" + i , buildingBlocks){
@Override
public void registerItem(IForgeRegistry<Item> itemIForgeRegistry) {
itemIForgeRegistry.register(new ItemBlock(this) {
@Override
public String getUnlocalizedName(ItemStack stack) {
return getUnlocalizedName() + "." + stack.getItemDamage();
}
}.setCreativeTab(buildingBlocks).setRegistryName(this.getRegistryName()).setHasSubtypes(true));
}
};
logger.printf(Level.INFO, "adding %s to pedestalList.", pedestal.getUnlocalizedName());
pedestalList.add(pedestal);
}
It is not like the configuration is supposed to change, between launches. It is intended for mod-pack/map making with specific purpose, creative blocks interacting with other mods about progression and, stuffs like that.
The number of pedestal blocks needed may var,y depending on: map or mod-pack rules. It indeed will not change between different runs of a game or map.
So I have a list containing all pedestal blocks pedestalList created during global pre-init:
BRPedestal pedestal = new BRPedestal("pedestal" + i , buildingBlocks)
...
pedestalList.add(pedestal);
It iterates this list in client-side pre-init after calling the global pre-init that is registering said blocks.
pedestalList.forEach((pedestal) -> {
To set a CustomStateMapper
ModelLoader.setCustomStateMapper(pedestal, new StateMap.Builder().ignore(BRPedestal.TYPE).build());
And my logger reports it is setting it for all pedestal block id pedestal0 and pedestal1 here.
But as it turns-out, the CustomStateMapper is not working for pedestal1.
I am fairly new to modding with Forge, I read through your comment about:
But really could not get it why, or how it causes CustomStateMapper not working for pedestal1 and above.