Beispiel #1
0
        public static void SetCollide(BlockID block, byte collide)
        {
            // necessary for cases where servers redefined core blocks before extended types were introduced
            collide = DefaultSet.MapOldCollide(block, collide);
            ExtendedCollide[block] = collide;

            // Reduce extended collision types to their simpler forms
            if (collide == CollideType.Ice)
            {
                collide = CollideType.Solid;
            }
            if (collide == CollideType.SlipperyIce)
            {
                collide = CollideType.Solid;
            }

            if (collide == CollideType.LiquidWater)
            {
                collide = CollideType.Liquid;
            }
            if (collide == CollideType.LiquidLava)
            {
                collide = CollideType.Liquid;
            }
            Collide[block] = collide;
        }