• 0

    posted a message on Texture Artists Needed For My Mod(Credit Will Be Provided)
    I need a texture artist to texture a few things for my mod.
    The first one to complete it and post the texture file download link will win credit and i'll make a block/item for them.

    Things I Need Currently:
    1. A Jungle Door
    2. A Birch Door
    3. A Spruce Door
    (NOTE DO NOT MAKE THE DOORS THE LOG TYPES!)



    Thanks!

    Cheers,
    SuperBrea

    I will stop taking textures after: 9/13/2013 At 10:00 p.m Eastern time zone!
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2][SOLVED][Forge]Getting an entity to render as an Item
    Quote from 0mn1potent

    At the beginning of the topic you posted in your Main.class:
    EntityRegistry.registerModEntity(EntityGrenade.class, "Grenade", 1, this, 64, 10, true);


    I think the itemID you passed in is causing problems. I did the same thing to an item in my code and got the exact same error (and now it's stuck that way lol). Try changing it to something higher, yet still below 128, or better yet use EntityRegistry.findGlobalUniqueEntityId() in place of the 1. Start a new world and hopefully that will work.



    Ahh I found the problem, for the null pointer exception.

    The Client Proxy loaded before the grenade item, so when it rendered it didn't know that the grenade was loaded and ready so it returned null. So I fixed it by making it render AFTER the item loaded. Thanks for your help Omn1potent!
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2][SOLVED][Forge]Getting an entity to render as an Item
    Ok thanks i'll try it.
    I'll be sure to update you about if it worked or not ;p!

    Cheers,
    SuperBrea
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2][SOLVED][Forge]Getting an entity to render as an Item
    Quote from 0mn1potent

    Where you have
    @Init
    grenade = new ItemGrenade(GRENADE_ITEM_ID).setUnlocalizedName("BreaTech:grenade");

    does the @Init stand for it being declared in your Init() method? Because the new way to do preInit, init, and postInit is using @EventHandler and FMLInitializationEvents. Otherwise your method will never be called and your item never initialized, which could contribute to the nullPointerException.





    Ahh no @Init Was an example

    I do it with an event handler

    @EventHandler
    public void preLoad(FMLPreInitializationEvent Event){
    grenade = new ItemGrenade(GRENADE_ITEM_ID).setUnlocalizedName("BreaTech:grenade");
    GameRegistry.registerItem(grenade, "grenade");
    LanguageRegistry.addName(grenade, "grenade");
    }
    Posted in: Modification Development
  • 0

    posted a message on What tutorials are the most requested ones? [Taking tut requests]
    Here is a (propper list)

    1. Tile Entity With Techne
    2. Custom Mobs With Techne
    3:
    Quote from microjunk

    Just saw this and thought, well, we could really use one for loading and pasting schematics in game. Also for how to make proper schematics using mcedit. I have found a few and made a few myself that dont load properly. Also along with this should be custom structure rotation, though this should work either with schematics or just a normal world gen class.

    We are also lacking a good chest loot generation tutorial, I know how to do this already, to a point anyhow, but have noticed others asking for how to do so.

    Some decent tips for custom generation would be good too....like make a plant grow in a certain biome on certain blocks, or so many blocks away from a specific block, make blocks generate around a lava lake or water lake, and so on...


    4. Trees/Plants
    5. Overriding Guis


    These are the things I need most!
    Thanks!

    Cheers,
    SuperBrea
    Posted in: Modification Development
  • 0

    posted a message on Replacing a vanilla item
    Easiest thing is to edit the base class. Try finding where the recipe is declared.

    Hope I could be of some use!

    Cheers,
    SuperBrea
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2][SOLVED][Forge]Getting an entity to render as an Item
    Ok, I didn't post all my code cause well, everyone hates those copy pasters...Anyways I did declare my item like so This is all my code basicly for the grenade in my Main.class:


    [code]public static final int GRENADE_ITEM_ID = 3004; public static Item grenade; @Init grenade = new ItemGrenade(GRENADE_ITEM_ID).setUnlocalizedName("BreaTech:grenade"); GameRegistry.registerItem(grenade, "grenade"); LanguageRegistry.addName(grenade , "Grenade");[/code]
    Quote from 0mn1potent

    Haha, you don't have to bump so much. It just took me some time to get back on.

    So it looks like your Main.grenade is causing the problem. The error says a nullPointerException occurred on line 42 of RenderSnowball, which is this line:

    [code]Icon icon = this.field_94151_a.getIconFromDamage(this.field_94150_f);[/code]





    Ok, I didn't post all my code cause well, everyone hates those copy pasters...Anyways I did declare my item like so This is all my code basicly for the grenade in my Main.class:


    [CODE]
    public static final int GRENADE_ITEM_ID = 3004;
    public static Item grenade;
    @Init
    grenade = new ItemGrenade(GRENADE_ITEM_ID).setUnlocalizedName("BreaTech:grenade");

    GameRegistry.registerItem(grenade, "grenade");
    LanguageRegistry.addName(grenade , "Grenade");
    [/CODE

    There are only two things that could cause the exception, field_94151_a or field_94150_f, and seeing as how you used the second constructor which only accepts one argument (Item) and passes the other parameter as 0 (which obviously is not null, cause it's zero), that means it can only be caused by field_94151_a, which is your item.

    Looking at your Main class I do not ever see your ItemGrenade declared anywhere, which means that if you are trying to reference it in RenderSnowball, it will not exist and therefore cause the exception. If you have not already, create a grenade object in your main class and use that item as your parameter to pass into RenderSnowball. Then it should work.
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2][SOLVED][Forge]Getting an entity to render as an Item
    Edit it crashed:
    ---- Minecraft Crash Report ----
    // Don't do that.
    Time: 8/25/13 10:58 AM
    Description: Rendering entity in world
    java.lang.NullPointerException
    at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:42)
    at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312)
    at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)
    at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)
    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)
    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1002)
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:934)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)
    at net.minecraft.client.main.Main.main(Main.java:93)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    -- Head --
    Stacktrace:
    at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:42)
    -- Entity being rendered --
    Details:
    Entity Type: BreaTech.Grenade (BreaTech.Entities.Explosives.EntityGrenade)
    Entity ID: 469
    Entity Name: entity.BreaTech.Grenade.name
    Entity's Exact location: 336.37, 65.91, 380.88
    Entity's Block location: World: (336,65,380), Chunk: (at 0,4,12 in 21,23; contains blocks 336,0,368 to 351,255,383), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Entity's Momentum: 0.73, -0.03, -1.11
    -- Renderer details --
    Details:
    Assigned renderer: net.minecraft.client.renderer.entity.RenderSnowball@445cec7
    Location: 7.28,1.29,-10.78 - World: (7,1,-11), Chunk: (at 7,0,5 in 0,-1; contains blocks 0,0,-16 to 15,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
    Rotation: 146.53583
    Delta: 0.18863177
    Stacktrace:
    at net.minecraft.client.renderer.entity.RenderManager.renderEntityWithPosYaw(RenderManager.java:312)
    at net.minecraft.client.renderer.entity.RenderManager.renderEntity(RenderManager.java:281)
    at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:524)
    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1160)
    -- Affected level --
    Details:
    Level name: MpServer
    All players: 1 total; [EntityClientPlayerMP['Player276'/468, l='MpServer', x=328.49, y=64.62, z=392.57]]
    Chunk stats: MultiplayerChunkCache: 10
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options:
    Level spawn location: World: (0,64,252), Chunk: (at 0,4,12 in 0,15; contains blocks 0,0,240 to 15,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 7248 game time, 7248 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
    Forced entities: 13 total; [EntitySkeleton['Skeleton'/576, l='MpServer', x=323.69, y=46.00, z=411.50], EntityClientPlayerMP['Player276'/468, l='MpServer', x=328.49, y=64.62, z=392.57], EntityItem['item.item.dyePowder.black'/558, l='MpServer', x=317.63, y=62.13, z=384.94], EntityBat['Bat'/575, l='MpServer', x=331.25, y=28.22, z=411.25], EntityCreeper['Creeper'/619, l='MpServer', x=365.00, y=14.00, z=381.41], EntityItem['item.item.dyePowder.black'/559, l='MpServer', x=313.81, y=59.13, z=398.53], EntityBat['Bat'/574, l='MpServer', x=335.44, y=28.39, z=413.75], EntityBat['Bat'/573, l='MpServer', x=335.14, y=28.00, z=413.01], EntityCreeper['Creeper'/603, l='MpServer', x=348.50, y=21.00, z=392.50], EntityGrenade['entity.BreaTech.Grenade.name'/469, l='MpServer', x=336.37, y=65.91, z=380.88], EntityCreeper['Creeper'/602, l='MpServer', x=344.50, y=21.00, z=394.50], EntityBat['Bat'/604, l='MpServer', x=338.75, y=20.00, z=389.25], EntitySquid['Squid'/620, l='MpServer', x=367.53, y=59.00, z=381.50]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Integrated singleplayer server
    Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)
    at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2298)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:844)
    at net.minecraft.client.main.Main.main(Main.java:93)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
    -- System Details --
    Details:
    Minecraft Version: 1.6.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.7.0_25, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 808631648 bytes (771 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 7955 (445480 bytes; 0 MB) allocated, 752 (42112 bytes; 0 MB) used
    Suspicious classes: FML and Forge are installed
    IntCache: cache: 0, tcache: 0, allocated: 1, tallocated: 63
    FML: MCP v8.04 FML v6.2.19.789 Minecraft Forge 9.10.0.789 4 mods loaded, 4 mods active
    mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    FML{6.2.19.789} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Forge{9.10.0.789} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    BreaTech{0.7} [BreaTech] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
    Launched Version: 1.6
    LWJGL: 2.9.0
    OpenGL: ATI Radeon HD 4290 GL version 3.3.10750 Compatibility Profile Context, ATI Technologies Inc.
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Resource Pack: Default
    Current Language: English (US)
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 1266 (70896 bytes; 0 MB) allocated, 1266 (70896 bytes; 0 MB) used


    Client Proxy:
    package BreaTech.Proxys;
    import net.minecraft.client.renderer.entity.RenderSnowball;
    import net.minecraft.client.renderer.entity.RenderTNTPrimed;
    import net.minecraftforge.client.IItemRenderer;
    import net.minecraftforge.client.MinecraftForgeClient;
    import BreaTech.Main;
    import BreaTech.Entities.Explosives.EntityGrenade;
    import BreaTech.Entities.Explosives.EntityNitroglycerin;
    import BreaTech.Entities.Weapons.EntityPhaserBolt;
    import BreaTech.Renderers.RenderGrenade;
    import BreaTech.Renderers.RenderNitroglycerin;
    import BreaTech.Renderers.RenderPhaserBolt;
    import cpw.mods.fml.client.registry.RenderingRegistry;
    import cpw.mods.fml.common.registry.EntityRegistry;
    public class ClientProxy extends ServerProxy{
    public void registerRenderThings() {
      int modEntityID = 0;
    	   //Phaser
    	   EntityRegistry.registerGlobalEntityID(EntityPhaserBolt.class, "BlasterBolt", EntityRegistry.findGlobalUniqueEntityId());
    	   RenderingRegistry.registerEntityRenderingHandler(EntityPhaserBolt.class, new RenderPhaserBolt());
    		 //Nitroglycerin
    		 RenderingRegistry.registerEntityRenderingHandler(EntityNitroglycerin.class,  new RenderNitroglycerin());
    	   
    		   //Grenade
    		  EntityRegistry.registerModEntity(EntityGrenade.class, "Grenade", 4, Main.instance, 64, 10, true);
    		  RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderSnowball(Main.grenade));
        }
    @Override
    public int addArmor(String armor) {
        return RenderingRegistry.addNewArmourRendererPrefix(armor);
    }
    }
      
       





    When I shot the grenade it crashed ;(
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2][SOLVED][Forge]Getting an entity to render as an Item
    Quote from 0mn1potent

    I do not believe you need the registerGlobalEntityID(). The only two things you need are:

    EntityRegistry.registerModEntity(EntityYouritem.class, "ItemName", renderID, this, 64, 10, true);

    and
    RenderingRegistry.registerEntityRenderingHandler(EntityYouritem.class, new RenderSnowball(yourItem));


    However, after wanting to place only in mod class myself and then having trouble later on, I would recommend placing it in your ClientProxy and coding it like this:

    EntityRegistry.registerModEntity(EntityYouritem.class, "ItemName", renderID, modName.instance, 64, 10, true);
    RenderingRegistry.registerEntityRenderingHandler(EntityYouritem.class, new RenderSnowball(modName.yourItem));

    where "modName.instance" is the static instance defined in your base class like so:

    @Instance("modID")
    public static modName instance;


    This should save you a bit of hassle, as when rendering entities as items you don't need a specific renderer, just RenderSnowball(). Hope that helps!



    THANK YOU! ;)

    The reason i didn't want the entity registry in the clientproxy was because i couldn't quite figure out the instance thing.
    I'll be sure to try it thanks!


    Cheers,
    SuperBrea
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2][SOLVED][Forge]Getting an entity to render as an Item
    How would I do this? I have tried MANY tutorials but all don't work.The closest one I got working only manages to use the texture every now and then. Here's my code.I don't want to register any entity except in the main class!


    Main Class:
    //Basic Information About BreaTech Is Defined Here:
    @Mod(modid = "BreaTech", name = "BreaTech", version = "0.7")
    //Client And Server Requirements Are Defined Here:
    @NetworkMod(clientSideRequired = true, serverSideRequired = false)
    public class Main {
    @SidedProxy(clientSide = "BreaTech.Proxys.ClientProxy", serverSide = "BreaTech.Proxys.ServerProxy")
    public static ServerProxy proxy;
    
    @EventHandler
    public void Load(FMLPreInitializationEvent Event) {
    proxy.registerRenderThings();
    if(FMLCommonHandler.instance().getSide().isClient())
    {
    MinecraftForge.EVENT_BUS.register(new SoundRegister());
    System.out.println("Registered Sounds");
    }
    //TickRegistry.registerTickHandler(new PlayerTickHandler(EnumSet.of(TickType.PLAYER)), Side.SERVER);
    
    
    EntityRegistry.registerGlobalEntityID(EntityGrenade.class, "Grenade", EntityRegistry.findGlobalUniqueEntityId());
    	 EntityRegistry.registerModEntity(EntityGrenade.class, "Grenade", 1, this, 64, 10, true);







    Render Grenade Class:
    package BreaTech.Renderers;
    import BreaTech.Main;
    import BreaTech.Entities.Explosives.EntityGrenade;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import net.minecraft.client.renderer.Tessellator;
    import net.minecraft.client.renderer.entity.Render;
    import net.minecraft.client.renderer.texture.TextureMap;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.projectile.EntityFireball;
    import net.minecraft.item.Item;
    import net.minecraft.util.Icon;
    import net.minecraft.util.ResourceLocation;
    import org.lwjgl.opengl.GL11;
    import org.lwjgl.opengl.GL12;
    @SideOnly(Side.CLIENT)
    public class RenderGrenade extends Render
    {
    
    public RenderGrenade()
    {
    
    }
    public void doRenderFireball(EntityGrenade par1Entity, double par2, double par4, double par6, float par8, float par9)
    {
    	 GL11.glPushMatrix();
    	 GL11.glTranslatef((float)par2, (float)par4, (float)par6);
    	 GL11.glEnable(GL12.GL_RESCALE_NORMAL);
    	 Icon icon = Main.grenade.getIconFromDamage(0);
    	 Tessellator tessellator = Tessellator.instance;
    	 float f3 = icon.getMinU();
    	 float f4 = icon.getMaxU();
    	 float f5 = icon.getMinV();
    	 float f6 = icon.getMaxV();
    	 float f7 = 1.0F;
    	 float f8 = 0.5F;
    	 float f9 = 0.25F;
    	 GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
    	 GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
    	 this.loadTexture("BreaTech:textures/items/grenade.png");
    	 tessellator.startDrawingQuads();
    	 tessellator.setNormal(0.0F, 1.0F, 0.0F);
    	 tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6);
    	 tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6);
    	 tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5);
    	 tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5);
    	 tessellator.draw();
    	 GL11.glDisable(GL12.GL_RESCALE_NORMAL);
    	 GL11.glPopMatrix();
    	
    }
    private void loadTexture(String string) {
    // TODO Auto-generated method stub
    
    }
    protected ResourceLocation func_110790_a(EntityFireball par1EntityFireball)
    {
    	 return TextureMap.field_110576_c;
    }
    protected ResourceLocation func_110775_a(Entity par1Entity)
    {
    	 return this.func_110790_a((EntityFireball)par1Entity);
    }
    /**
    	 * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
    	 * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
    	 * (Render<T extends Entity) and this method has signature public void doRender(T entity, double d, double d1,
    	 * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
    	 */
    public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9)
    {
    	 this.doRenderFireball((EntityGrenade)par1Entity, par2, par4, par6, par8, par9);
    
    }
    }



    EntityGrenade Class:
    package BreaTech.Entities.Explosives;
    import net.minecraft.entity.EntityLivingBase;
    import net.minecraft.entity.monster.EntityBlaze;
    import net.minecraft.entity.projectile.EntityThrowable;
    import net.minecraft.util.DamageSource;
    import net.minecraft.util.MovingObjectPosition;
    import net.minecraft.world.World;
    public class EntityGrenade extends EntityThrowable
    {
    public EntityGrenade(World par1World)
    {
    super(par1World);
    }
    public EntityGrenade(World par1World, EntityLivingBase par2EntityLivingBase)
    {
    super(par1World, par2EntityLivingBase);
    }
    public EntityGrenade(World par1World, double par2, double par4, double par6)
    {
    super(par1World, par2, par4, par6);
    }
    /**
    * Called when this EntityThrowable hits a block or entity.
    */
    protected void onImpact(MovingObjectPosition par1MovingObjectPosition)
    {
    worldObj.createExplosion(this, posX, posY, posZ, 3.0F, false);
    this.setDead();
    }
    }





    ItemGrenade Class:
    package BreaTech.Weapons;
    import java.awt.Color;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    import BreaTech.CreativeTabs.WeaponsTab;
    import BreaTech.Entities.Explosives.EntityGrenade;
    import net.minecraft.client.renderer.texture.IconRegister;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.entity.projectile.EntitySnowball;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.world.World;
    public class Grenade extends Item {
    public Grenade(int par1) {
    super(par1);
    this.setMaxStackSize(10);
    this.setCreativeTab(WeaponsTab.tabBreaTechWeapons);
    }
    public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
    	 {
    		 if (!par3EntityPlayer.capabilities.isCreativeMode)
    		 {
    			 --par1ItemStack.stackSize;
    		 }
    		 par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
    		 if (!par2World.isRemote)
    		 {
    			 par2World.spawnEntityInWorld(new EntityGrenade(par2World, par3EntityPlayer));
    		 }
    		 return par1ItemStack;
    	 }
    
    @Override
    @SideOnly(Side.CLIENT)
    public void registerIcons(IconRegister par1IconRegister) {
    this.itemIcon = par1IconRegister.registerIcon("BreaTech:grenade");
    }
    }






    And last but not least ClientProxy class:
    package BreaTech.Proxys;
    import net.minecraft.client.renderer.entity.RenderSnowball;
    import net.minecraft.client.renderer.entity.RenderTNTPrimed;
    import net.minecraftforge.client.IItemRenderer;
    import net.minecraftforge.client.MinecraftForgeClient;
    import BreaTech.Main;
    import BreaTech.Entities.Explosives.EntityGrenade;
    import BreaTech.Entities.Explosives.EntityNitroglycerin;
    import BreaTech.Entities.Weapons.EntityPhaserBolt;
    import BreaTech.Renderers.RenderGrenade;
    import BreaTech.Renderers.RenderNitroglycerin;
    import BreaTech.Renderers.RenderPhaserBolt;
    import cpw.mods.fml.client.registry.RenderingRegistry;
    import cpw.mods.fml.common.registry.EntityRegistry;
    public class ClientProxy extends ServerProxy{
    public void registerRenderThings() {
    int modEntityID = 0;
    	 //Phaser
    	 EntityRegistry.registerGlobalEntityID(EntityPhaserBolt.class, "BlasterBolt", EntityRegistry.findGlobalUniqueEntityId());
    	 RenderingRegistry.registerEntityRenderingHandler(EntityPhaserBolt.class, new RenderPhaserBolt());
    		 //Nitroglycerin
    		 RenderingRegistry.registerEntityRenderingHandler(EntityNitroglycerin.class, new RenderNitroglycerin());
    		 RenderingRegistry.registerEntityRenderingHandler(EntityGrenade.class, new RenderGrenade());
    		
    }
    }



    Helpful information Possibly:
    1. My grenade texture loads properly
    2. My grenade texture is 16x16 pixels
    3. My grenade texture works only sometimes
    4. I mostly get pink, dark green, light green, squares not grenades



    I only ask for help, not for you posting all the code.
    Thank you for reviewing my topic and helping!

    Cheers,
    SuperBrea
    Posted in: Modification Development
  • To post a comment, please .