Jump to content

Recommended Posts

Posted

First off thank you for deciding to take a look at my problem :)

 

I am currently trying to make a 3D rendered item.

It is just a simple one by one cube because I am just testing out the whole render thing before jumping into more complicated models.

After having managed to get the proxy registry right for it I am experiencing an error which is pretty embarrassing.

Every time I switch to the slot where my item is located I am getting a Texture not found type of error though I already tried every path combination possible.

In game the inventory slot icon is currently just a simple placeholder but the item is simply not showing up when held in hand.  :-\

I know that this problem may sound a little nooby but I have the strange feeling that this has nothing to do with the path error.

 

Well if you're still with me here's my code:

 

Main mod class:

package trunkS.mod;

import trunkS.mod.common.CommonProxyTrunkS;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPotion;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.src.BaseMod;
import net.minecraft.src.ModLoader;
import net.minecraft.world.World;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

import cpw.mods.fml.common.Mod;

@Mod(modid = "TrunkSMod", name = "TrunkS Mod", version = "Dev v1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class mod_Particles extends BaseMod
{
        //Creative Tabs
        public static CreativeTabs tabParticles = new CreativeTabParticles(CreativeTabs.getNextID(), "tabParticles");
       
        //Items
        public static Item particleWood = new ItemParticle(5001, "GhastSoul1").setCreativeTab(mod_Particles.tabParticles).setFull3D();
       
        //Proxys
        @SidedProxy(clientSide = "trunkS.mod.client.ClientProxyTrunkS", serverSide = "Tutorial.common.CommonProxyTrunkS")
        public static CommonProxyTrunkS proxy;
       
        @Init
        public void load()
        {
                //Loading Screen
                System.out.println("Loading TrunkS Particles Mod...");
                System.out.println("TrunkS Particles Mod loaded!");
               
                //Proxys
                proxy.registerRenderThings();
               
                GameRegistry.registerItem(particleWood, "woodParticle");
               
                //Name Registry
                LanguageRegistry.addName(particleWood, "Wood Particle");
               
        }
       
        public String getVersion()
        {
                return "Dev v1";
        }
       
}

 

Common Proxy:

package trunkS.mod.common;

public class CommonProxyTrunkS {

        public void registerRender(){
               
        }
}

 

Client Proxy:

package trunkS.mod.client;

import net.minecraftforge.client.MinecraftForgeClient;
import trunkS.mod.ItemRenderWoodParticle;
import trunkS.mod.mod_Particles;
import trunkS.mod.common.CommonProxyTrunkS;

public class ClientProxyTrunkS extends CommonProxyTrunkS {

        @Override
        public void registerRender(){
               
                MinecraftForgeClient.registerItemRenderer(mod_Particles.particleWood.itemID, new ItemRenderWoodParticle());
               
        }
       
}

 

ItemParticle Class:

package trunkS.mod;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
import net.minecraft.util.Icon;

public class ItemParticle extends Item
{
        private String iconPath;
       
        @SideOnly(Side.CLIENT)
        private Icon icon;
       
        public ItemParticle(int par1, String par2Str)
        {
                super(par1);
               
                this.iconPath = par2Str;
        }
       
        @SideOnly(Side.CLIENT)
        public void registerIcons(IconRegister par1IconRegister)
        {
                this.icon = par1IconRegister.registerIcon("modParticles/" + this.iconPath);
        }
       
        @SideOnly(Side.CLIENT)
        public Icon getIconFromDamage(int par1)
        {
                return this.icon;
        }
}

 

The Model Class:

package trunkS.mod;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
import net.minecraft.util.Icon;

public class ItemParticle extends Item
{
        private String iconPath;
       
        @SideOnly(Side.CLIENT)
        private Icon icon;
       
        public ItemParticle(int par1, String par2Str)
        {
                super(par1);
               
                this.iconPath = par2Str;
        }
       
        @SideOnly(Side.CLIENT)
        public void registerIcons(IconRegister par1IconRegister)
        {
                this.icon = par1IconRegister.registerIcon("modParticles/" + this.iconPath);
        }
       
        @SideOnly(Side.CLIENT)
        public Icon getIconFromDamage(int par1)
        {
                return this.icon;
        }
}

 

The Renderer Class:

package trunkS.mod;

import org.lwjgl.opengl.GL11;

import cpw.mods.fml.client.FMLClientHandler;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiContainerCreative;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.client.IItemRenderer;

public class ItemRenderWoodParticle implements IItemRenderer
{      
        protected ModelParticleMod particleModel;
       
        public ItemRenderWoodParticle()
        {
               
                particleModel = new ModelParticleMod();
               
        }
       

        @Override
        public boolean handleRenderType(ItemStack item, ItemRenderType type)
        {
                switch(type)
                {
                        case EQUIPPED: return true;
                        case ENTITY: return true;
                        default: return false;
                }

        }

        @Override
        public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
                        ItemRendererHelper helper)
        {

                return false;
        }

        @Override
        public void renderItem(ItemRenderType type, ItemStack item, Object... data)
        {

                switch(type)
                {
                case ENTITY:
                {
                        GL11.glPushMatrix();
                       
                        //This is were it should get its texture from
                        Minecraft.getMinecraft().renderEngine.bindTexture("/textures/items/modParticles/woodParticle");
                       
                        float scale = 6F;
                        GL11.glScalef(scale, scale, scale);
                       
                        particleModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
                       
                         FMLClientHandler.instance().getClient().renderEngine.resetBoundTexture();
                       
                        GL11.glPopMatrix();
                       
                }
                        case EQUIPPED:
                        {
                                GL11.glPushMatrix();

                                Minecraft.getMinecraft().renderEngine.bindTexture("/textures/items/modParticles/woodParticle");
                               
                                particleModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
                               
                                GL11.glPopMatrix();
                        }
                        default:
                                break;
                }
               
        }

}

 

