Jump to content

redphe0nix1

Members
  • Posts

    25
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

redphe0nix1's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Looks great , glad I could help
  2. Are you trying to get it to display an Icon or the model?
  3. Okay there are a few things that you'll need to change and it should be working just great Firstly, you'll need shouldUseRenderHelper() to return true, otherwise nothing will render when you ask it to, Second, change, "(Entity) data[1]", to null, because it doesn't need the entity holding it to render, Third, your code here should be changed from (I put in the code after the changes I already mentioned) @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type == ItemRenderType.EQUIPPED) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation(ModInfo.ID.toLowerCase() + ":textures/items/LaserWrench.png")); float scale = 1.4F; GL11.glScalef(scale, scale, scale); GL11.glRotatef(90, -1, 0, 0); GL11.glRotatef(85, 0, 0, 1); GL11.glRotatef(180, 0, 1, 0); GL11.glRotatef(135, 1, 0, 0); GL11.glTranslatef(-0.1F, -0.5F, 0.5F); // Left-Right // Forward-Backwards Up-Down model.render(null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); } } to @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation( "ModInfo.ID.toLowerCase() + :textures/items/LaserWrench.png")); switch (type) { case EQUIPPED: //scale, rotate, and translate to your liking break; case EQUIPPED_FIRST_PERSON: //scale, rotate, and translate to your liking break; default: break; } model.render(null, 0, 0, 0, 0, 0, 0.625F); GL11.glPopMatrix(); } You could use nested if statements if you wanted to I guess, this is just the way that I do mine. The type "EQUIPPED" is only the third person render view which doesn't allow for any other way to be rendered. And having default break makes it not even attempt to render if it's given any other render type. Hope I helped
  4. What I'm trying to achieve is when a specific item collides with the a block it spawns a mob, but I'm not totally sure how to check the "instanceof EntityItem" for what item it is, I'm pretty sure it's possible looking at the EntityItem class. In example how they check if the item is a Nether Star before dealing explosion damage, but I'm not sure how I would be able to do that. If anybody could tell me where I could find this out or tell me how if they already know I would greatly appreciate it, thanks in advance.
  5. I'm new to java that's how, and no, I'm not just copying from a tutorial
  6. Adjusted how you said and completely got rid of the switch, the new code works perfect, thanks public int getBlockTextureFromSideAndMetadata(int side, int metadata){ if(side == 0 || side == 1){ return this.blockIndexInTexture + 1 + metadata*2;} else{ return this.blockIndexInTexture + metadata*2; } }
  7. Ya I don't really understand what I'm doing at all, I'm learning right now working on my second mod and it's going pretty well besides a few things like this here and there, thanks for telling me what the problem is by the way
  8. I'm trying to get my metadata blocks to have a different texture on the top and bottom of the block but when I use the "getBlockTextureFromSideAndMetadata" method, it says that the side code is unreachable, anybody know what I'm doing wrong? Block Code http://paste.minecraftforge.net/view/aa57ced5
×
×
  • Create New...

Important Information

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