TrainCarts/TrainProperties [zh-cn]

From BergerHealer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 65: Line 65:
|wait.distance<br>wait.delay<br>wait.acceleration<br>wait.deceleration
|wait.distance<br>wait.delay<br>wait.acceleration<br>wait.deceleration
|双精度浮点数
|双精度浮点数
|Distance 设置当列车前方有另一辆列车时等待保持的距离,sets the distance the train will wait to maintain a distance between itself and a train ahead
|Distance 设置列车前方有另一辆列车时等待保持的距离。
Delay sets the time the train waits when stopped completely
Delay 设置列车完全停止后启动的延迟。
Acceleration/deceleration sets the maximum change of speed at which it maintains distance (speeds up/slows down)
Acceleration/deceleration 设置保持距离时的最大速度变化(加速/减速)。
|-
|-
|suffocation
|suffocation
|boolean
|布尔值
|Sets whether passengers inside this train can sustain suffocation damage
|设置列车上的乘客是否会收到窒息伤害。
|-
|-
|killMessage
|killMessage
|string
|字符串
|Sets the message displayed when a player or named entity<ref>Use %0% to display the player or entity's name when entering the string. For example, "%0% was crushed by a rolling minecart"</ref> dies to a minecart collision.
|设置玩家或命名实体<ref>输入字符串时使用 %0% 来显示玩家或实体名称。例如,与列车发生碰撞并死亡时会显示 "%0% 被列车压碎了。"</ref>
|-
|-
|banking.strength
|banking.strength
banking.smoothness
banking.smoothness
|double
|双精度浮点数
|Sets how much a cart will bank sideways with strength when cornering and how long it will take to return to normal with smoothness
|设置矿车转弯时的横向倾斜程度,以及恢复正常状态所需的时间。
|-
|-
|slowDown
|slowDown
|boolean
|布尔值
|Sets whether a minecart will experience friction and gravity
|设置列车是否会受到摩擦力和重力的影响。
|-
|-
|allowManualMovement
|allowManualMovement
|boolean
|布尔值
|Sets whether minecart passengers can manually move the train they are in with W and S
|设置列车的乘客是否可以使用 W S 键来驾驶列车。
|-
|-
|tickets
|tickets
|string[]
|string[]
|Used internally
|内部使用。
|-
|-
|collision:  
|collision:  
Line 109: Line 109:
     boss:
     boss:
     train:
     train:
|string
|字符串
|Sets a collision mode for the train.
|设置列车的碰撞模式。
Allowed modes are default, push, cancel, kill, killnodrops, enter, link, damage, damagenodrops, skip
支持的模式有默认、推开、销毁、击杀、击杀且不掉落物品、进入、链接、造成伤害、造成伤害且不掉落物品、跳过。
|-
|-
|allowPlayerEnter
|allowPlayerEnter
|boolean
|布尔值
|Sets whether players can enter the train
|设置玩家是否可以进入列车。
|-
|-
|allowPlayerExit
|allowPlayerExit
|boolean
|布尔值
|Sets whether players can exit the train
|设置玩家是否可以离开列车。
|-
|-
|invincible
|invincible
|boolean
|布尔值
|Sets whether the train is invincible
|设置列车是否不可破坏。
|-
|-
|isPublic
|isPublic
|boolean
|布尔值
|Sets whether non-owners of the train can enter
|设置列车是否允许非车主人员进入。
|-
|-
|pickUp
|pickUp
|boolean
|布尔值
|Sets whether storage minecarts in the train can pick up items
|设置列车中的运输矿车是否可以捡起物品。
|-
|-
|exitOffset  
|exitOffset  
Line 138: Line 138:
     y:
     y:
     z:
     z:
|double
|双精度浮点数
|Sets the offset relative to the train in which players will teleport to when they exit the train
|设置玩家离开列车时下车的位置相对于列车的偏移量。
|-
|-
|exitYaw
|exitYaw
|double
|双精度浮点数
|Sets the yaw of the player's view when they exit the train
|设置玩家下车时的朝向。
|-
|-
|exitPitch
|exitPitch
|double
|双精度浮点数
|Sets the pitch of the player's view when they exit the train
|设置玩家下车时的俯仰角度。
|-
|-
|destination
|destination
|string
|字符串
|Sets the destination of the train
|设置列车的目的地。
|-
|-
|enterMessage
|enterMessage
|string
|字符串
|Sets a message to display when entering the train
|设置进入列车提示消息。
|-
|-
|spawnItemDrops
|spawnItemDrops
|boolean
|布尔值
|Sets whether broken blocks should drop items
|设置破坏方块时是否掉落物品。
|}
|}
{| class="wikitable"
{| class="wikitable"
|+Cart Properties
|+矿车属性
!Property
!属性
!Type
!类型
!Description
!描述
|-
|-
|owners
|owners
|string[]
|string[]
|Sets a list of owners' names of the
|设置列车的车主。
|-
|-
|ownerPermissions
|ownerPermissions
|string[]
|string[]
|Used internally
|内部使用。
|-
|-
|tags
|tags
|string[]
|string[]
|Sets a list of tags the train has
|设置列车的标签。
|-
|-
|driveSound
|driveSound
|strring
|字符串
|Sets the sound that plays when the cart rolls
|矿车开动时播放的声音。
|-
|-
|blockBreakTypes
|blockBreakTypes
|string[]
|string[]
|Sets an array of block types the cart will break which are one block directly to the left and right of the rails when it passes them
|设置一组方块类型,当矿车通过这些方块时,列车会破坏掉这些方块,这些方块需要位于轨道的两侧。
Example usage:
示例用法:
   - DIRT
   - DIRT
   - COBBLE
   - COBBLE
|}
|}

