UNPKG

mdkjs

Version:

mdk is a framework for developing Datapacks for Minecraft. It uses the typescript language.

148 lines (147 loc) 5.02 kB
import { File } from "../../../mdk-core/src"; import { ContextAbstract } from "../../../mdk-core/src"; export declare class GameRule extends ContextAbstract { constructor(context: File); /** * 是否在聊天框中公告玩家进度的达成,默认true */ announceAdvancements(active?: boolean): this; /** * 命令方块执行命令时是否在聊天框中向管理员显示,默认true */ commandBlockOutput(active?: boolean): this; /** * 是否让服务器停止检查使用鞘翅玩家的移动速度,默认false */ disableElytraMovementCheck(active?: boolean): this; /** * 是否禁用袭击,默认false */ disableRaids(active?: boolean): this; /** * 是否进行日夜交替和月相变化,默认true */ doDaylightCycle(active?: boolean): this; /** * 非生物实体是否掉落物品,默认true */ doEntityDrops(active?: boolean): this; /** * 火是否蔓延及自然熄灭,默认true */ doFireTick(active?: boolean): this; /** * 幻翼是否在夜晚生成,默认true */ doInsomnia(active?: boolean): this; /** * 玩家的合成配方是否需要解锁才能使用,默认false */ doImmediateRespawn(active?: boolean): this; /** * 玩家的合成配方是否需要解锁才能使用,默认false */ doLimitedCrafting(active?: boolean): this; /** * 生物在死亡时是否掉落物品,默认true */ doMobLoot(active?: boolean): this; /** * 生物是否自然生成。不影响刷怪笼,默认true */ doMobSpawning(active?: boolean): this; /** * 控制灾厄巡逻队的生成,默认true */ doPatrolSpawning(active?: boolean): this; /** * 方块被破坏时是否掉落物,默认true */ doTileDrops(active?: boolean): this; /** * 控制流浪商人的生成,默认true */ doTraderSpawning(active?: boolean): this; /** * 天气是否变化,默认true */ doWeatherCycle(active?: boolean): this; /** * 玩家是否承受窒息伤害,默认true */ drowningdamage(active?: boolean): this; /** * 玩家是否承受跌落伤害,默认true */ falldamage(active?: boolean): this; /** * 玩家是否承受火焰伤害,默认true */ firedamage(active?: boolean): this; /** * 当被激怒的中立生物的目标玩家死亡时,该生物是否恢复中立状态,默认true */ forgiveDeadPlayers(active?: boolean): this; /** * 玩家是否承受冰冻伤害,默认true */ freezeDamage(active?: boolean): this; /** * 玩家死亡后是否保留物品栏物品、经验(死亡时物品不掉落、经验不清空),默认false */ keepInventory(active?: boolean): this; /** * 是否在服务器日志中记录管理员使用过的命令,默认true */ logAdminCommands(active?: boolean): this; /** * 决定了连锁型命令方块能连锁执行的总数量,默认65536 */ maxCommandChainLength(length?: number): this; /** * 玩家或生物能同时推动其他可推动实体的数量,默认24 */ maxEntityCramming(count?: number): this; /** * 生物是否能够进行破坏性行为,默认true */ mobGriefing(active?: boolean): this; /** * 玩家是否能在饥饿值足够时自然恢复生命值,默认true */ naturalRegeneration(active?: boolean): this; /** * 设置跳过夜晚所需的入睡玩家所占百分比,默认100 * * 设置为0时,1个玩家入睡即可跳过夜晚 * * 设置为大于100的值会使玩家无法通过入睡跳过夜晚。 */ playersSleepingPercentage(count?: number): this; /** * 每游戏刻每区段中随机的方块刻发生的频率,默认3 */ randomTickSpeed(speed?: number): this; /** * 调试屏幕是否简化而非显示详细信息,默认false */ reducedDebugInfo(active?: boolean): this; /** * 玩家执行命令的返回信息是否在聊天框中显示,默认true */ sendCommandFeedback(active?: boolean): this; /** * 是否在聊天框中显示玩家的死亡信息,默认true */ showDeathMessages(active?: boolean): this; /** * 首次进入服务器的玩家和没有重生点的死亡玩家在重生时与世界重生点坐标的距离,默认10 */ spawnRadius(distance?: number): this; /** * 是否允许旁观模式的玩家生成区块,默认true */ spectatorsGenerateChunks(active?: boolean): this; /** * 是否允许旁观模式的玩家生成区块,默认false */ universalAnger(active?: boolean): this; }