tebreca Posted December 28, 2017 Posted December 28, 2017 (edited) Hello, Im working on a block with fluids inside it, I made a model for it with glass so you can see what fluid is inside it, this is how it looks in the world and in my hand: Spoiler as you can see it works when i hold it My code for the model file { "textures": { "0": "eaglesess:machines/factory_table_side", "1": "eaglesess:machines/liquid_absorber_side", "2": "eaglesess:machines/wooden_casing", "3": "eaglesess:machines/liquid_absorber_top", "4": "eaglesess:machines/liquid_absorber_liquid" }, "elements": [ { "name": "Cube", "from": [ 15.0, 0.0, 0.0 ], "to": [ 16.0, 16.0, 15.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 1.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 15.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 0.0, 0.0, 15.0, 16.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 15.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 15.0 ] } } }, { "name": "Cube", "from": [ 1.0, 0.0, 15.0 ], "to": [ 16.0, 16.0, 16.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 1.0, 0.0, 16.0, 16.0 ] }, "west": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }, "up": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 1.0 ] }, "down": { "texture": "#2", "uv": [ 16.0, 1.0, 0.0, 0.0 ] } } }, { "name": "Cube", "from": [ 0.0, 0.0, 0.0 ], "to": [ 15.0, 16.0, 1.0 ], "faces": { "north": { "texture": "#0", "uv": [ 1.0, 0.0, 16.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 15.0, 0.0, 16.0, 16.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 15.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 1.0, 0.0, 0.0, 16.0 ] }, "up": { "texture": "#2", "uv": [ 16.0, 15.0, 2.0, 16.0 ] }, "down": { "texture": "#2", "uv": [ 1.0, 1.0, 15.0, 15.0 ] } } }, { "name": "Cube", "from": [ 0.0, 0.0, 1.0 ], "to": [ 1.0, 16.0, 16.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }, "east": { "texture": "#1", "uv": [ 0.0, 0.0, 15.0, 16.0 ] }, "south": { "texture": "#0", "uv": [ 0.0, 0.0, 1.0, 16.0 ] }, "west": { "texture": "#1", "uv": [ 1.0, 0.0, 16.0, 16.0 ] }, "up": { "texture": "#3", "uv": [ 0.0, 1.0, 1.0, 16.0 ] }, "down": { "texture": "#2", "uv": [ 0.0, 0.0, 1.0, 15.0 ] } } }, { "name": "Bottom", "from": [ 1.0, 0.0, 1.0 ], "to": [ 15.0, 1.0, 15.0 ], "faces": { "north": { "texture": "#0", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, -5.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, -13.0, -13.0 ] }, "up": { "texture": "#2", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "down": { "texture": "#2", "uv": [ 1.0, 1.0, 15.0, 15.0 ] } } }, { "name": "Fluid", "from": [ 1.0, 1.0, 1.0 ], "to": [ 15.0, 15.0, 15.0 ], "faces": { "north": { "texture": "#4", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "east": { "texture": "#4", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "south": { "texture": "#4", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "west": { "texture": "#4", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "up": { "texture": "#4", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "down": { "texture": "#4", "uv": [ 1.0, 1.0, 15.0, 15.0 ] } } }, { "name": "Top", "from": [ 1.0, 15.0, 1.0 ], "to": [ 15.0, 16.0, 15.0 ], "faces": { "north": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "east": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "south": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "west": { "texture": "#2", "uv": [ 0.0, 0.0, 14.0, 1.0 ] }, "up": { "texture": "#3", "uv": [ 1.0, 1.0, 15.0, 15.0 ] }, "down": { "texture": "#2", "uv": [ 1.0, 1.0, 15.0, 15.0 ] } } } ] } My Forge blockstate file: { "forge_marker": 1, "defaults": { "model": "eaglesess:liquid_collector" }, "variants": { "normal": [{}], "inventory": [{}] } } I added some methods to the block: public static BlockBase fluidcollector = new BlockBase("fluid_collector", Material.WOOD, Main.blocksTab, 1) { @Override public boolean isOpaqueCube(net.minecraft.block.state.IBlockState state) { return true; }; public boolean isFullCube(IBlockState state) { return false; } }; thx Edited December 28, 2017 by tebreca its solved Quote
Matryoshika Posted December 28, 2017 Posted December 28, 2017 1 hour ago, tebreca said: as you can see it works when i hold it nope, on the fact that the images are very small, and very dark. Try and override the Client-Side only method Block::getBlockLayer, and return BlockRenderLayer#CUTOUT, like Glass. Quote Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
tebreca Posted December 28, 2017 Author Posted December 28, 2017 1 hour ago, Matryoshika said: nope, on the fact that the images are very small, and very dark. Try and override the Client-Side only method Block::getBlockLayer, and return BlockRenderLayer#CUTOUT, like Glass. thanks ill try that Quote
Draco18s Posted December 28, 2017 Posted December 28, 2017 8 hours ago, tebreca said: as you can see it works when i hold it /time set 2000 Then take screenshots. Quote 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.
tebreca Posted December 28, 2017 Author Posted December 28, 2017 3 minutes ago, Draco18s said: /time set 2000 Then take screenshots. im sorry ok, i have my screen at 100% brightness so i saw it as bright Quote
tebreca Posted December 28, 2017 Author Posted December 28, 2017 for the people watching this with the same question heres what ive got @SideOnly(Side.CLIENT) @Override public net.minecraft.util.BlockRenderLayer getBlockLayer() { return BlockRenderLayer.TRANSLUCENT; } notice that this is kinda laggy for low end graphics cards This is better and less graphics card heavy, but it will write you rexture just to a full cube, meaning it not like glass anymore and you cant see trough the block @SideOnly(Side.CLIENT) @Override public net.minecraft.util.BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT_MIPPED; } Quote
Recommended Posts
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.