跳到正文

Arrows go trough glass panes

作者:Cam3

Arrows flying fast enough shatter glass panes and keep flying, losing most of their speed. A full-power bow or crossbow shot breaks a pane over a long distance; a weak shot, a skeleton arrow or a dispenser arrow does not.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Arrows Go Through Glass (datapack)

Minecraft Java Edition 1.21.11 (data pack format 94).

Arrows flying fast enough shatter glass panes and keep flying, losing most of their speed.
A full-power bow or crossbow shot breaks a pane over a long distance; a weak shot, a skeleton
arrow or a dispenser arrow does not. At normal speeds an arrow can only break one pane, since it
is too slow afterwards; an arrow given an extreme speed (for example with commands) can go
through several.

Installation

Put the zip file in the datapacks folder of your world, then run /reload or reopen the world.

Enabling / disabling

The datapack follows the vanilla gamerule:

/gamerule minecraft:projectiles_can_break_blocks false

Configuration

Values are scoreboard scores and can be changed at any time:

| Setting | Default | Meaning |
|—|—|—|
| #min_speed | 250 | Speed needed to break a block, in hundredths of a block per tick (250 = 2.5 blocks/tick). A full-power bow shot starts at 3.0, a crossbow at 3.15. |
| #kept_speed | 40 | Percentage of its speed the projectile keeps after breaking a block. |

/scoreboard players set #min_speed agtg.config 200
/scoreboard players set #kept_speed agtg.config 40
/function arrows_go_through_glass:config/show
/function arrows_go_through_glass:config/reset

Breakable blocks and projectiles

  • Breakable blocks: block tag arrows_go_through_glass:breakable (all glass panes, plus #c:glass_panes when a mod loader provides it).
  • Projectiles: entity type tag arrows_go_through_glass:projectiles (#minecraft:arrows, i.e. arrows and spectral arrows). Tridents can be added (minecraft:trident); other projectiles such as snowballs are not supported by the datapack.
  • Blocks the path scan sees through: block tag arrows_go_through_glass:passable (air, fluids, plants, torches, rails…).

To change them, override these tags from another datapack loaded above this one.

Broken blocks never drop anything.

Known limitations

  • The datapack checks the blocks on the arrow’s path cell by cell, not the pane’s thin hitbox: an arrow passing very close to a pane, through the same block cell, can break it.
  • A mob standing right in front of a pane does not protect it: the pane can break even if the arrow hits the mob.
  • Partial blocks (slabs, fences, carpets…) on the path stop the scan, so a pane right behind them may not break.

Uninstalling

/function arrows_go_through_glass:uninstall
/datapack disable "file/arrows-go-through-glass-datapack-1.0.0.zip"

A Minecraft player in a Minecraft oak forest shooting Minecraft arrows with a Minecraft bows toward three layers of Minecraft untinted glass panes. The arrows go through the glass panes, one layer at a time.

常见问题

Arrows go trough glass panes 支持哪些 Minecraft 版本?

Arrows go trough glass panes 支持 Minecraft Java 版 1.21.11,可用的加载器:Fabric / Forge / NeoForge / Quilt。下载时注意选择和你游戏版本一致的文件。

Arrows go trough glass panes 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分

Cam3 的其他作品

查看全部 →