benevolent27

Simple X-Ray Leaves Fix

Jul 3rd, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. For those getting x-ray leaves when setting a transparent texture, I think I might be able to clarify how to make the leaves appear normally. It's actually pretty simple. Kudos to lain Maclean for providing the answer I needed to build this process. :)
  2.  
  3. 1. in your basic.java (or whatever you called it), change the following part, (minus the quotes, of course)
  4. From:
  5. "public final static Block genericLeaves = new GenericBlock(502, Material.leaves)"
  6.  
  7. To:
  8. "public final static Block genericLeaves = new GenericLeavesBlock(502, Material.leaves, true)"
  9.  
  10.  
  11. 2. Create a new class called GenericLeavesBlock.java in your package. You can do this by clicking on "GenericLeavesBlock" (from step 1), press CTRL + 1, and select the option to create the class.
  12.  
  13.  
  14. 3. Erase everything in the GenericLeavesBlock.java file, and then paste in the following code from between the lines. Reword the first part, "package tutorial.basic;" as necessary.
  15.  
  16. //----------------------------------
  17. package tutorial.basic;
  18.  
  19. import net.minecraft.block.BlockLeavesBase;
  20. import net.minecraft.block.material.Material;
  21.  
  22. public class GenericLeavesBlock extends BlockLeavesBase {
  23.  
  24. public GenericLeavesBlock(int id, Material material, Boolean boo) {
  25. super(id, material, boo);
  26. }
  27. }
  28. //----------------------------------
  29.  
  30.  
  31. 4. Save your files and start minecraft to test it. If all went well, you should no longer have x-ray leaves when using a texture file with transparency! Wee!
Advertisement
Add Comment
Please, Sign In to add comment