Hello,
I was developing for 1 year for small game projects on Unity, so I'm pretty familiar with the programming but on forge I'm pretty lost.
I already create a mod that detects the block that is breaking, it detects wood and leaves.
I also create something that lets you move the block (to try to copy the block dynamically), but I think I'm doing it the wrong way because my goal is to make my own block class to remove it the collisions and to put the visual of the block breaking. This is where I can not manage how to recover the visual only and not the whole block.
I will inquire for what is "motion", I think it is indeed what I missed!
And the EntityFallingBlock I'm already creating them, but I did not understand about blocks.log and blocks.leaves, but to tell the truth I never look for it like I did not know, so I'll go do some research I think I would find to better understand!
Thank you I think you made me advance.
And if I can do it with EntityFallingBlock then I think I do not need to bother trying to get the visual from the block
Edit: I try this, it's not the result yet but I'm getting close to it, I'm going to search in the entityfallingblock file now that I know it's what I have to use thanks!
@SubscribeEvent
public static void Break(BlockEvent.BreakEvent event) throws InterruptedException {
event.getWorld().setBlockState(event.getPos().add(-1, 5, 0), event.getState());
EntityFallingBlock entityfallingblock = new EntityFallingBlock(event.getWorld(), event.getPos().getX()-1,event.getPos().getY()+5,event.getPos().getZ(), event.getWorld().getBlockState(event.getPos()));
entityfallingblock.motionX += 0.50;
entityfallingblock.motionY += 0.25;
event.getWorld().spawnEntity(entityfallingblock);
}