Jump to content

[SOLVED][1.10.2]Texture missing


HtLord

Recommended Posts

Hi there. I just try some tutorial on net and get some problems below.

 

 

1. As title, i have problem about item texture missing.

  (details behind.)

 

2. How am i suppose to know about the item mechanism ?

    (Item should be register in the first place.)

 

3. Where can i find APIs about Item, Block, GameRegistry , etc.

    (Minecraft Forge just provide a little of API.Or i just missing some?)

 

 

=========

 

 

As Q1

 

 

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: The following texture errors were found.

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]:  DOMAIN example

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: --------------------------------------------------

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]:  domain example is missing 1 texture

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]:    domain example has 1 location:

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]:      mod example resources at /Users/Huang/Java/minecraft_Forge/forge-1.10.2-12.18.1.2094-mdk/build/libs/modid-1.0.jar

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]:    The missing resources for domain example are:

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]:      textures/items/example_item.png

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: -------------------------

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]:    No other errors exist for domain example

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: ==================================================

[01:36:26] [Client thread/ERROR] [TEXTURE ERRORS]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

[01:36:29] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id

 

 

Photo of Project

(Btw, why can't i use <insert image>)

f0MJh

http://imgur.com/a/f0MJh

 

Main

[embed=425,349]

package com.htlord.example;

 

import com.example.proxy.CommonProxy;

 

import net.minecraftforge.fml.common.Mod;

import net.minecraftforge.fml.common.Mod.EventHandler;

import net.minecraftforge.fml.common.Mod.Instance;

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 = Main.MODID, name = Main.MODNAME, version = Main.VERSION)

public class Main {

 

    public static final String MODID = "example";

    public static final String MODNAME = "Htlord Mod!";

    public static final String VERSION = "0.0.1";

 

    @SidedProxy(clientSide="com.example.proxy.ClientProxy",

            serverSide="com.example.proxy.ServerProxy")

    public static CommonProxy proxy;

   

    @Instance

    public static Main instance = new Main();

 

    @EventHandler

    public void preInit(FMLPreInitializationEvent e) {

      this.proxy.preInit(e);

    }

 

    @EventHandler

    public void init(FMLInitializationEvent e) {

      this.proxy.init(e);

    }

 

    @EventHandler

    public void postInit(FMLPostInitializationEvent e) {

      this.proxy.postInit(e);

    }

}

[/embed]

 

CommonProxy

[embed=425,349]

package com.example.proxy;

 

import com.htlord.example.items.ModItems;

 

import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

 

public class CommonProxy {

 

    public void preInit(FMLPreInitializationEvent e) {

      ModItems.createItems();

    }

 

    public void init(FMLInitializationEvent e) {

 

    }

 

    public void postInit(FMLPostInitializationEvent e) {

 

    }

}

[/embed]

 

ClientProxy

[embed=425,349]

package com.example.proxy;

 

import com.example.render.ItemRenderRegister;

 

import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

 

public class ClientProxy extends CommonProxy{

 

  @Override

  public void preInit(FMLPreInitializationEvent e) {

      System.out.println("[info]Example Mod : start Pre-Init");

      super.preInit(e);

      System.out.println("[info]Example Mod : end Pre-Init");

  }

 

  @Override

  public void init(FMLInitializationEvent e) {

      System.out.println("[info]Example Mod : start Init");

      super.init(e);

      ItemRenderRegister.registerItemRenderer();

      System.out.println("[info]Example Mod : end Init");

 

  }

 

  @Override

  public void postInit(FMLPostInitializationEvent e) {

      System.out.println("[info]Example Mod : start Post-Init");

      super.postInit(e);

      System.out.println("[info]Example Mod : end Post-Init");

 

  }

 

}

[/embed]

 

BasicItem

[embed=425,349]

package com.htlord.example.items;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

 

public class BasicItem extends Item {

 

 

 

  public BasicItem() {

      super();

     

  }

 

  public BasicItem(String unloclizedName){

      super();

      this.setUnlocalizedName(unloclizedName);

      this.setCreativeTab(CreativeTabs.MATERIALS);

  }

 

}

[/embed]

 

ModItems

[embed=425,349]

package com.htlord.example.items;

 

import net.minecraft.item.Item;

import net.minecraftforge.fml.common.registry.GameRegistry;

 

public class ModItems {

  public static Item exampleItem;

 

  public static void createItems(){

      GameRegistry.registerItem(exampleItem = new BasicItem("example_item"), "example_item");

  }

}

[/embed]

 

example_item.json

[embed=425,349]

{

    "parent":"builtin/generated",

    "textures": {

        "layer0":"example:items/example_item"

    },

    "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 ]

        }

    }

}

[/embed]

Link to comment
Share on other sites

This is a bit off-topic, but also for your proxy classes, you use the System.out.println() to output into the console where you add in the [info] tags to your sysout statement. You (simply for syntax) should remove them and replace them with FMLLog.log() statements. These have better functionality as well as do various formatting to the out statements to the console. Look up pahimar letsmodreboot for more information on this, or just look at the FMLLog class.

Link to comment
Share on other sites

Also, you didn't include your ItemRenderRegister class, which may have been important.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.