介绍
A KubeJS addon for pack dev to easily create custom bows and modify existing bows/crossbows. Please feel free to request modded ranged weapon support in comments.
Update August 6th 2025 – Add compat with Archery Expansion.
Example codes can be found on the wiki page.
You can also create vanilla-like bow model with client script:
ClientEvents.highPriorityAssets(event => {
event.easyBowModel("kubejs:bow_golden")
})
You just need to put texture pictures in kuebjs/assets/kubejs/textures/item/ The texture file names should be bow_golden.png, bow_golden_pulling_0.png, bow_golden_pulling_1.png, bow_golden_pulling_2.png
You can also modify existing bows with ItemEvents.modification like this:
ItemEvents.modification(event => {
const $BowItem = Java.loadClass("net.minecraft.world.item.BowItem")
event.modify("minecraft:bow", item => {if(item instanceof $BowItem){
item.bow(bow => {
bow
.onArrowHit(arrow => {arrow.hitBlock(event => {
event.arrow.block.createEntity("lightning_bolt").spawn()
})})
.modifyBow(attributes => {
attributes.fullChargeTick(15).baseDamage(6)
})
})
}})
})
常见问题
RangedJS 支持哪些 Minecraft 版本?
RangedJS 支持 Minecraft Java 版 1.20.1–1.21.1,共 7 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
RangedJS 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
vomiter 的其他作品
查看全部 →Farmer’s Delight Addon Fixes
修复农夫乐事附属模组导致的崩溃
DamageSource Is Not Null Plus
An attempt to fix "NullPointerException: LivingDeathEvent.getSource() is null"
RangedJS: KubeJS Addon
A KubeJS addon for creating custom bows/crossbows and other ranged weapons.
Farmer’s Delight Addon Fixes
Fix incompatibility of My Nether's Delight 1.8 and Farmer's Delight 1.3+; also support Miners Delight+, Dungeons Delight
评论
登录后评论和评分