命令/fill

命令/fill

fill

需要的权限等级

Java版:2基岩版:1

限制条件

启用作弊[仅基岩版]

用特定方块填充一个区域的全部或部分。

目录

1 语法

2 参数

3 结果

4 输出

5 示例

6 历史

7 导航

语法[编辑 | 编辑源代码]

Java版

fill [outline|hollow|destroy|strict|replace|keep]

fill replace [outline|hollow|destroy|strict]

基岩版

fill [oldBlockHandling: FillMode]

fill [oldBlockHandling: FillMode]

当oldBlockHandling使用replace参数时的语法:

fill replace [replaceTileName: Block] [replaceBlockStates: block states]

fill replace [replaceTileName: Block] [replaceBlockStates: block states]

参数[编辑 | 编辑源代码]

JE::block_pos和:block_pos

BE:from: x y z:CommandPosition和to: x y z:CommandPosition

定义填充区域的两组对角方块坐标。

在Java版中,必须为方块坐标,格式为 ,三个值必须为整数、相对坐标或局部坐标。在基岩版中,必须为三维的坐标,格式为 ,三个值必须是浮点数、相对坐标或局部坐标。

构成边角的方块在此方块的坐标正方向上延伸。因此,各轴上较小的坐标将会正好贴合区域边界,但较大的坐标将会超过边界1方块,源区域的体积则为(x大 - x小 + 1) × (y大 - y小 + 1) × (z大 - z小 + 1)。例如:0 0 0 0 0 0的体积为1方块,0 0 0 1 1 1与1 1 1 0 0 0都指定同一块8方块大小的区域。

JE::block_stateBE:tileName: Block:Block

指定用于填充该区域的方块。

在Java版中,格式必须为方块ID[方块状态]{方块实体NBT},可仅在需要时指定方块状态与NBT,参见参数类型 § minecraft:block_state。在基岩版中,必须为方块ID。

BE:blockStates: block states:BlockStateCommandParam

指定方块要使用的方块状态。

必须为格式为["<键1>"=<值1>,"<键2>"=<值2>,...]的方块状态(例如:["old_leaf_type"="birch","persistent_bit"=true])。

用destroy填充空气

用hollow填充玻璃

用outline填充玻璃

JE:outline|hollow|destroy|strict|replace|keep、​replace和​outline|hollow|destroy|strict

BE:oldBlockHandling: FillMode

指定方块更改的处理方式,必须为以下其中之一:

destroy — 用指定方块替换填充区域内所有方块(包括空气),原有方块视为被无附魔的下界合金锹或镐采掘而掉落对应的物品实体形式。(只能被剪刀采集的方块,如藤蔓,不会掉落;流体方块同理。)

hollow — 仅用指定方块替换填充区域外层的方块。内部方块被替换为空气。若被填充的区域没有内部(长、宽、高至少一个不足3方格)时,与默认效果相似。

outline — 仅用指定方块替换填充区域外层的方块。内部方块不受影响。若被填充的区域没有内部(长、宽、高至少一个不足3方格)时,与默认效果相似。

keep — 仅用指定方块替换填充区域内的空气方块。

replace — 单独使用时与默认效果相同,但在其后指定[仅JE]或tileName: Block[仅BE]可限制被替换的方块类型。

strict[仅Java版] — 在放置方块时不触发自身及紧挨着的方块的方块更新和形状更新。

若未指定,默认用指定方块替换填充区域内所有方块(包括空气),而不以实体形式掉落被替换的方块和方块内容物。

JE::block_predicateBE:tileName: Block:Block

指定将要替换的方块。若未指定,将替换填充区域内的所有方块。

在Java版中,格式必须为方块ID或标签[方块状态]{方块实体NBT},可仅在需要时指定方块状态与方块实体NBT,参见参数类型 § minecraft:block_predicate。在基岩版中,必须为方块ID。

BE:replaceBlockStates: block states:block states

指定要替换的方块的方块状态。

结果[编辑 | 编辑源代码]

命令触发条件Java版基岩版

任意参数不正确 无法解析 无法解析

至少一个指定的坐标位于世界外或未被加载 执行失败 执行失败

选择区域方块数大于游戏规则commandModificationBlockLimit的设定值

/fill ... hollow/fill ... keep/fill ... outline/fill ... replace .../fill ... strict没有方块被更改

/fill ... destroy在原区域均为空气的情况下尝试填充空气

任意不符合以上所有条件执行成功

输出[编辑 | 编辑源代码]

命令版本条件成功次数/execute store success .../execute store result ...

任意Java版执行失败000

执行成功11填充区域内被更改的方块数

任意基岩版执行失败0N/AN/A

执行成功1N/AN/A

示例[编辑 | 编辑源代码]

