欢迎
此Wiki将帮助你配置ItemAdder并创建自定义物品

菜单配置

为了在/ia菜单中显示物品,你必须打开menu.yml并添加你想要的物品名称到某一分类中(以下示例是添加一个物品到hoes分类)
| 
 | 
| 
 | 
ItemAdder提供一个简单的供Jaca/Skript开发者的API,要使用它,只需在代码中添加dev.lone.itemsadder.api.ItemsAdder.
- //Checks if an item is a custom item made with ItemsAdder
 
- public static boolean isCustomItem(ItemStack itemStack)
 
- public static boolean isCustomItem(String customItemName)
 
 
- //Get an ItemsAdder custom item by its name in config
 
- public static ItemStack getCustomItem(String nameInConfig)
 
 
- //Spawns a block made with ItemsAdder specifying the itemstack 
 
- //(obtain it with getCustomItem)
 
- public static void placeCustomBlock(Location location, ItemStack customBlock)
 
- public static void placeCustomBlock(Location location, ItemStack customBlock, boolean lightweight)
 
 
- //Check if a block in the world is a custom block made with ItemsAdder
 
- public static boolean isCustomBlock(Block block)
 
 
- //returns the ItemStack of a custom block in world
 
- public static ItemStack getCustomBlock(Block block)
 
 
- //check if an entity in world is a furniture
 
- public static boolean isFurniture(Entity entity)
 
 
- //check if an ItemStack is a specific custom item 
 
- //(example: check if a pickaxe is 'amethyst_pickaxe')
 
- public static boolean matchCustomItemName(ItemStack itemStack, String customItemName)
 
 
- //get name of the item in config (ex: 'ruby_pickaxe')
 
- public static String getCustomItemName(ItemStack itemStack)
 
 
- //get name of config where the item is declared (ex: 'items/swords')
 
- public static String getCustomItemFileName(ItemStack itemStack)
 
 
- //gets usages remaining of this item (-999 if it has no usages specified = infinite)
 
- public static String getCustomItemUsages(ItemStack itemStack)
 
 
- //get custom durability
 
- public static String getCustomItemDurability(ItemStack itemStack)
 
 
- //get max custom durability 
 
- public static String getCustomItemMaxDurability(ItemStack itemStack)
权限
- 用户权限
 /ia
 ia.user.ia
 合成权限
 ia.user.craft.PERMISSION(或给予全部权限ia.user.craft.*)
- 管理员
 /iaget
 ia.admin.iaget
 /iagive
 ia.admin.iagive
 /iatag
 ia.admin.iatag
 编辑权限(/ia中的编辑按钮)
 ia.admin.edit
- 其它
 拒绝资源包时不被踢出
 ia.resourcepack.bypasskick
 
F.A.Q.
存在什么类型的物品、武器、弓?
我能不能创建物品X、武器Y……我能不能添加这个属性,我能吗我能吗我能吗?
插件有这个功能吗?
为什么我有这样那样的问题?
我尽可能清楚地编写了这个wiki及其教程,所以请不要向我发送有关配置插件时遇到的问题的支持请求,或者如果您有疑问。请在使用之前使用wiki以及顶部的搜索栏。谢谢!
资源包不被加载,我在聊天区看见了一个错误
- Minecraft限制资源包最大为50MB
- 请确保你提供的是资源包的直接下载链接
- 请务必遵循所有教程的步骤
 
玩家看不见纹理,但是我遵循了教程!
- 
      
- 如果问题仍存在,从服务器列表中删除服务器,重新添加并按照上方说明启用资源包
- 如果仍不能解决,到%minecraft文件夹%\.minecraft\server-resource-packs\并删除所有文件,加入服务器。
 
插件不工作
在向作者反馈之前:
- 确保插件是最新版本
- 确保不是其他插件干扰
- 引起此问题的原因
- 服务器版本,使用/version查看并将版本信息发送给作者
- 插件版本
- 你是否编辑过配置文件
- 你是否编辑过资源包
- 将配置文件压缩并发送给作者
- 插件是否在控制台或聊天区显示错误信息
 
- 服务器的完整日志文件
- 服务器IP
- 给作者OP权限,他将帮助你解决(或者给他创造模式、/pl、ItemAdder、/tp、/i等权限)
 
兼容性
作者不确定ItemAdder会与所有插件兼容
- 所有有资源包的插件(除非你能合并它们)
- CraftEnhance
- 有自定义配方和合成表
 
普通设置
model_id
资源包中此项的材质名
- assets\minecraft\models\new_<type>\<model_id>.json
vanilla_type
以下例子为创建一把绿宝石剑
- assets\minecraft\models\new_diamond_sword\6.json
 
