Posted January 16, 201510 yr I've just started modding the last few days, and I just recently finished a java class at my school so I understand most of what I'm doing. However I recently ran into a problem with the render of my block that I created. I have all of the .json files created correctly I've double checked them and tried to trouble shoot has much as I could. The first problem I got just caused the texture just to be black I fixed that, it was caused by method either from minecraft or forge to stop the use of X-ray packs. Now that's fixed and the problem I have now is that the texture itself is turning black not the transparent parts on it. I can see every pixel but the pixels have lost their color and have became black. I'm going to try to add images to this post so the community can understand what I'm seeing. Thanks to anyone that helps. http://imgur.com/J4VojgW,Mb2Hexe http://imgur.com/J4VojgW,Mb2Hexe#1 BlockInit Class //where I create the blocks import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraft.util.EnumWorldBlockLayer; import net.minecraftforge.fml.common.registry.GameRegistry; import powerman913717.powerpotions.Referance; import powerman913717.powerpotions.blocks.blockClass; public class BlocksInit { public static Block wolfsbane; public static void init() { wolfsbane = new blockClass(Material.plants).setUnlocalizedName("wolfsbane"); } public static void register() { GameRegistry.registerBlock(wolfsbane, wolfsbane.getUnlocalizedName().substring(5)); } public static void registerRenders() { registerRender(wolfsbane); } public static void registerRender(Block block) { Item item = Item.getItemFromBlock(block); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(Referance.MOD_ID + ":" + item.getUnlocalizedName().substring(5), "inventory")); } } This is the first workaround file to stop the their x-ray blocking workaround. //I'm not trying to x-ray just trying to make my stuff render right. import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.util.EnumWorldBlockLayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class blockClass extends Block{ public blockClass(Material materialIn) { super(materialIn); } @SideOnly(Side.CLIENT) public EnumWorldBlockLayer getBlockLayer() { return EnumWorldBlockLayer.CUTOUT; } }
January 16, 201510 yr Hi Your pictures didn't work Perhaps post on imgur and add the link? Also pls post code? -TGG
January 16, 201510 yr Author I updated the post, sry for the issues with the pics. I'm getting use to these forums, some of the tools here are different.
January 17, 201510 yr To fix the x-raying you need to add to your block class public boolean isFullCube() { return false; } public boolean isOpaqueCube() { return false; } don't remember which one does it but one of them does and it removes the x-ray of the block Did you really need to know?
January 17, 201510 yr Author Thank You, SO MUCH. I've spent the past couple days exploring the internet trying to fix that issue, now the texture is displaying in full color and the x-raying is gone. I'm going to edit the title to solved now, thanks again!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.