RangedJS: KubeJS Addon
A KubeJS addon for creating custom bows/crossbows and other ranged weapons.
介绍
A KubeJS addon for pack dev to easily create custom bows and modify existing bows/crossbows.
- Note: Skeletons do not natively use custom bows; you may check another mod “Skeleton Uses Custom Bow” for that feature.
- Note: Pillagers can use custom crossbow by default, but piglins can’t; you may install “Piglin Hunt Fix” for that feature.
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)
})
})
}})
})
This mod also supports Archery Expansion. You may create a bow with archery expansion properties if the mod is also installed.
event.create("kjsaexpbow", "bow").bow(bow => {
bow.AExpBow(aexp => {
aexp.archeryexp$setWalkSpeed(1) //Please use ProbeJS to get usable methods
})
})
常见问题
RangedJS: KubeJS Addon 支持哪些 Minecraft 版本?
RangedJS: KubeJS Addon 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
RangedJS: KubeJS Addon 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
vomiter 的其他作品
查看全部 →Farmer’s Delight Addon Fixes
Fix crash of Farmer's Delight addons
DamageSource Is Not Null Plus
An attempt to fix "NullPointerException: LivingDeathEvent.getSource() is null"
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
DamageSource Is Not Null Basic
An attempt to solve DamageSource NPE (Only Covers Vanilla Mobs)
评论
登录后评论和评分