Пример #1
0
        public void UpdateBlockHandler(BlockID block)
        {
            bool nonSolid = !MCGalaxy.Blocks.CollideType.IsSolid(CollideType(block));

            deleteHandlers[block]       = BlockBehaviour.GetDeleteHandler(block, Props);
            placeHandlers[block]        = BlockBehaviour.GetPlaceHandler(block, Props);
            walkthroughHandlers[block]  = BlockBehaviour.GetWalkthroughHandler(block, Props, nonSolid);
            physicsHandlers[block]      = BlockBehaviour.GetPhysicsHandler(block, Props);
            physicsDoorsHandlers[block] = BlockBehaviour.GetPhysicsDoorsHandler(block, Props);
        }
Пример #2
0
        public void UpdateBlockHandlers(BlockID block)
        {
            bool nonSolid = !MCGalaxy.Blocks.CollideType.IsSolid(CollideType(block));

            DeleteHandlers[block]       = BlockBehaviour.GetDeleteHandler(block, Props);
            PlaceHandlers[block]        = BlockBehaviour.GetPlaceHandler(block, Props);
            WalkthroughHandlers[block]  = BlockBehaviour.GetWalkthroughHandler(block, Props, nonSolid);
            PhysicsHandlers[block]      = BlockBehaviour.GetPhysicsHandler(block, Props);
            physicsDoorsHandlers[block] = BlockBehaviour.GetPhysicsDoorsHandler(block, Props);
            OnBlockHandlersUpdatedEvent.Call(this, block);
        }
Пример #3
0
        static bool Physics(BlockProps[] scope, BlockID b)
        {
            if (scope[b].IsMessageBlock || scope[b].IsPortal)
            {
                return(false);
            }
            if (scope[b].IsDoor || scope[b].IsTDoor)
            {
                return(false);
            }
            if (scope[b].OPBlock)
            {
                return(false);
            }

            return(BlockBehaviour.GetPhysicsHandler(b, Block.Props) != null);
        }
Пример #4
0
        static bool Physics(byte b)
        {
            if (Block.Props[b].IsMessageBlock || Block.Props[b].IsPortal)
            {
                return(false);
            }
            if (Block.Props[b].IsDoor || Block.Props[b].IsTDoor)
            {
                return(false);
            }
            if (Block.Props[b].OPBlock)
            {
                return(false);
            }

            return(BlockBehaviour.GetPhysicsHandler(new ExtBlock(b, 0), Block.Props) != null);
        }