Re_Match Posted February 25, 2024 Posted February 25, 2024 I am coding the mod using Intellij community edition with the Adoptium sdk 17 download, all the models i have made using Blockbench, the minecraft version is 1.20.4 and the forge version is 49.0.30. I am trying to make a medieval furnace and i have made the model exceed the 1 block so i have made 3 block models, the medieval furnace thats mentioned previously, the bottom of the furnace that made up the block and the top of the furnace that exceeded the block. I have been following a youtube tutorial by Modding by Kaupenjoe(this is the playlist im following) and he doesnt cover the multiblock function in his tutorial. I have looked to see other solutions but they havent been the right one i have been looking for. I am wanting when the top of the furnace is placed on top and is facing the same direction as the bottom of the furnace and it will let the player interact with the furnace whether they click on the bottom of the furnace or the top of the furnace. Im not entirely sure on what part of my code i should give either im sorry. Quote
perromercenary00 Posted February 26, 2024 Posted February 26, 2024 at the use method of the block you must check if the block above or below is a furnace whit the same facing // ########## ########## ########## ########## // On right click @Override public InteractionResult use(BlockState blkstate, Level warudo, BlockPos pos, Player pe, InteractionHand hand, BlockHitResult hit) { //System.out.println("use()"); ItemStack helditem = pe.getItemInHand(hand); int age = blkstate.getValue(AGE); if( !warudo.isClientSide() ){ BlockState blockabove = warudo.getBlockState( pos.above() ); BlockState blockbelow = warudo.getBlockState( pos.below() ); //stuff //stuff //stuff 1 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.