Translations:Modding:Advanced Blocks/19/en
From Vintage Story Wiki
The method void OnEntityCollide(IWorldAccessor world, Entity entity, BlockPos pos, BlockFacing facing, Vec3d collideSpeed, bool isImpact)
seems to be a good way to implement a bouncy functionality. Note that every trampoline block placed in the game will share the same instance of TrampolineBlock
. Because that object is shared by multiple blocks, it does not have a field for the block position. That's why the event handler includes the pos
parameter.