Skip to content
Unkie edited this page May 1, 2016 · 10 revisions

Information

Reminder: This is not a tutorial about how to write a physics engine. This is just to detail how ClassicalSharp's physics works, how it differs from classicube, etc.

These are some useful pages from minecraft wiki:


Special cases

Ice sliding
Image Description
An image ClassiCube The client only appears to directly check if the block underneath is ice. This means it does not slide off ice into air, like the image.

ClassicalSharp Duplicates the behaviour of ClassiCube.

Proper ice sliding into air can be achieved by changing the check from BlockUnderFeet == Block.Ice to:

BoundingBox bb = CollisionBounds;
bb.Min.Y -= 0.01f; bb.Max.Y = bb.Min.Y; 
if( TouchesAny( bb, b => b == (byte)Block.Ice )

Water bobbing
Image Description
An image ClassiCube The client will bob up and down between the red circles.

ClassicalSharp Is not 100% same.

Lava bobbing
Image Description
An image ClassiCube The client will bob up and down between the green circles.

ClassicalSharp Is not 100% same.

Triple block jumps

(insert screenshot)

ClassiCube:

ClassicalSharp:


Liquid 'climbing'

(insert screenshot)

ClassiCube:

ClassicalSharp:


Liquid 'bouncing/bobbing'

(insert screenshot)

ClassiCube:

ClassicalSharp: