Posted February 19, 20232 yr I have the block below (`clay oven`). It is supposed to be a half-height block. I'm looking for blocks in vanilla I can research that might give me a clue how to correct the rendering so the top renders where it's supposed to be and the top half of the block is transparent. Another problem I'm having with this block is that when I place it, I get the back side facing me. How do I correct that? Here is the current source (pretty basic at this point): Spoiler private static class ClayOvenBlock extends CampfireBlock { public ClayOvenBlock() { super(true, 0, BlockBehaviour.Properties .of(Material.STONE) .strength(3.5F) .requiresCorrectToolForDrops() .lightLevel(litBlockEmission(8))); } } I added the following to properly render the collision frame: protected static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 9.0D, 16.0D); // ... public VoxelShape getShape(BlockState state, BlockGetter getter, BlockPos pos, CollisionContext context) { return SHAPE; } Side note: `getShape` is deprecated. What are we supposed to use? Campfire is using this method override. Edited February 19, 20232 yr by badkraft
February 19, 20232 yr 11 hours ago, badkraft said: I'm looking for blocks in vanilla I can research that might give me a clue how to correct the rendering so the top renders where it's supposed to be and the top half of the block is transparent. The slab block? 11 hours ago, badkraft said: Another problem I'm having with this block is that when I place it, I get the back side facing me. How do I correct that? Look at how the FurnaceBlock specifies side using a property. 11 hours ago, badkraft said: Side note: `getShape` is deprecated. What are we supposed to use? Campfire is using this method override. #getShape. Mojang deprecates the method for usage, not overriding.
February 24, 20232 yr Author Fixed... Used Blockbench to create the textures and exported the correct model.json. Edited February 24, 20232 yr by badkraft
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.