Jump to content

Recommended Posts

Posted

im updating the manhole block to 19.4 im looking for a way to make the cover animation smooth 
 


	FallingBlockEntity fallingBlock = FallingBlockEntity.fall(level, pos.north().above(2), BlockInit.MANHOLE_COVER_PANEL.get().defaultBlockState().setValue(BlockStateProperties.FACING, Direction.DOWN));
	level.addFreshEntity(fallingBlock);
	


 

the basic code for the falling block just create an entity whit the block model and let it fall from the starting position 
i need to move horizontally so i set a delta 

	FallingBlockEntity fallingBlock = FallingBlockEntity.fall(level, pos.north().above(2), BlockInit.MANHOLE_COVER_PANEL.get().defaultBlockState().setValue(BlockStateProperties.FACING, Direction.DOWN));
//fallingBlock.set(fallingBlock.DATA_NO_GRAVITY, true);
fallingBlock.setDeltaMovement(0.1D, 0.4D, 0.0D);
level.addFreshEntity(fallingBlock);
	

 

 

soo it posible to set the FallingBlockEntity to move other way besides down ??

 

the other thing i was thinking was to make a custom FloathingBlockEntity  
but the old problem affect me like wheres the FallingBlockEntity renderer and model classes to extend the call and use the same renderer not having to manually create a model of the already existing manhole_cover_panel block 
 

 

Thanks for your time

 

 

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.