wiki:betterportals:editing-the-config-file

这是本文档旧的修订版!


编辑配置文件

原Wiki页面:https://github.com/Lauriethefish/BetterPortals/wiki/Editing-the-Config-file 在此页,你可以了解到有关配置文件中各项的功能以及更改方式的详细说明。

要在不重新启动服务器的情况下测试对配置文件的更改,只需要在游戏或控制台中输入/bp reload

这是一份由插件自动生成的config.yml

插件版本号:0.56

config_0.56.yml
# This is the BetterPortals configuration file
# Many of these values should not be changed unless you know what you are doing
 
# WARNING: The portal effect size is the biggest performance sink, higher numbers can cause tons of lag!
# The number of blocks that the portal effect will render
# to the up, down, forwards and backwards of the portal
# (the total width of the effect is twice this)
portalEffectSizeXZ: 13
 
# Same as the previous, but up/down instead
portalEffectSizeY: 7
 
# The closest portal in this range will be activated
# All others are discarded
portalActivationDistance: 20

portalBlockUpdateInterval: 20 # How often the portal will re-check for the blocks around it

enableEntitySupport: true
entityCheckInterval: 5 # How often the portal will check for surrounding entities
 
# Setting this to true will allow you to see straight through a portal
# NOTE: This generally makes it look a bit less convincing, since it's easier to see when the player's client doesn't quite keep up
hidePortalBlocks: false
 
# How close portals can spawn to each other, in blocks
minimumPortalSpawnDistance: 6
 
# The maximum size of portals in blocks. The x is width and y is height
# This should never be larger than twice the portal effect size
# Larger portals tend to look less good, so the default values work well
maxPortalSize:
  x: 5
  y: 5
 
# Stores the offset from the corners of the portal where the collision box will be
# This collision box is how the portal effect is calculated
# (if the ray from the player's view to the block being tested intersects this box it will be considered visible through the portal)
# The default values are tuned to work fairly well, so I don't recommend changing these
portalCollisionBox:
  x: 0.38
  y: 0.38
  z: 0.25
 
# Worlds where the plugin will fall back to the vanilla portal logic
disabledWorlds:
  - 'some_world'
 
# How long the plugin waits before rendering portals after switching worlds.
# Useful to deal with lag that some players get just after switching worlds.
# Set to 0 to disable
waitTimeAfterSwitchingWorlds: 1
 
# Stores the links between worlds. By default this links the overworld and the nether with portals
# There are two links for the overworld and the nether - one for each way.
# This is to allow one way links between dimensions
# The x and z coordinates of the portals are multiplied by the coordinateRescalingFactor to spawn portals
# The min and max spawn y limit where portals can spawn - for instance you should not be able to spawn portals above the nether ceiling
worldConnections:
  '0':
    originWorld: 'world'
    destinationWorld: 'world_nether'
    minSpawnY: 5
    maxSpawnY: 122
    coordinateRescalingFactor: 0.125
  '1':
    originWorld: 'world_nether'
    destinationWorld: 'world'
    minSpawnY: 5
    maxSpawnY: 250
    coordinateRescalingFactor: 8.0''

portalEffectSizeXZ指定在X轴和Z轴上传送门渲染的半径

portalEffectSizeY指定在Y轴上传送门渲染的半径

编辑这些值时请务必谨慎:较大的值不仅会对服务器造成较大压力,也会对客户端造成影响。

当玩家在渲染范围较大的传送门周围走动时会导致客户端的渲染出现延迟。

worldConnections将配置传送门将可以连接到哪些世界。默认的情况下,世界world1)将与world_nether2)建立连接。

你也可以根据你的喜好改变地狱和主世界的对应比例。例如,你可以把它改成1:4(下界1个方块=主世界4个方块),而不是原版的1:8(下界1个方块=主世界8个方块)。

下面是默认的config.yml中worldConnections段落:

worldConnections.yml
worldConnections:
  '0':
    originWorld: 'world'
    destinationWorld: 'world_nether'
    minSpawnY: 5
    maxSpawnY: 122
    coordinateRescalingFactor: 0.125
  '1':
    originWorld: 'world_nether'
    destinationWorld: 'world'
    minSpawnY: 5
    maxSpawnY: 250
    coordinateRescalingFactor: 8.0

在此配置文件中,一项连接主世界到下界,另一项连接下界到主世界。

coordinateRescalingFactor是不同维度之间生成传送门时X轴和Z轴坐标乘以的值。所以从其他世界到下界,坐标要乘以8,从下界到其它世界,坐标要除以8。

minSpawnY/maxSpawnY指定了传送门可以生成的区域(这可以防止传送门在下界顶部的基岩层上方生成)。

下面是一个例子,将第二个下界与second世界建立了连接:

你必须确保你worldConnections的列表中没有重复任何数字,每个数字必须是唯一的。

second.yml
worldConnections:
   '0':
    originWorld: 'world'
    destinationWorld: 'world_nether'
    minSpawnY: 5
    maxSpawnY: 122
    coordinateRescalingFactor: 0.125
  '1':
    originWorld: 'world_nether'
    destinationWorld: 'world'
    minSpawnY: 5
    maxSpawnY: 250
    coordinateRescalingFactor: 8.0
  '2':
    originWorld: 'second'
    destinationWorld: 'second_nether'
    minSpawnY: 5
    maxSpawnY: 122
    coordinateRescalingFactor: 0.125
  '3':
    originWorld: 'second_nether'
    destinationWorld: 'second'
    minSpawnY: 5
    maxSpawnY: 250
    coordinateRescalingFactor: 8.0

如果你不清楚某些配置的具体用途,请不要随意修改!

disabledWorlds在此项指定的世界中,插件将不会生效

waitTimeAfterSwitchingWorlds控制插件在切换世界后渲染传送门之前等待的时间(单位:tick,如果需要,可以将其设置为0)

maxPortalSize将限制传送门的最大尺寸(任何大于此大小的传送门将不会被激活)

portalCollisionBox是插件使用的技术参数,用于指定在何处渲染方块。注意:如果你不清楚此项的具体用途,请不要随意修改!

minimumPortalSpawnDistance将限制生成传送门时彼此的最近距离

hidePortalBlocks设置为true将隐藏传送门方块

enableEntitySupport设置为false将禁止传送门渲染可见实体

entityCheckInterval将控制插件多久检查一次传送门起点和终点附近的实体(单位:tick)

portalActivationDistance将控制玩家必须距离传送门多近才会渲染另一侧的方块和实体

portalBlockUpdateInterval将指定传送门检查周围的方块并将其发送到另一个线程进行处理的频率


1)
主世界
2)
下界
你需要登录发表评论。
  • wiki/betterportals/editing-the-config-file.1602858187.txt.gz
  • 最后更改: 2020/10/16 22:23