@Override @SideOnly(Side.CLIENT) public void registerRenderers(@Nonnull IModObject modObject) { Item item = Item.getItemFromBlock(this); Map<IBlockState, ModelResourceLocation> locations = new DefaultStateMapper().putStateModelLocations(this); IBlockState state = getDefaultState().withProperty(IS_ON, true).withProperty(FACING, EnumFacing.UP); ModelResourceLocation mrl = locations.get(state); ModelLoader.setCustomModelResourceLocation(item, 0, mrl); }
@Override @SideOnly(Side.CLIENT) public void registerRenderers(@Nonnull IModObject modObject) { Item item = Item.getItemFromBlock(this); Map<IBlockState, ModelResourceLocation> locations = new DefaultStateMapper().putStateModelLocations(this); NNIterator<EnumDecoBlock> iterator = NNList.of(EnumDecoBlock.class).iterator(); while (iterator.hasNext()) { EnumDecoBlock type = iterator.next(); IBlockState state = getDefaultState().withProperty(EnumDecoBlock.TYPE, type); ModelResourceLocation mrl = locations.get(state); ModelLoader.setCustomModelResourceLocation(item, EnumDecoBlock.getMetaFromType(type), mrl); } }
@Override @SideOnly(Side.CLIENT) public void registerRenderers(@Nonnull IModObject modObject) { Item item = Item.getItemFromBlock(this); Map<IBlockState, ModelResourceLocation> locations = new DefaultStateMapper().putStateModelLocations(this); NNIterator<EnumDecoBlock> iterator = NNList.of(EnumDecoBlock.class).iterator(); while (iterator.hasNext()) { EnumDecoBlock type = iterator.next(); IBlockState state = getDefaultState().withProperty(EnumDecoBlock.TYPE, type).withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false); ModelResourceLocation mrl = locations.get(state); ModelLoader.setCustomModelResourceLocation(item, EnumDecoBlock.getMetaFromType(type), mrl); } }