- assets\minecraft\textures\new_diamond_sword\6.png
| emerald_sword: enabled: true permission: emeraldsword model_id: 6 vanilla_type: DIAMOND_SWORD name: '&fEmerald sword' | 
|  |  注意 不是所有物品都可以改变vanilla_type: 
 只有在这些文件中你可以改变: 
 | 
enabled
设置此物品是否可用
- enabled: true
permission
设置合成该物品需要的权限
例如:
- permission: mysword
name
| name: '&fMy awesome custom sword' | 
lore
| 
 | 
enchants
为物品设置一个默认附魔,玩家在合成它时就会带有该附魔,你可以添加多个附魔
| 
 | 
|  |  你可以在这里找到附魔名 | 
events

specific_properties
每个yml文件都有各自的specific_properties结构,要查看可用项,请查看目录特定物品,并查找"specific_properties",有一个"specific_properties"属性可用于所有.yml文件,它是幸运属性幸运属性用于设置物品幸运值
 
- luck_offhand: <number>
 
- luck_mainhand: <number>
 
- luck_head : <number>
 
- luck_chest: <number>
 
- luck_legs: <number>
 
- luck_feet: <number>
craft_recipe
合成物品的配方
 
result_recipe
如果您想为当前的自定义项目添加多个制作配方,这将非常有用
 
事件
为你的物品添加基于一些事件的行为
| 
 | 

Events: actions现在您知道可以触发哪些事件,您必须配置发生的事情
- events:
 
-     right_click:
 
-         play_sound: knife
 
-         play_particle: CRIT_MAGIC
 
-         play_effect: SMOKE
 
-         execute_command:
 
-             as_console: true
 
-             #{player} will be automatically replaced with player name
 
-             command: 'tellraw {player} {"text":"Pressed right mouse button","color":"gold"}'
 
-         reduce_durability: 1
 
-         reduce_amount: 1
 
-         reduce_usages: 1
 
-         replace_near_blocks:
 
-             reduce_durability: 1
 
-             radius:
 
-               x: 2
 
-               y: 2
 
-               z: 2
 
-             from: LAVA
 
-             to: OBSIDIAN
 
-         #you can create multiple rules for replace_near_blocks
 
-         #you just have to make the rule start with "replace_near_blocks"
 
-         replace_near_blocks_1:
 
-             # ....
 
-         replace_near_blocks_2:
 
-             # ....
 
-         replace_near_blocks_...:
 
-             # ....
 
-     block_break:
 
-         drop_this_item: #when you break a block using any tool drops this custom item
 
-             from_vanilla_block: FERN #block broken
 
-             chance: 10       #chance of dropping this custom item
 
-             min_amount: 1    #min amount of this custo item to be dropped
 
-             max_amount: 2    #min amount of this custo item to be dropped
 
-         drop_exp: #when you break a block holding this custom item item in hand
 
-                     #drop exp
 
-             chance: 50       #chance of dropping the exp
 
-             min_amount: 1    #min exp amount
 
-             max_amount: 3    #max exp amount
 
-         multiple_break: #special property: breaks more than one block around the first
 
-             keep_ores: true #are ores protected from the 3x3 break tool?
 
-             drop_all_blocks: #if all blocks should be dropped on break or only the first
 
-               enabled: true
 
-               need_silk_touch: true #if you need silktouch to get all blocks
 
-             size: 3 #size of the square to be mined
 
-     fishing: #special event called when you fish
 
-          drop_this_item: #drop the current item
 
-             chance: 20 #chances of getting the tuna dropped
 
-     kill_mob: #when you kill a witch it drops this item with 20% of chance
 
-       drop_this_item:
 
-         from_mob: WITCH
 
-         chance: 20
 
-     throw: #special event called when you throw a throwable item
 
-         # ... refer to Throwables page, link on bottom of this page
 
-     hit_ground: #special event called when a throwable item hits the ground
 
-         # ... refer to Throwables page, link on bottom of this page
 
-     
 
 
合成
文章列表:(点击图片跳转)



耐久
ItemAdder有一个可选的耐久度系统
你可以为一个物品设置自定义耐久度例如:
| 
 | 
|  |  你可以不必设置此属性,如果你不需要插件处理耐久度,请在config.yml中禁用custom_durability | 
|  |  max_custom_durability: 最大耐久                                                                                                      disappear_when_broken: 当耐久为零时物品是否消失 custom_durability: 初始耐久 | 


|  |  如果你启用了物品栏调试模式(F3+H),请不要与插件的混淆 | 

|  |  耐久可用于: 
 | 
盔甲
如何制作自定义盔甲
armors.yml
|   |  | 装甲是一种特殊物品,不可使用自定义纹理,但它们可以有自定义颜色,所以你可以制作由绿宝石制成的绿色盔甲。 | 
例子:
| 
 | 
