I tried to fix item rendering issues, but failed.

This commit is contained in:
modmuss50 2017-10-09 13:36:39 +01:00 committed by drcrazy
parent e0edff6891
commit c0fc388a01
2 changed files with 6 additions and 1 deletions

View file

@ -35,6 +35,7 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.ModelLoader;
import techreborn.blocks.cable.BlockCable;
import techreborn.blocks.cable.EnumCableType;
import techreborn.blocks.generator.solarpanel.EnumPanelType;
import techreborn.config.ConfigTechReborn;
import techreborn.init.ModBlocks;
import techreborn.init.ModItems;
@ -175,6 +176,10 @@ public class RegisterItemJsons {
registerBlockstateMultiItem(Item.getItemFromBlock(ModBlocks.CABLE), cableType.ordinal(), cableType.getName().toLowerCase(), "cable_inv");
}
for (EnumPanelType panelType : EnumPanelType.values()) {
registerBlockstate(Item.getItemFromBlock(ModBlocks.CABLE), panelType.ordinal(), panelType.getName().toLowerCase() + ",active=false", "blocks/generators/");
}
ModelLoader.setCustomStateMapper(ModBlocks.CABLE, new DefaultStateMapper() {
@Override
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {