Jump to content

Textures in Forge 1.8


Qunergy

Recommended Posts

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

 

Link to comment
Share on other sites

I hate to put down Mr. Crayfish, but I would recommend a total restart here. I started out with Mr. Crayfish too and got no farther than you did - an untextured purple and black cube. Plus, his turoials stop abruptly. I would recommend going and checking out Bedrock_Miner here: http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-8/

 

With his help, I now have a mod with many items, blocks, tools, armor sets, even a dimension and an entity (those last two needed some external research.)

Link to comment
Share on other sites

I hate to put down Mr. Crayfish, but I would recommend a total restart here. I started out with Mr. Crayfish too and got no farther than you did - an untextured purple and black cube. Plus, his turoials stop abruptly. I would recommend going and checking out Bedrock_Miner here: http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-8/

 

With his help, I now have a mod with many items, blocks, tools, armor sets, even a dimension and an entity (those last two needed some external research.)

Um ... thanks for the link !

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.