And the error log:

2013-05-22 20:53:59 [information] [sTDERR] java.io.FileNotFoundException: /textures/items/modParticles/woodParticle
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.texturepacks.TexturePackDefault.func_98139_b(TexturePackDefault.java:42)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.texturepacks.TexturePackImplementation.func_98137_a(TexturePackImplementation.java:149)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.texturepacks.TexturePackImplementation.getResourceAsStream(TexturePackImplementation.java:169)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.renderer.RenderEngine.getTexture(RenderEngine.java:208)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.renderer.RenderEngine.bindTexture(RenderEngine.java:148)
2013-05-22 20:53:59 [information] [sTDERR]      at trunkS.mod.ItemRenderWoodParticle.renderItem(ItemRenderWoodParticle.java:74)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraftforge.client.ForgeHooksClient.renderEquippedItem(ForgeHooksClient.java:208)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.renderer.ItemRenderer.renderItem(ItemRenderer.java:89)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.renderer.ItemRenderer.renderItemInFirstPerson(ItemRenderer.java:505)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.renderer.EntityRenderer.renderHand(EntityRenderer.java:697)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1273)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:991)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:871)
2013-05-22 20:53:59 [information] [sTDERR]      at net.minecraft.client.Minecraft.run(Minecraft.java:760)
2013-05-22 20:53:59 [information] [sTDERR]      at java.lang.Thread.run(Unknown Source)

 

I guess this is it.

If you have any idea what the problem is, I'd be very thankful for helping me. ;)

And no my name is not inspired by DBZ ^^

Posted

shouldn't it be:

Minecraft.getMinecraft().renderEngine.bindTexture("/textures/items/modParticles/woodParticle.png");

?

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Posted

it DOES need the .png in the end, given your texture file should be a .png !

 

also, where did you put your texture file ? given of how you code it, your texture should be in

 

forge\mcp\src\minecraft\textures\items\modParticles

 

given from that > does the item render when you go out of first person mode ?

for first person view rendering, use

 

case  EQUIPPED_FIRST_PERSON:

Posted

Okey I've added a .png and the path now looks like this:

"/trunkS/mod/textures/items/woodParticle.png"

I created the textures/items folders and placed the texturemap in it realising that there was no textures/items folder

directly in the src/minecraft one ;D