/fill 52 63 -1516 33 73 -1536 gold_block replace white_concrete

在指定坐标的区域内将白色混凝土替换为金块。

/fill ~-3 ~-3 ~-3 ~3 ~-1 ~3 water

将玩家脚下为顶面中心7×3×7的区域替换为水。

/fill ~-3 ~ ~-4 ~3 ~4 ~4 oak_planks hollow

在玩家四周生成由橡木木板组成的一个普通房间大小的盒子,并将内部替换为空气。

/fill ~-15 ~-15 ~-15 ~15 ~15 ~15 stone

以玩家为中心生成一个实心的石头立方体。

/fill ~ ~ ~ ~9 ~9 ~9 glass outline

在玩家所处位置上生成一个10×10×10的玻璃罩,并保留内部结构。

/fill ~-1 ~ ~ ~1 ~ ~ prismarine_brick_stairs[facing=south,waterlogged=true][仅Java版]

将玩家周围指定位置的方块替换为面向南方且含水的海晶石砖楼梯。

/fill ~-16 ~-14 ~-16 ~16 ~14 ~16 sandstone["sand_stone_type"="heiroglyphs"] replace netherrack[仅基岩版]

以玩家为中心将33×29×33区域内的下界岩替换为雕纹砂岩。

历史[编辑 | 编辑源代码]

Java版1.814w03a加入了/fill命令。1.1116w32a加入了方块状态的支持。1.19.423w03a现在可以通过commandModificationBlockLimit游戏规则控制单次执行可更改的最大方块数。1.21.525w02a更改了处理方块实体数据的方式。现在replace选项可以在后面附加额外选项。加入了strict选项。携带版Alpha0.16.0build 1加入了/fill命令。基岩版1.2.0?/fill命令可更改的最大方块数现在为32768。1.16.2101.16.210.53加入了/fill中对方块状态的支持。1.19.701.19.70.21移除了tileData: int和replaceDataValue: int参数。

导航[编辑 | 编辑源代码]

编命令

当前可用

clear

clone

damage

deop

difficulty

effect

enchant

execute

experience

xp

fill

function

gamemode

gamerule

give

help

kick

kill

list

locate

loot

me

op

particle

place

playsound

recipe

reload

ride

say

schedule

scoreboard

setblock

setworldspawn

spawnpoint

spreadplayers

stop

stopsound

summon

tag

msg

tell

w

tellraw

time

title

teleport

tp

transfer

weather

whitelist

仅Java版

advancement

attribute

ban

ban-ip

banlist

bossbar

data

datapack

debug

defaultgamemode

dialog

fillbiome

forceload

item

jfr

pardon

pardon-ip

perf

publish

random

return

rotate

save-all

save-off

save-on

seed

setidletimeout

spectate

team

teammsg

tm

test

tick

trigger

version

warden_spawn_tracker

waypoint

worldborder

仅基岩版

aimassist

allowlist

changesetting

clearrealmevents

controlscheme

gametips

project

reloadconfig

save

sendshowstoreoffer

仅教育版

classroommode

code

getchunkdata

getchunks

geteduclientinfo

geteduserverinfo

getspawnpoint

globalpause

takepicture

基岩版和教育版

?

ability

agent

camera

camerashake

clearspawnpoint

codebuilder_actorinfo

daylock

alwaysday

dedicatedwsserver

dialogue

enableencryption

event

fog

gametest

gettopsolidblock

hud

immutableworld

inputpermission

listd

mobevent

music

permission

ops

playanimation

querytarget

replaceitem

script

scriptevent

setmaxplayers

structure

testforblocks

testforblock

testfor

tickingarea

titleraw

toggledownfall

worldbuilder

wsserver

connect

已移除

placefeature

仅Java版

?

achievement

banip

blockdata

broadcast

entitydata

home

iron

locatebiome

replaceitem

setspawn

solid

stats

toggledownfall

testfor

testforblock

testforblocks

unban

wood

仅基岩版

clearfixedinv

mixer

resupply

set_movement_authority

setfixedinvslot

setfixedinvslots

simulationtype

volumearea

仅教育版

collect

dropall

move

position

tpagent

transfer

turn

基岩版和教育版

attack

createagent

destroy

detect

detectredstone

drop

executeasother

executeasself

getitemcount

getitemdetail

getitemspace

inspectdata

inspect

place

till

transferserver

相关推荐

宠物蛇训练技巧的相关文章
bat365在哪进

宠物蛇训练技巧的相关文章

07-14 👁️ 8681
借呗内部邀请码是真的吗?
bat365在哪进

借呗内部邀请码是真的吗?

07-05 👁️ 8335
数据存储容量单位1GB=多少MB
s365 2.2.3

数据存储容量单位1GB=多少MB

07-05 👁️ 9588