Posted December 28, 20168 yr Hey, I made item models involving water, and they turned really good... but when i tried blocks, they dont wanna be see-trough , I made an example for the sake of showing this, There you see all the item forms are see-through, and the block is not. BlockState { "variants": { "normal": { "model": "test:water" }, "inventory": { "model": "test:water" } } } Block model { "textures": { "wf": "blocks/water_flow", "ws": "blocks/water_still" }, "elements": [ { "name": "Water", "from": [ 0.0, 0.0, 0.0 ], "to": [ 16.0, 16.0, 16.0 ], "faces": { "north": { "texture": "#wf", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#wf", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#wf", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#wf", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#ws", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, "down": { "texture": "#ws", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } } } ] } Item model { "parent": "test:block/water" } Block class package test.stuff; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockRenderLayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class WaterTest extends Block { public WaterTest() { super(Material.WATER); this.setRegistryName("water"); this.setUnlocalizedName("water"); this.setLightOpacity(0); this.setLightLevel(0); } @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT_MIPPED; } @Override public boolean isFullCube(IBlockState state) { return false; } @Override public boolean isOpaqueCube(IBlockState state) { return false; } } Item Class package test.stuff; import net.minecraft.block.Block; import net.minecraft.item.ItemBlock; import test.Initialization; public class WaterTestItem extends ItemBlock{ public WaterTestItem() { super(Initialization.WATER); this.setRegistryName("waterItem"); this.setUnlocalizedName("waterItem"); } } Initialization class package test; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.common.registry.GameRegistry; import test.stuff.WaterTest; import test.stuff.WaterTestItem; public class Initialization { public static WaterTest WATER; public static WaterTestItem WATERITEM; public static void Init() { WATER = new WaterTest(); WATERITEM = new WaterTestItem(); } public static void Register() { GameRegistry.register(WATER); GameRegistry.register(WATERITEM); } public static void RegisterModels() { ModelResourceLocation model; model= new ModelResourceLocation(WATER.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(WATERITEM, 0, model); model = new ModelResourceLocation(WATERITEM.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(WATERITEM, 0, model); } } Am I doing something wrong? Is it not possible due to water texture implementation? Thanks in advance, NewDivide
December 28, 20168 yr return BlockRenderLayer.CUTOUT_MIPPED; Cutout means that the alpha transparency is either 0 or 1. You want BlockRenderLayer.TRANSPARENT; Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.