Now I don't get errors any more but the items is still not showing up, wether in First- (I've added the EQUIPPED_FIRST_PERSON case) or Third-Person mode.

And no my name is not inspired by DBZ ^^

Posted

you dont have to unbind your texture.

and try adding these :

 

                GL11.glPushMatrix();
	Minecraft.getMinecraft().renderEngine.bindTexture(name);
	GL11.glScalef(3f, 3f,3f);
	GL11.glRotatef(0, 0.0f, 0.0f, 1.0f);
	GL11.glRotatef(0, 0.0f, 1.0f, 0.0f);
	GL11.glRotatef(-180, 1.0f, 0.0f, 0.0f);
	GL11.glTranslatef(0f,0f,0F);
                theItem.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);
                GL11.glPopMatrix();

Posted

No...still the same problem.

I also forgot to cast IItemRenderer to the ItemRenderWoodParticle class in the ClientProxy but that didn't change anything.

And no my name is not inspired by DBZ ^^

Posted

No the if I change the path to /mods it gives me a file not found error again.

And yes I'm using eclipse.

And no my name is not inspired by DBZ ^^

  • 2 weeks later...
Posted

I really don't know what's wrong. I still think there's something about the render registry...but I'm not sure.

Oh boy, hopefully there'll be a solution for this somewhere in the near future.

And no my name is not inspired by DBZ ^^

Posted

The complete path is:

mcp/src/minecraft/trunkS/mod/textures/items/woodParticle.png

(Starting from the actual forge folder)

And no my name is not inspired by DBZ ^^

Posted

I don't think the problem is your path anymore. I'm not sure how much I can help without seeing your model class. When you pasted your model class you actually just pasted your ItemParticle class again.

What catches my eye in your renderer class is

particleModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);

You have lots of zeros in there and without seeing what the method does in your model class I'm not sure if those zeros aren't making your model come up as a single point instead of a cube.

 

