Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I am tying to give a texture to an item , but it is not working .

I gave , with nearly the same code a texture to a block , it worked .

 

So here are my code : for the block

 

package traxys.infbow.block;

 

import cpw.mods.fml.common.registry.LanguageRegistry;

import traxys.infbow.InfinityBow;

import traxys.infbow.creativeTab.CreativeTabInfBow;

import traxys.infbow.lib.NameList;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraftforge.common.MinecraftForge;

 

public class HardWall extends Block{

 

public HardWall(int id) {

super(id, Material.rock);

this.setUnlocalizedName(NameList.HARD_WALL);

this.setCreativeTab(InfinityBow.tabInfBow);

this.setHardness(10.0F);

this.setResistance(2000.0F);

this.setTextureName("infbow:hardWall"); //<-------------------Texture given here

 

MinecraftForge.setBlockHarvestLevel(this, "pickaxe", 2);

 

}

 

}

 

 

 

For the Item :

 

package traxys.infbow.items;

 

import cpw.mods.fml.common.registry.LanguageRegistry;

import traxys.infbow.InfinityBow;

import traxys.infbow.lib.NameList;

import net.minecraft.item.Item;

 

public class Fletching extends Item{

 

public Fletching(int id) {

super(id);

this.setCreativeTab(InfinityBow.tabInfBow);

this.setUnlocalizedName(NameList.FLETCHING);

this.setTextureName("infbow:fletching"); //<----------------------------Texture given here

this.setMaxStackSize(16);

 

}

 

}

 

 

 

The folder path are src/minecraft/assets/infbow/textures/[items or blocks]

 

So Is there another function for items , or is it setTextureName() ?

If it is , how can I make it work ?

  • Author

Eclipse says taht the texture is missing , but there is a file in the folder

 

And exactly : "Using missing texture, unable to load: infbow:textures/items/fletching.png"

  • Author

Nevermind , the problm was that I did not refresh the prjocet in Eclispe :/

Guest
This topic is now closed to further replies.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.