Package cn.nukkit.item.customitem
Class CustomItemDefinition.SimpleBuilder
java.lang.Object
cn.nukkit.item.customitem.CustomItemDefinition.SimpleBuilder
- Direct Known Subclasses:
CustomItemDefinition.ArmorBuilder
,CustomItemDefinition.EdibleBuilder
,CustomItemDefinition.ToolBuilder
- Enclosing class:
- CustomItemDefinition
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
SimpleBuilder
(ItemCustom item, ItemCreativeCategory creativeCategory) -
Method Summary
Modifier and TypeMethodDescriptionprotected CustomItemDefinition.SimpleBuilder
addRepairItems
(@NonNull List<Item> repairItems, String molang) allowOffHand
(boolean allowOffHand) 是否允许副手持有build()
protected CustomItemDefinition
creativeGroup
(String creativeGroup) 控制自定义物品在创造栏的分组,例如所有的附魔书是一组customBuild
(Consumer<CompoundTag> nbt) 对要发送给客户端的物品ComponentNBT进行自定义处理,这里包含了所有对自定义物品的定义。在符合条件的情况下,你可以任意修改。foil
(boolean foil) handEquipped
(boolean handEquipped) 控制第三人称手持物品的显示方式renderOffsets
(@NonNull RenderOffsets renderOffsets) 控制自定义物品在不同视角下的渲染偏移
-
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:
-
renderOffsets
public CustomItemDefinition.SimpleBuilder renderOffsets(@NonNull @NonNull RenderOffsets renderOffsets) 控制自定义物品在不同视角下的渲染偏移Control rendering offsets of custom items at different viewpoints
-
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
-
addRepairItems
@Since("1.19.40-r1") protected CustomItemDefinition.SimpleBuilder addRepairItems(@NonNull @NonNull List<Item> repairItems, String molang)
-