I would like to either create my own block and item based on BlockSkull and ItemSkull, so make use of the existing model and rendering, or, extend the vanilla classes? How can I do that?
I've tried creating the block and ItemBlock, but I hit problems like:
[17:22:28] [Client thread/ERROR] [FML]: Exception loading model for variant examplemod:myskull#facing=south,nodrop=false for blockstate "examplemod:myskull[facing=south,nodrop=false]"
net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model examplemod:myskull#facing=south,nodrop=false with loader VariantLoader.INSTANCE, skipping
The Minecraft and Forge source code is still too twisted for me to follow.
I've also tried:
GameRegistry.addSubstitutionAlias("minecraft:skull", GameRegistry.Type.BLOCK, mySkull);
but that didn't work. I even tried just aliasing sand but get this:
java.lang.RuntimeException: Duplicate stat id: "TranslatableComponent{key='stat.useItem', args=[TextComponent{text='[', siblings=[TextComponent{text='Sand', siblings=[], style=Style{hasParent=true, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=HoverEvent{action=SHOW_ITEM, value='TextComponent{text='{id:"minecraft:sand",Count:1b,Damage:0s}', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}'}, insertion=null}}, TextComponent{text=']', siblings=[], style=Style{hasParent=true, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=HoverEvent{action=SHOW_ITEM, value='TextComponent{text='{id:"minecraft:sand",Count:1b,Damage:0s}', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}'}, insertion=null}}], style=Style{hasParent=true, color=§f, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=HoverEvent{action=SHOW_ITEM, value='TextComponent{text='{id:"minecraft:sand",Count:1b,Damage:0s}', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}'}, insertion=null}}], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}" and "TranslatableComponent{key='stat.useItem', args=[TextComponent{text='[', siblings=[TextComponent{text='Sand', siblings=[], style=Style{hasParent=true, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=HoverEvent{action=SHOW_ITEM, value='TextComponent{text='{id:"minecraft:sand",Count:1b,Damage:0s}', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}'}, insertion=null}}, TextComponent{text=']', siblings=[], style=Style{hasParent=true, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=HoverEvent{action=SHOW_ITEM, value='TextComponent{text='{id:"minecraft:sand",Count:1b,Damage:0s}', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}'}, insertion=null}}], style=Style{hasParent=true, color=§f, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=HoverEvent{action=SHOW_ITEM, value='TextComponent{text='{id:"minecraft:sand",Count:1b,Damage:0s}', siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}'}, insertion=null}}], siblings=[], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}" at id stat.useItem.minecraft.sand
at net.minecraft.stats.StatBase.registerStat(StatBase.java:111) ~[forgeSrc-1.9.4-12.17.0.1976.jar:?]
I've also tried using forge-1.10.2-12.18.1.2011-mdk
Is it possible to either extend BlockSkull (and ItemSkull, TileEntitySkull), or, replace the vanilla classes with my customized classes?