chasing things down and this is what iv got so far and im still lost. Im not a complete noob to java or MC code but i am self taught and this may just be outside my grasp
public void _registerBlockWithCustomItem(Block block, ItemBlock iBlock, String registryname)
{
StateMapperBase b = new DefaultStateMapper();
BlockStateContainer bsc = block.getBlockState();
ImmutableList<IBlockState> values = bsc.getValidStates();
for(IBlockState state : values)
{
String str = b.getPropertyString(state.getProperties());
_registerBlockItemModelForMeta(block, block.getMetaFromState(state), str);
}
}
private void _registerBlockItemModelForMeta(Block block, int metadata, String variant) {
final Item item = blockItems.get(block);
if (item != null) {
_registerItemModelForMeta(item, metadata, variant);
}
}
private void _registerItemModelForMeta(Item item, int metadata, String variant) {
ModelResourceLocation res = new ModelResourceLocation(item.getRegistryName(), variant);
_registerItemModelForMeta(item, metadata, res);
}
private void _registerItemModelForMeta(Item item, int metadata, ModelResourceLocation modelResourceLocation) {
modelsToReg.add(new ModelRegistryObj(item, metadata, modelResourceLocation));
}
protected static class ModelRegistryObj {
final Item item;
final int meta;
final ModelResourceLocation resource;
public ModelRegistryObj(Item i, int m, ModelResourceLocation loc) {
item = i;
meta = m;
resource = loc;
}
}