Revision as of 07:02, 9 October 2024

Other languages:

« 返回


介绍

在 DefaultTrainProperties.yml 和 TrainProperties.yml 中,你可以为列车设置属性,比如列车碰撞时会发生什么。DefaultTrainProperties.yml 配置列车生成时的默认属性,而 TrainProperties.yml 则是配置已存在的列车。

DefaultTrainProperties.yml 可分别配置三种权限新生成的列车属性:默认、管理员和生成牌。这些属性列表可以通过以下方法设置:

通过权限
给予他人创建列车某些属性的权限(train.property.**** -> train.property.default),

通过控制牌

Signtemplate.png
[+train]
property
setdefault
<name>


通过命令
选中列车(潜行打击一下)并输入 "/train setdefault default|admin|spawner"。

如果使用下表作为值的参考,则所有矿车属性也将是默认列车属性的一部分。

你还可以使用 /train <属性名称> <值> 设置列车或矿车的某个属性。属性名称列表描述如下。


属性

列车属性
属性 类型 描述
soundEnabled 布尔值 设置是否启用环境矿车声音。
displayName 字符串 设置列车的显示名称。
allowPlayerTake 布尔值 设置列车是否允许玩家离开车时带着矿车。
requirePoweredMinecart 布尔值 设置列车是否需要动力矿车才能运行。
trainCollision 布尔值 设置列车是否可以与其他实体发生碰撞。
collisionDamage 双精度浮点数 设置列车与实体碰撞时造成的伤害值。
keepChunksLoaded 布尔值 设置列车是否加载附近的区块。
speedLimit 双精度浮点数 设置列车的最大速度,单位为方块/刻。
wait.distance
wait.delay
wait.acceleration
wait.deceleration
双精度浮点数 Distance 设置列车前方有另一辆列车时等待保持的距离。

Delay 设置列车完全停止后启动的延迟。 Acceleration/deceleration 设置保持距离时的最大速度变化(加速/减速)。

suffocation 布尔值 设置列车上的乘客是否会收到窒息伤害。
killMessage 字符串 设置玩家或命名实体<ref>输入字符串时使用 %0% 来显示玩家或实体名称。例如,与列车发生碰撞并死亡时会显示 "%0% 被列车压碎了。"</ref>。
banking.strength

banking.smoothness

双精度浮点数 设置矿车转弯时的横向倾斜程度,以及恢复正常状态所需的时间。
slowDown 布尔值 设置列车是否会受到摩擦力和重力的影响。
allowManualMovement 布尔值 设置列车的乘客是否可以使用 W 和 S 键来驾驶列车。
tickets string[] 内部使用。
collision:
   players:
   passive:
   neutral:
   hostile:
   tameable:
   pet:
   animal:
   monster:
   jockey:
   killer_bunny:
   npc:
   utility:
   boss:
   train:
字符串 设置列车的碰撞模式。

支持的模式有默认、推开、销毁、击杀、击杀且不掉落物品、进入、链接、造成伤害、造成伤害且不掉落物品、跳过。

allowPlayerEnter 布尔值 设置玩家是否可以进入列车。
allowPlayerExit 布尔值 设置玩家是否可以离开列车。
invincible 布尔值 设置列车是否不可破坏。
isPublic 布尔值 设置列车是否允许非车主人员进入。
pickUp 布尔值 设置列车中的运输矿车是否可以捡起物品。
exitOffset
   ==: vector
   x:
   y:
   z:
双精度浮点数 设置玩家离开列车时下车的位置相对于列车的偏移量。
exitYaw 双精度浮点数 设置玩家下车时的朝向。
exitPitch 双精度浮点数 设置玩家下车时的俯仰角度。
destination 字符串 设置列车的目的地。
enterMessage 字符串 设置进入列车提示消息。
spawnItemDrops 布尔值 设置破坏方块时是否掉落物品。
矿车属性
属性 类型 描述
owners string[] 设置列车的车主。
ownerPermissions string[] 内部使用。
tags string[] 设置列车的标签。
driveSound 字符串 矿车开动时播放的声音。
blockBreakTypes string[] 设置一组方块类型,当矿车通过这些方块时,列车会破坏掉这些方块,这些方块需要位于轨道的两侧。

示例用法:

 - DIRT
 - COBBLE