コード例 #1
0
        public override void Initialize(EntityProperties properties, ICoreAPI api, long InChunkIndex3d)
        {
            base.Initialize(properties, api, InChunkIndex3d);

            msLaunch = World.ElapsedMilliseconds;

            collisionTestBox = CollisionBox.Clone().OmniGrowBy(0.05f);
        }
コード例 #2
0
        public override void Initialize(EntityProperties properties, ICoreAPI api, long InChunkIndex3d)
        {
            base.Initialize(properties, api, InChunkIndex3d);

            msLaunch = World.ElapsedMilliseconds;

            collisionTestBox = CollisionBox.Clone().OmniGrowBy(0.05f);

            if (api.Side == EnumAppSide.Server)
            {
                GetBehavior <EntityBehaviorPassivePhysics>().OnPhysicsTickCallback = onPhysicsTickCallback;

                ep = api.ModLoader.GetModSystem <EntityPartitioning>();
            }
        }