I apologize for my bad English.
I've been programming for a long time © and decided to try to write something for MineCraft in Java (object-oriented programming >)). I wanted to add your own bow. Using this one lesson (
), I did everything just like in the video.
However, no matter how I tried to model and texture did not want to appear. In their place appeared a cube with chess texture (purple and black).
As I watched the information here (http://www.minecraftforge.net/forum/index.php?topic=24263.0 and http://www.wuppy29.com/minecraft/1-8-tutorial/updating-1-7-to-1-8-part-2-basic-items/#sthash.scik3Pfo.5cTYZKPv.dpbs), but it also has not produced any result.
What am i doing wrong?
OverMod.java (the main class)
package com.quantum.overworld;
import com.quantum.overworld.proxy.Server;
import com.quantum.overworld.weapon.Bow;
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 = ModInfo.MOD_ID, name = ModInfo.MOD_NAME, version = ModInfo.VERSION)
public class OverWorld
{
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY_CLASS, serverSide = ModInfo.SERVER_PROXY_CLASS)
public static Server proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
Bow.InitBow();
Bow.RegisterBow();
}
@EventHandler
public void init(FMLInitializationEvent event)
{
}
@EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
Bow.java
package com.quantum.overworld.weapon;
import com.quantum.overworld.ModInfo;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class Bow
{
public static Item IronBow;
public static Item GoldBow;
public static Item DiamondBow;
public static void InitBow()
{
IronBow = new Item().setUnlocalizedName("IronBow");
}
public static void RegisterBow()
{
GameRegistry.registerItem(IronBow, IronBow.getUnlocalizedName());
}
public static void RegisterRendersBow()
{
RegisterRenderBow(IronBow);
}
public static void RegisterRenderBow(Item item)
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(ModInfo.MOD_ID + ":" + "IronBow","inventory"));
}
}
Client.java:
package com.quantum.overworld.proxy;
import com.quantum.overworld.weapon.Bow;
public class Client extends Server
{
public void Client()
{
}
@Override
public void RegisterRendersBow()
{
Bow.RegisterRendersBow();
}
}
Server.java
package com.quantum.overworld.proxy;
public class Server
{
public void Server()
{
}
public void RegisterRendersBow()
{
}
}
ModInfo.java
package com.quantum.overworld;
public class ModInfo
{
public static final String MOD_ID = "ow";
public static final String MOD_NAME = "Over World";
public static final String VERSION = "1.0";
public static final String CLIENT_PROXY_CLASS = "com.quantum.overworld.proxy.Client";
public static final String SERVER_PROXY_CLASS = "com.quantum.overworld.proxy.Server";
}
IronBow.json:
{
"parent": "builtin/generated",
"textures": {
"layer0": "ow:items/IronBow"
},
"display": {
"thirdperson": {
"rotation": [-90, 0, 0],
"translation": [0, 1, -3],
"scale": [0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [0, -135, 25 ],
"translation": [0, 4, 2 ],
"scale": [1.7, 1.7, 1.7]
}
}
}
assets:
src/main/resources/assets/ow/models/item
src/main/resources/assets/ow/textures/items