Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by ljfa

  1. If the differences are too large (for instance, WorldRenderer changed drastically between 1.8.0 and 1.8., maybe making two or three separate versions would be the easiest way after all. I can't think of an easy way of somehow dynamically switching code or classes.
  2. Override getRenderBoundingBox() in your tile entity. Keep in mind that the second corner of the bounding box is exclusive.
  3. Heh, I like it because I don't have to worry where I get the RenderManager from - it just gets supplied to my lambda
  4. I also remember trying to use substitutions, and whenever I did, the crafting recipe with the substituted block as output was messed up. And probably other problems I can't remember. And I think even after the alleged fix it didn't work. When I tried to register the block normally it gave an error. Right now I am using a hacky solution by reflecting into the registries and directly replacing everything. Would be nice if I didn't have to do that.
  5. Actually seems like that's not what happens. If the alpha value of a pixel is 0 that doesn't mean the pixel can't have a color. So the transparent pixels of my texture are still rendered in color. But well, I guess when I do want to use different textures for both getActualState() is a way.
  6. Thanks, that worked! I hoped I could utilize setGraphicsLevel() but seems like I have to live with that. It seems like Minecraft is using the same textures for opaque and transparent leaves, but I am having slightly different ones. I guess now I can use getActualState() to select between the textures. Or is there a better way?
  7. Hello, I'm currently porting a mod from 1.7.10 to 1.8.8 and I'm having trouble with a tree. I would like the leaves to be transparent if and only if the "Fancy Graphics" game setting is set, just like vanilla leaves. In 1.7.10 this was possible by checking this setting in Block.getIcon() and return the according icon. Obviously this isn't possible in 1.8. Unfortuntately Minecraft hardcoded the setting to only affect its own leaves: In loadRenderers() we have: Blocks.leaves.setGraphicsLevel(this.mc.gameSettings.fancyGraphics); Blocks.leaves2.setGraphicsLevel(this.mc.gameSettings.fancyGraphics); Is there any way to get Minecraft to call setGraphicsLevel() on my leaves as well, or some other method to get fast and fancy graphics working for leaves?
  8. There is also World.blockExists. Well, a bit misleading name.
  9. I think if you return -1 from getHarvestLevel, the tool will not be able to harvest anything. If you also return 0 (or some low value) from getDigSpeed it will behave pretty much like a stick. These two methods recieve an ItemStack as parameter, so can check if your tool is already broken and act accordingly.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.