Jump to content

Elix_x

Members
  • Posts

    878
  • Joined

  • Last visited

Posts posted by Elix_x

  1. Blocks can have multiple render layers.

    These are also called rendering passes.

    In your iicon register method, register icons for all layers.

    Now, there's big good method getIICon with world, position and render layer parameters. Here you can check if your block is forming multiblock, and return textures based on rendering pass...

    Note: you have to override some methods in order for multiple layers to work...

  2. Then you should not support those mods and if people complain send them to the mod authors. It's not your job to fix that :P

    Ok, got it... I'll report to all of them one by one :D ...

    Yes, the Java 2d image classes should be fine.

    Wait, but isn't texture sheet generated from iicons?

    Fo items with single layer, i can just get their texture location and that's it (this is probably like 99.9% of cases for material items), fo colored items with color mutiplier method, i can apply this multiplier to medium color, but what for items with multiple layers? They are generated from multiple iicons, and where i can find them is on generated texture sheet... Or should i consider not coding them???

  3. I was meaning "repair" item, item which is used to make/repair tools. For example, for

    ToolMaterial.WOOD

    it's planks, for

    ToolMaterial.IRON

    it's iron ingot...

    That is what getRepairItemStack does...?

    I'm still using

    material.getRepairItemStack()

    , but this only works for vanilla items, as

    I found that there's no single mod that cares about specifiyng repair item stack in tool material.

    So what should i do in this case???

    My guess is only to scan over all items, find tool instances with this material and apply pattern recipe "cutting" to determine item used...

     

    So there's no way i can "scan" texture (of let's say repair item, which i found above) and determine "average" color??? (Yes, this will not work if item is special rendered)...

    Sure, you could do that.

    Ok, so it's possible...

    I'm not experienced with graphics or open gl, so how can i proceed when i get texture file location? I heard of java image classes, is that what i can use?

  4. - There is no way to get the color, so you have to specify it yourself.

    I was meaning "repair" item, item which is used to make/repair tools. For example, for

    ToolMaterial.WOOD

    it's planks, for

    ToolMaterial.IRON

    it's iron ingot...

    - There is no way to get the color, so you have to specify it yourself.

    So there's no way i can "scan" texture (of let's say repair item, which i found above) and determine "average" color??? (Yes, this will not work if item is special rendered)...

  5. Hello everybody,

    I'm here with 2 interesting questions:

    -Can we get material's item (or itemstack), another way than using

    material.getRepairItemStack()

    ?

    --Why?

    --Because i found that there's no single mod that cares about specifiyng repair item stack in tool material. And when recipes for mod items are generated, recipes for items based on modded tool materials have no recipe...

    -How can i get tool material's color?

    --Rgb or hex, both will work.

    --For example, wood color is 110:65:43 (r:g:b) and iron is 153:153:153 (r:g:b), but these i found manually...

    --I have not tried anything yet, i'm just asking about it, if anybody has done it already or knows approximative way to do it.

    --Note: color option is client only, so i can "scan" textures...

     

    Thanks for help!

    If you have any questions - just ask!

  6. 1) Sounds are indeed separate thread. In eclipse, you can see it when switch perspective to "Debug" mode. (It's LWJGL thread. LWJGL is java connector to OpenAl and OpenGl).

    2)

    playSound

    sends packet (i think you know that) to everybody and then clients play convenient

    ISound

    in

    Minecraft.getMinecraft().getSoundHandler().playSound(ISound)

    This means, that you can play sound on client directly by creating new

    ISound

    and passing it to sound handler.

    Note that vanilla mc has already created helper classes such as

    PositionedSound

    ,

    ITickableSound

    and

    MovingSound

    . You can use them too, or extend/implement your own (needed in certain cases, for example repeating sound like riding in minecart, which has it's own

    MovingSoundMinecart

    implementation).

  7. SOLVED!

     

    RenderBlocks has a method called setRenderFromInside(). Set it to true to draw the inside of a block! (Overriding shouldSideBeRendered from Block to always return true may also be a good idea).

    Note on RenderBlocks.setRenderFromInside(): you should only set it to true only when your block is rendered. And after - back to false... Because otherwise ALL blocks will be rendered from inside... Which will decrease fps a lot...

  8. So, B3D - does it work the same way?

    Yep. Very similar to how it was with OBJ in 1.7.10. Also, B3D has something special: you can specify it in json...

     

    YAYYY...which means i can animate it? And which programs can create B3D models?

    I know that blender will work (i use it)... Probably also maya, cinema4d...

  9. I just found the NBT thing before your edit.  I got a potion that delivers my effect.  Name is wrong and color is wrong, but I'm sure I could fix that.

     

    All that being said, surely there is a built in way to do it??  Anyone got experience with this?

    The way to fix the color is to use metadata. That's all...

  10. Thanks, that explains that.

     

    I'm not the best with bit calcs. 

     

    How do I specify my new custom potion for a new Itemstack?

    Actually, me neither... But you can take a look at PotionHelper class, it must have a method convert effect in to meta, because it has method to convert it back...

     

    EDIT: Also, you can add effects by wrting those in to compounds in to tag list called CustomPotionEffects in stack's tag compound...

×
×
  • Create New...

Important Information

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