Assuming you did that right, go into your renderer class and go to one of your switch cases where you actually render your item. Add in some sort of print statement (if you can figure out where it prints: I haven't yet and it bugs me to no end) or add a set of statements that will result in an error: I make a small array and intentionally get an out of bounds error. If your statement prints/your game crashes when you have the item in the case you trapped, then you do know that it is being used, just not correctly. If it doesn't trigger, then you know that it isn't being used which would explain it not showing up.

 

Let us know if all of your rendering code is being run and send us your model class.

Read my thoughts on my summer mod work and tell me what you think!

http://www.minecraftforge.net/forum/index.php/topic,8396.0.html

 

I absolutely love her when she smiles

Posted
  On 6/6/2013 at 7:49 PM, redria7 said:

I don't think the problem is your path anymore. I'm not sure how much I can help without seeing your model class. When you pasted your model class you actually just pasted your ItemParticle class again.

What catches my eye in your renderer class is

particleModel.render((Entity)data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F);

You have lots of zeros in there and without seeing what the method does in your model class I'm not sure if those zeros aren't making your model come up as a single point instead of a cube.

 

Assuming you did that right, go into your renderer class and go to one of your switch cases where you actually render your item. Add in some sort of print statement (if you can figure out where it prints: I haven't yet and it bugs me to no end) or add a set of statements that will result in an error: I make a small array and intentionally get an out of bounds error. If your statement prints/your game crashes when you have the item in the case you trapped, then you do know that it is being used, just not correctly. If it doesn't trigger, then you know that it isn't being used which would explain it not showing up.

 

Let us know if all of your rendering code is being run and send us your model class.

Those 0s are supposed to be there; they're normally used for data relating to mobs that he doesn't need. What he's missing is the entity registry line in his mod file: EntityRegistry.registerModEntity(...);

BEWARE OF GOD

---

Co-author of Pentachoron Labs' SBFP Tech.

Posted

I guess I just solved the problem!?

Well, actually it solved itself.

There's some background info you need to know first: I changed the model (and texture) to a bigger one some time ago to see if it was the model class which was causing problems.

So when I changed it back while I was trying out some of the suggestions given here it just worked (And it's spaming: "I guess I just rendered!" to my console).

Because of the model beeing a bit tiny, I scaled it a little. But when I did so the model went up in the air relatively high.

Maybe this effect was even bigger the bigger my model was and maybe I just couldn't see anything because  the model was floating way above my head ^^.

Anyway thank you all for helping me out, you were really helpful.

Solved!

And no my name is not inspired by DBZ ^^

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • When i try to start minecraft forge 1.20.1 an error appears an the launcher shows the error 1, i don't know what's that :   "failed to initialize graphics window with current settings" "Timed out trying to setup the Game Window"
    • Also add the client log after trying to join  
    • We’ve got a fantastic deal for new users—just use the acw696499 Temu coupon code to unlock massive savings across Temu’s global marketplace. This code offers maximum benefits to shoppers in the USA, Canada, and major European countries. With the Temu coupon $100 off and Temu 100 off coupon code, you can enjoy generous discounts and exclusive offers. It’s your key to smart shopping without compromising on quality. What Is The Coupon Code For Temu $100 Off? Everyone loves a great deal, and Temu makes it even better with this limited-time offer. Whether you're a new or existing customer, the Temu coupon $100 off or $100 off Temu coupon is the real deal to watch. acw696499: Flat $100 off on your first purchase as a welcome bonus. acw696499: Access a $100 coupon pack with multiple-use options. acw696499: Exclusive $100 flat discount for new customers on sign-up. acw696499: Extra $100 promo code for existing customers. acw696499: Valid for all users in the USA and Canada for a $100 off coupon experience. Temu Coupon Code $100 Off For New Users In 2025 If you're just starting out with Temu, this deal is tailor-made for you. The Temu coupon $100 off and Temu coupon code $100 off are designed specifically to give new users an exceptional start. acw696499: Flat $100 discount for all new users. acw696499: Get a $100 coupon bundle instantly after registering. acw696499: Up to $100 coupon bundle usable over multiple orders. acw696499: Free shipping to 68 countries, making your first purchase even sweeter. acw696499: Enjoy an extra 30% off on any product as a first-time user. How To Redeem The Temu Coupon $100 Off For New Customers? Using the Temu $100 coupon and Temu $100 off coupon code for new users is easy: Download the Temu app or visit the Temu website. Register as a new user with your email or phone number. Go to the coupon section and enter code acw696499. Browse and add your favorite items to the cart. Apply the coupon at checkout to redeem your discount. Temu Coupon $100 Off For Existing Customers Temu doesn’t just stop at new users. Even returning shoppers can make the most of the Temu $100 coupon codes for existing users and Temu coupon $100 off for existing customers free shipping benefits. acw696499: $100 extra discount for existing Temu users. acw696499: Unlock a $100 coupon bundle for multiple purchases. acw696499: Get a free gift with express shipping throughout the USA and Canada. acw696499: Enjoy an extra 30% off on top of existing discounts. acw696499: Free shipping to 68 countries with no strings attached. How To Use The Temu Coupon Code $100 Off For Existing Customers? To use the Temu coupon code $100 off and Temu coupon $100 off code as an existing user: Log into your Temu account via app or website. Go to the ‘Coupons & Promotions’ section. Enter acw696499 in the coupon code box. Shop for your desired products. Apply the code during checkout to enjoy the savings. Latest Temu Coupon $100 Off First Order Your first order with Temu just got a whole lot more exciting. When you use the Temu coupon code $100 off first order, Temu coupon code first order, or Temu coupon code $100 off first time user, big savings await. acw696499: Flat $100 discount on your first order. acw696499: Activate your $100 Temu coupon code with ease. acw696499: Receive up to $100 worth of coupons for multiple purchases. acw696499: Enjoy free shipping across 68 countries. acw696499: Add 30% off on your first purchase. How To Find The Temu Coupon Code $100 Off? If you're searching for a Temu coupon $100 off or even a verified Temu coupon $100 off Reddit code, we’ve got you covered. Simply sign up for the Temu newsletter to get exclusive coupons straight to your inbox. You can also follow Temu’s official pages on Instagram, Facebook, or Twitter for surprise promo codes. For guaranteed and working coupons, visit any trusted coupon site—you’ll always find the best deals like acw696499 there. Is Temu $100 Off Coupon Legit? Yes, the Temu $100 Off Coupon Legit offer is 100% real. Our Temu 100 off coupon legit code—acw696499—has been tested and verified by thousands of users. You can safely use this code for $100 off on your first order and enjoy discounts on recurring purchases too. There’s no expiry date, and the code is valid globally. How Does Temu $100 Off Coupon Work? The Temu coupon code $100 off first-time user and Temu coupon codes 100 off offers work by instantly applying discounts to your cart. Once you sign up and apply the coupon code, Temu automatically adjusts the pricing to reflect your savings. Whether it’s a flat $100 off or a bundle, the discounts will apply across eligible items at checkout. How To Earn Temu $100 Coupons As A New Customer? To earn the Temu coupon code $100 off or 100 off Temu coupon code as a new customer, simply sign up on the Temu app or website. Enter the code acw696499 during registration or at checkout, and you’ll instantly unlock $100 worth of coupons. These can be applied over multiple orders, maximizing your benefits as a newcomer. What Are The Advantages Of Using The Temu Coupon $100 Off? The Temu coupon code 100 off and Temu coupon code $100 off offers bring many great benefits: $100 discount on the first order. $100 coupon bundle for multiple uses. Up to 70% discount on trending items. Extra 30% off for existing customers. Up to 90% off on selected categories. Free gift for new users. Free delivery to 68 countries. Temu $100 Discount Code And Free Gift For New And Existing Customers Using the Temu $100 off coupon code or $100 off Temu coupon code gives you unmatched savings and perks. Whether you’re a new or returning customer, you’ll love the benefits. acw696499: Enjoy a $100 discount on your very first order. acw696499: Get an extra 30% off on all purchases. acw696499: Free gift exclusively for new Temu users. acw696499: Up to 70% off across all product categories. acw696499: Free gift and free shipping in 68 countries, including the USA and UK. Pros And Cons Of Using The Temu Coupon Code $100 Off This Month Take advantage of the Temu coupon $100 off code and Temu 100 off coupon deals with these pros and cons: Pros: Massive $100 discount on eligible purchases. Works for both new and existing users. Stackable with other Temu offers. Valid in 68 countries worldwide. Comes with free shipping and gifts. Cons: Only valid through the app or website. May not apply to some sale items. Terms And Conditions Of Using The Temu Coupon $100 Off In 2025 Please read these Temu coupon code $100 off free shipping and latest Temu coupon code $100 off terms: Our coupon code acw696499 does not have an expiration date. The code is valid for both new and existing users. No minimum purchase is required to use this code. It applies across 68 countries worldwide. Free shipping and gifts are included. Final Note: Use The Latest Temu Coupon Code $100 Off Unlock unbeatable value with the Temu coupon code $100 off today. Whether you're new or returning, the savings are just one click away. Enjoy great deals, exclusive bundles, and premium products with our Temu coupon $100 off. Shop smart and save more every time. FAQs Of Temu $100 Off Coupon  Is the Temu $100 off coupon available to everyone? Yes, both new and existing users in supported countries can access the $100 off offer using code acw696499.  How can I ensure my Temu coupon works? Use a trusted and verified code like acw696499 and follow the redemption steps properly at checkout. Does the Temu $100 coupon expire? No, our exclusive code acw696499 has no expiration date and can be used anytime.  Can I combine the $100 coupon with other discounts? Yes, Temu allows coupon stacking, so you can combine acw696499 with other ongoing deals.  Is the Temu $100 off coupon valid worldwide? Absolutely. The acw696499 code is valid in 68 countries, including the USA, Canada, and Europe.
    • So I tried joining it, but they disconnect me immediately after it opens. Here's the log after closing the server: https://mclo.gs/5Bp0Mno
    • We have this Mc Server but some people aren't able to connect and are getting this error This is the Debug.log https://mclo.gs/EoekqaK 
  • Topics

×
×
  • Create New...

Important Information

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