I am a bit new of at this, I created a custom projectile that is based on the snowball class. However I can't see the icon at all, I am currently temporally wanting to use the snowball texture until I get someone to draw a texture for it. However the texture just doesn't appear for me.
I can tell the projectile is recognized by the server, as the bound box does show when enabling bounding boxs to show in debug screen, and it does damage entities it hits.
Have you registered the render in your client proxy? Your Client proxy should have these two lines in it:
"private final Minecraft mc = Minecraft.getMinecraft();" - Within the class, outside of the registerRenders method
"RenderingRegistry.registerEntityRenderingHandler(EntityProjectileSpell.class, new RenderProjectileSpell(mc.getRenderManager()));" - Within the registerRenders method
Alternately, you could just render it like a snowball:
RenderingRegistry.registerEntityRenderingHandler(EntityProjectileSpell.class, new RenderSnowball(mc.getRenderManager(), Items.YOURITEM, mc.getRenderItem()));
With this approach you just replace "Items.YOURITEM" with whatever you want, and that will get thrown. In the case of snowballs, it's just "Items.snowball"
Hmm, I already had the proxy set up correct. I did try it with the RenderSnowball just in case, and the snowball texture does in fact show, however this is not my desired behavior in the end, my RenderProjectileSpell would not have the same texture of my ItemSpell's texture.
If you look closely at Cookiehook's code, he's showing you how you can use RenderSnowball with YOUR item, not the snowball:
RenderingRegistry.registerEntityRenderingHandler(YourEntity.class, new RenderSnowball(mc.getRenderManager(), YourMod.YOURITEM, mc.getRenderItem()));
You can use that for ANY entity that uses an item texture for its rendering - no need to make your own render class unless you are doing something different.
I do plan on doing something different. The item itself is going to have one texture and the entity that it produces is going to have a different texture (that is not a texture from any item).
I also plan on eventually maybe making it do a few other things, such as change colors, when I get some more worked out on this mod.
I am a bit new of at this, I created a custom projectile that is based on the snowball class. However I can't see the icon at all, I am currently temporally wanting to use the snowball texture until I get someone to draw a texture for it. However the texture just doesn't appear for me.
I can tell the projectile is recognized by the server, as the bound box does show when enabling bounding boxs to show in debug screen, and it does damage entities it hits.
Here is the code I am using in my Render class: http://pastebin.com/hz6ccEdU
Have you registered the render in your client proxy? Your Client proxy should have these two lines in it:
"private final Minecraft mc = Minecraft.getMinecraft();" - Within the class, outside of the registerRenders method
"RenderingRegistry.registerEntityRenderingHandler(EntityProjectileSpell.class, new RenderProjectileSpell(mc.getRenderManager()));" - Within the registerRenders method
Alternately, you could just render it like a snowball:
RenderingRegistry.registerEntityRenderingHandler(EntityProjectileSpell.class, new RenderSnowball(mc.getRenderManager(), Items.YOURITEM, mc.getRenderItem()));
With this approach you just replace "Items.YOURITEM" with whatever you want, and that will get thrown. In the case of snowballs, it's just "Items.snowball"
I wager that will sort your problem
-Cookiehook
Check out my Youtube channel, where I build a theme park in vanilla Minecraft!
https://www.youtube.com/playlist?list=PLeCiIIOoWhe-mq3nYd_nXXrKw9MkjnUU7
Hmm, I already had the proxy set up correct. I did try it with the RenderSnowball just in case, and the snowball texture does in fact show, however this is not my desired behavior in the end, my RenderProjectileSpell would not have the same texture of my ItemSpell's texture.
If you look closely at Cookiehook's code, he's showing you how you can use RenderSnowball with YOUR item, not the snowball:
You can use that for ANY entity that uses an item texture for its rendering - no need to make your own render class unless you are doing something different.
I do plan on doing something different. The item itself is going to have one texture and the entity that it produces is going to have a different texture (that is not a texture from any item).
I also plan on eventually maybe making it do a few other things, such as change colors, when I get some more worked out on this mod.