Posted September 16, 20187 yr I've been working on a personal mod but I have a *very* basic understanding of Java, at this point in time I've been working on one issue for about 14 hours and have made no progress. I am trying to make a 'cube_column' block, but no idea where I'm going wrong. RockPillar.class Spoiler package com.fetrien.elypsis.blocks; import com.fetrien.elypsis.Main; import com.fetrien.elypsis.init.ModBlocks; import com.fetrien.elypsis.init.ModItems; import com.fetrien.elypsis.util.IHasModel; import net.minecraft.block.BlockRotatedPillar; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.util.EnumFacing; public class RockPillars extends BlockRotatedPillar implements IHasModel { public RockPillars(String name, Material material) { super(material); setUnlocalizedName(name); setRegistryName(name); setHarvestLevel("axe", 0); setHardness(2.0F); setSoundType(SoundType.STONE); setCreativeTab(CreativeTabs.BUILDING_BLOCKS); ModBlocks.BLOCKS.add(this); ModItems.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName())); this.setDefaultState(this.getDefaultState().withProperty(AXIS, EnumFacing.Axis.Y)); } @Override public void registerModels() { Main.proxy.registerItemRenderer(Item.getItemFromBlock(this), 0, "inventory"); } } modblocks.java (showing only parts that deal with block itself.) Spoiler import com.fetrien.elypsis.blocks.RockPillars; public static final Block CROSS_STONE_BLOCK = new RockPillars("cross_stone_block", Material.ROCK); Blockstates Spoiler { "variants": { "axis=y": { "model": "em:cross_stone_block" }, "axis=z": { "model": "em:cross_stone_block", "x": 90 }, "axis=x": { "model": "em:cross_stone_block", "x": 90, "y": 90 }, "axis=none": { "model": "em:cross_stone_block" } } } models/block.json Spoiler { "credit": "Model by Granny", "parent": "block/cube_column", "textures": { "end": "em:blocks/cross_stone_top", "side": "em:blocks/cross_stone_side" } } models/item.json Spoiler { "parent": "em:block/cross_stone_block", } Error has been resolved, thanks everyone Edited September 17, 20187 yr by Kaelym (solved)
September 16, 20187 yr Well... 1) Your blockstate file does not contain an inventory variant 2) You didn't show your ModelRegistryEvent Related: IHasModel is stupid and pointless (I will beat this out of you cargo cult programmers eventually). ALL items need models and all the information necessary to register a model is public. Code Style #3. Problematic Code #10. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
September 17, 20187 yr Author Thank you, I will keep this in mind while I continue my mod. Edited September 17, 20187 yr by Kaelym
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.