Jump to content

Elix_x

Members
  • Posts

    878
  • Joined

  • Last visited

Everything 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. Ok, got it... I'll report to all of them one by one ... 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. That is what getRepairItemStack does...? I'm still using material.getRepairItemStack() , but this only works for vanilla items, as 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... 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. 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... 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. Take look at classes in net.minecraftforge.fluid
  8. 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...
  9. Are you using default block model? Not default? Custom?
  10. isOpaqueCube()
  11. Why do you want to do this? Have you searched for other variants other then coremod?
  12. Then there's tick method which is called every tick when armor is worn. It is called something like onArmorTick. Do player.motionY manipulations there...
  13. When do you want to do this? (when wearing armor, holding item, next to the chicken, next to your mob...)...
  14. https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/client/model/b3d/B3DLoader.java
  15. From json or dynamic model? Seriously, from here you can google it...
  16. Where? In mc? In 3d modelling software?
  17. 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...
  18. Reset te's position right after reading from nbt.
  19. Yes, you are right. Before reading from nbt to te, change integers in nbt: "x", "y", "z" to valid values (pos of new te).
  20. Yep. Very similar to how it was with OBJ in 1.7.10. Also, B3D has something special: you can specify it in json...
  21. 1.7.10, obj - yes. 1.7.10, b3d - no. 1.8, obj - no. 1.8, b3d - yes.
  22. The way to fix the color is to use metadata. That's all...
  23. OBJ - No. B3D - Yes.
  24. 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...
  25. Typo... In entity ...
×
×
  • Create New...

Important Information

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