Well the thing is I'm not rendering it because someone has not yet answered my question. But here is my source code.
package com.christmasmod.init;
import com.christmasmod.items.ItemCandyCane;
import com.christmasmod.items.WeaponChristmasBatton;
import com.christmasmod.main.Reference;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class ModItems {
private static Item candyCane;
private static Item christmasBatton;
public static void init() {
candyCane = new ItemCandyCane();
christmasBatton = new WeaponChristmasBatton();
}
public static void register() {
GameRegistry.register(candyCane);
GameRegistry.register(christmasBatton);
}
public static void registerRenders() {
registerRender(candyCane);
registerRender(christmasBatton);
}
private static void registerRender(Item item) {
Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
.register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
}
}
package com.christmasmod.items;
import com.christmasmod.main.Reference;
import net.minecraft.item.ItemSword;
public class WeaponChristmasBatton extends ItemSword {
public WeaponChristmasBatton() {
super(ToolMaterial.DIAMOND);
setUnlocalizedName(Reference.EModItems.CHRISTMAS_BATTON.getUnlocalizedName());
setRegistryName(Reference.EModItems.CHRISTMAS_BATTON.getRegistryName());
setFull3D();
}
}
package com.christmasmod.proxies;
import com.christmasmod.init.ModItems;
public class ClientProxy implements IProxy {
@Override
public void init() {
ModItems.registerRenders();
}
}
package com.christmasmod.main;
import com.christmasmod.init.ModItems;
import com.christmasmod.proxies.IProxy;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MOD_ID, version = Reference.VERSION, acceptedMinecraftVersions = Reference.ACCEPTED_VERSIONS)
public class Main {
@SidedProxy(clientSide = Reference.CLIENT_SIDED_PROXY_CLASS, serverSide = Reference.SERVER_SIDED_PROXY_CLASS)
public static IProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
ModItems.init();
ModItems.register();
}
@EventHandler
public void init(FMLInitializationEvent event) {
proxy.init();
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
}
}
package com.christmasmod.main;
public class Reference {
public static final String MOD_ID = "christmasmod";
public static final String NAME = "Christmas Mod";
public static final String VERSION = "0.1";
public static final String ACCEPTED_VERSIONS = "[1.10]";
public static final String CLIENT_SIDED_PROXY_CLASS = "com.christmasmod.proxies.ClientProxy";
public static final String SERVER_SIDED_PROXY_CLASS = "com.christmasmod.proxies.ServerProxy";
public static enum EModItems {
CANDY_CANE("candyCane", "ItemCandyCane"),
CHRISTMAS_BATTON("christmasBatton", "WeaponChristmasBatton");
private String unlocalizedName;
private String registryName;
EModItems(String unlocalizedName, String registryName) {
this.unlocalizedName = unlocalizedName;
this.registryName = registryName;
}
public String getUnlocalizedName() {
return unlocalizedName;
}
public String getRegistryName() {
return registryName;
}
}
}
{
"textures": {
"texture0": "christmasmod:items/WeaponChristmasBatton0",
"texture1": "christmasmod:items/WeaponChristmasBatton1",
"particle": "christmasmod:items/WeaponChristmasBatton0"
},
"elements": [
{
"from": [ 8.0, 33.0, 7.0 ],
"to": [ 9.0, 40.0, 8.0 ],
"faces": {
"down": { "uv": [ 1, 13, 2, 14 ], "texture": "#texture0"},
"up": { "uv": [ 1, 10, 2, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 1, 1, 2, 8 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 1, 5, 8 ], "texture": "#texture0"},
"west": { "uv": [ 10, 1, 11, 8 ], "texture": "#texture0"},
"east": { "uv": [ 7, 1, 8, 8 ], "texture": "#texture0"}
}
},
{
"from": [ 8.0, 31.0, 7.0 ],
"to": [ 9.0, 32.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"up": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"west": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"east": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"}
}
},
{
"from": [ 7.0, 40.0, 7.0 ],
"to": [ 8.0, 41.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
},
{
"from": [ 8.0, 40.0, 8.0 ],
"to": [ 9.0, 41.0, 9.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
},
{
"from": [ 9.0, 40.0, 7.0 ],
"to": [ 10.0, 41.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
},
{
"from": [ 8.0, 32.0, 8.0 ],
"to": [ 9.0, 33.0, 9.0 ],
"faces": {
"down": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"up": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"west": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"east": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"}
}
},
{
"from": [ 7.0, 32.0, 7.0 ],
"to": [ 8.0, 33.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"up": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"west": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"east": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"}
}
},
{
"from": [ 8.0, 32.0, 6.0 ],
"to": [ 9.0, 33.0, 7.0 ],
"faces": {
"down": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"up": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"west": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"east": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"}
}
},
{
"from": [ 9.0, 32.0, 7.0 ],
"to": [ 10.0, 33.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"up": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"},
"west": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"east": { "uv": [ 4, 13, 5, 14 ], "texture": "#texture0"}
}
},
{
"from": [ 6.0, 41.0, 7.0 ],
"to": [ 7.0, 54.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"south":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"west": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"east": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"}
}
},
{
"from": [ 7.0, 41.0, 6.0 ],
"to": [ 8.0, 54.0, 9.0 ],
"faces": {
"down": { "uv": [ 9, 1, 10, 4 ], "texture": "#texture1"},
"up": { "uv": [ 10, 10, 11, 13 ], "texture": "#texture0"},
"north":{ "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"south":{ "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"west": { "uv": [ 4, 1, 7, 14 ], "texture": "#texture1"},
"east": { "uv": [ 4, 1, 7, 14 ], "texture": "#texture1"}
}
},
{
"from": [ 9.0, 41.0, 6.0 ],
"to": [ 10.0, 54.0, 9.0 ],
"faces": {
"down": { "uv": [ 9, 1, 10, 4 ], "texture": "#texture1"},
"up": { "uv": [ 10, 10, 11, 13 ], "texture": "#texture0"},
"north":{ "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"south":{ "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"west": { "uv": [ 4, 1, 7, 14 ], "texture": "#texture1"},
"east": { "uv": [ 4, 1, 7, 14 ], "texture": "#texture1"}
}
},
{
"from": [ 8.0, 40.0, 6.0 ],
"to": [ 9.0, 41.0, 7.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
},
{
"from": [ 8.0, 40.0, 6.0 ],
"to": [ 9.0, 41.0, 7.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
},
{
"from": [ 8.0, 41.0, 5.0 ],
"to": [ 9.0, 54.0, 6.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"south":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"west": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"east": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"}
}
},
{
"from": [ 8.0, 41.0, 9.0 ],
"to": [ 9.0, 54.0, 10.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"south":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"west": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"east": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"}
}
},
{
"from": [ 10.0, 41.0, 7.0 ],
"to": [ 11.0, 54.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"south":{ "uv": [ 13, 1, 14, 14 ], "texture": "#texture0"},
"west": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"},
"east": { "uv": [ 1, 1, 2, 14 ], "texture": "#texture1"}
}
},
{
"from": [ 8.0, 54.0, 6.0 ],
"to": [ 9.0, 55.0, 9.0 ],
"faces": {
"down": { "uv": [ 10, 10, 11, 13 ], "texture": "#texture0"},
"up": { "uv": [ 9, 1, 10, 4 ], "texture": "#texture1"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 9, 6, 12, 7 ], "texture": "#texture1"},
"east": { "uv": [ 9, 6, 12, 7 ], "texture": "#texture1"}
}
},
{
"from": [ 7.0, 54.0, 7.0 ],
"to": [ 8.0, 55.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
},
{
"from": [ 8.0, 55.0, 7.0 ],
"to": [ 9.0, 56.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
},
{
"from": [ 9.0, 54.0, 7.0 ],
"to": [ 10.0, 55.0, 8.0 ],
"faces": {
"down": { "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"up": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"north":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"south":{ "uv": [ 4, 10, 5, 11 ], "texture": "#texture0"},
"west": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"},
"east": { "uv": [ 7, 10, 8, 11 ], "texture": "#texture0"}
}
}
]
}
This is all the code that I have relative to the Christmas Baton weapon.