Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Posts posted by Draco18s

  1. Well, you have two problems.

     

    0) The tessellator doesn't give a shit about transparency, that's a GL thing.

    1) You never tell it what blend function to use

    2) Your UVs are fucked up.

     

                    te.addVertexWithUV(xOff, yOff+1, zOff, 0.3, 0.1);
                    te.addVertexWithUV(xOff, yOff+1, zOff+1, 0.7, 0.1);
                    te.addVertexWithUV(xOff+1, yOff+1, zOff+1, 0.3, 0.1);
                    te.addVertexWithUV(xOff+1, yOff+1, zOff, 0.3, 0.1);

     

    Let me distill this down into the important information.  Removing Y entirely.  Making xOff and zOff equal to zero.  Multiplying the UVs by ten to reduce textual chaos.

     

    (0, 0) : (3, 1)

    (0, 1) : (7, 1)

    (1, 1) : (3, 1) //again

    (1, 0) : (3, 1) //and a third time

  2. Ok, for one, you didn't implement getUnlocalizedName anywhere.  It goes in the ItemBlock class.  Instead you're using getItemStackDisplayName, which is supposed to return the localized name (and you're not using

    StatCollector.translateToLocal

    ).  You don't want that.

     

    As for the block not getting registered, I don't know, you didn't include your main class!

  3. I didn't import anything yet actually, which is odd.

    EDIT: I manually imported net.minecraftforge.common.config.Configuration and it's still using the javax one.

    EDIT 2:turns out that I was importing the javax one before, I have no idea what I was using it for though.

     

    You'd have to delete the old one too :P

    If you absolutely need both classes, you have to full-path one of them when you use it.

  4. It is implied that you must add the ".setHarvestLevel( [tool], [level])" method as part of the initialize Block event, but doing this produces an error.

     

    Actually, it's just a convenience thing.  You can totally do it inside the block's constructor (which is what I do, because then as many properties of that block that I can get away with are inside that block's class--liquids have things that are required elsewhere, etc. etc).

     

    Also, "initialize Block event"?  Are you using an event handler of some kind?

    • Thanks 1
  5. Um.  Yeah.  Don't do this:

    customRenderItem = new RenderItem()

     

    Just because you created an instance of that class doesn't mean that all of its properties are set.  The crash isn't happening in your code, it's happening inside RenderItem.  And what's null there? 

    renderManager

    .  Because creating a new RenderItem doesn't magically make that property defined.

     

    Seriously:

     

  6. The itemstack, the player, the world, the x/y/z location that was clicked on, the side that was clicked, then the float version of the coordinates (x/y/z), which are not round integers (e.g. if you click the center of the top face of a block you'll get 123.5, 66.0, 432.5).

  7. First I searched on Google and found this tutorial on minecraftforge.net: http://www.minecraftforge.net/wiki/Developing_Addons_for_Existing_Mods

     

    It's outdated.

     

    What is out dated about it?  You don't decompile the mod any more and instead include it in your build path.

    Everything else is fine.  You change the @mod annotation, just as it lists, and you add the compatibility layer as described.

     

    Java script

     

    Java is not Javascript.

×
×
  • Create New...

Important Information

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