Jump to content

Recommended Posts

Posted

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.

Posted

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
	 
	

  • Thanks 1

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.