Class CustomItemDefinition.SimpleBuilder
- Direct Known Subclasses:
CustomItemDefinition.ArmorBuilder
,CustomItemDefinition.EdibleBuilder
,CustomItemDefinition.ToolBuilder
- Enclosing class:
- CustomItemDefinition
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SimpleBuilder
(CustomItem customItem, ItemCreativeCategory creativeCategory) -
Method Summary
Modifier and TypeMethodDescriptionprotected CustomItemDefinition.SimpleBuilder
addRepairs
(List<String> repairItemNames, String molang) 添加一个可修理该物品的物品allowOffHand
(boolean allowOffHand) 是否允许副手持有build()
protected CustomItemDefinition
canDestroyInCreative
(boolean value) 控制拿该物品的玩家是否可以在创造模式挖掘方块creativeGroup
(ItemCreativeGroup creativeGroup) 控制自定义物品在创造栏的分组,例如所有的附魔书是一组creativeGroup
(String creativeGroup) 控制自定义物品在创造栏的分组,例如所有的附魔书是一组customBuild
(Consumer<CompoundTag> nbt) 对要发送给客户端的物品ComponentNBT进行自定义处理,这里包含了所有对自定义物品的定义。在符合条件的情况下,你可以任意修改。foil
(boolean foil) handEquipped
(boolean handEquipped) 控制第三人称手持物品的显示方式renderOffsets
(RenderOffsets renderOffsets) 控制自定义物品在不同视角下的渲染偏移向自定义物品添加一个tag,通常用于合成等
-
Field Details
-
identifier
-
nbt
-
-
Constructor Details
-
SimpleBuilder
-
-
Method Details
-
allowOffHand
是否允许副手持有Whether to allow the offHand to have
-
handEquipped
控制第三人称手持物品的显示方式Control how third-person handheld items are displayed
-
foil
- Parameters:
foil
- 自定义物品是否带有附魔光辉效果
whether or not the item has an enchanted light effect
-
creativeGroup
控制自定义物品在创造栏的分组,例如所有的附魔书是一组Control the grouping of custom items in the creation inventory, e.g. all enchantment books are grouped together
- See Also:
-
creativeGroup
控制自定义物品在创造栏的分组,例如所有的附魔书是一组Control the grouping of custom items in the creation inventory, e.g. all enchantment books are grouped together
- See Also:
-
renderOffsets
控制自定义物品在不同视角下的渲染偏移Control rendering offsets of custom items at different viewpoints
-
tag
向自定义物品添加一个tag,通常用于合成等Add a tag to a custom item, usually used for crafting, etc. todo: 2022/12/13 检查是否真的在客户端起作用
- Parameters:
tags
- the tags- Returns:
- the simple builder
-
canDestroyInCreative
控制拿该物品的玩家是否可以在创造模式挖掘方块Control whether the player with the item can dig the block in creation mode
- Parameters:
value
- the value- Returns:
- the simple builder
-
customBuild
对要发送给客户端的物品ComponentNBT进行自定义处理,这里包含了所有对自定义物品的定义。在符合条件的情况下,你可以任意修改。Custom processing of the item to be sent to the client ComponentNBT, which contains all definitions for custom item. You can modify them as much as you want, under the right conditions.
-
build
-
calculateID
-
addRepairs
@Since("1.19.40-r1") protected CustomItemDefinition.SimpleBuilder addRepairs(@NotNull List<String> repairItemNames, String molang) 添加一个可修理该物品的物品Add an item that can repair the item
- Parameters:
repairItemNames
- the repair item namesmolang
- the molang- Returns:
- the simple builder
-