- specific_properties:
 
-     armor: 7 #armor strenght
 
-     toughness: #armor toughness
 
-     armor_color: ff0000 #hex color
 
- armor_type: chest #armor piece type
- head
- chest
- legs
- boots
 
成书
一个成书的例子
 
 
- mysterious_book:
 
-   enabled: true
 
-   permission: mysterious_book
 
-   model_id: 1
 
-   name: '&f神秘的书'
 
-   specific_properties:
 
-     already_written: true
 
-     author: 'Me'
 
-     generation: 'TATTERED'
 
-     pages:
 
-       - '第一页'
 
- - '我的神秘书之第二页'
可写的书/信/物品
 
 
 
- letter:
 
-   enabled: true
 
-   permission: letter
 
-   model_id: 2
 
-   name: '&f信'
 
-   craft_recipe:
 
-     enabled: true
 
-     pattern:
 
-       - XXX
 
-       - XRP
 
-       - XPP
 
-     ingredients:
 
-       P: PAPER
 
- R: RED_DYE
特殊属性
- specific_properties:
 
-     already_written: true #书本是否已写成
 
-     author: 'Me'  #作者
 
- generation: 'TATTERED' #书的 "质量", 可用值见下方
|   |  | generation 可用值: 
 | 
弓
bows.yml
这是存储自定义弓的信息的文件
示例:
| 
 | 
特殊属性
- specific_properties:
 
- arrow_damage: 4
事件
- events:
 
-     shot: #在射箭时触发
 
-       play_sound: astral_bow_shot #播放音效
 
- glow_arrows: true #是否启用发光弓箭
饮料
drinks.yml
存储自定义饮料信息的文件
示例饮料:
- cola:
 
-    enabled: true
 
-    permission: cola
 
-    model_id: 1
 
-    name: '&f可乐'
 
-    lore:
 
-       - "&7一个冷饮"
 
-    events:
 
-       drink: #饮料的特定属性, 
 
-                     #在玩家喝时触发
 
-          restore_food: 12 #饮用后恢复的饥饿值
 
-    craft_recipe:
 
-       enabled: true
 
-       pattern:
 
-          - XXX
 
-          - PSP
 
-          - PPP
 
-       ingredients:
 
-          S: SOUL_SAND
 
- P: platic_plate
食物
eatables.yml
自定义食物的配置文件
示例:
- pizza:
 
-    enabled: true
 
-    permission: pizza
 
-    model_id: 1
 
- name: '&f披萨'
枪械
guns.yml存储自定义枪械信息的文件
示例:
- revolver_gun:
 
-   enabled: true
 
-   permission: revolver_gun
 
-   model_id: 1
 
-   vanilla_type: GOLDEN_SWORD
 
-   name: '&f左轮手枪'
 
-   specific_properties:
 
-     projectile: projectile
 
-   events:
 
-     gun_shot:
 
-       play_sound: revolver_shot
 
-       play_effect: SMOKE
 
-     gun_no_ammo:
 
-       play_sound: revolver_no_ammo
 
-   craft_recipe:
 
-     enabled: true
 
-     pattern:
 
-       - III
 
-       - ISX
 
-       - WXX
 
-     ingredients:
 
-       I: IRON_INGOT
 
-       S: STICK
 
- W: SPRUCE_PLANKS
特定属性
- specific_properties:
 
- projectile: projectile
枪械可以匹配子弹
要使用该枪,你需要把 projectile 拿在左手
你可以在 item.yml 里创建子弹
事件
- events:
 
-   gun_shot: #event called when user shots
 
-     play_sound: revolver_shot #play a sound (vanilla or custom)
 
-     play_effect: SMOKE #粒子效果
 
-   gun_no_ammo: #子弹用完后的事件
 
- play_sound: revolver_no_ammo #play a sound (vanilla or custom)
唱片
激活插件
如何激活你的ItemAdder
我需要做什么?
将itemadder.jar放入服务器plugins文件夹并启动服务器
然后你将找到一个叫ItemAdder的文件夹,打开该文件夹并打开文件license.yml
你将会看到这些:
- paypal_email: your@email.com
 
- payment_date:
 
-   year: 2019
 
-   month: 01
 
- day: 27
我该从哪获得数据?
打开与你的paypal账户绑定的邮箱,找到购买信息
 
从你的邮件中找到信息
然后?
将信息填入license.yml
paypal_email: your_email
payment_date:
year: 2019
month: 09
day: 22
完成!
重启服务器吧。

 
 
                 这么快就出了翻译,速度好快
这么快就出了翻译,速度好快                     
 
