API reference Obsidian.API.Inventory.DataComponents
ComponentBuilder class
public static class ComponentBuilder
In Obsidian.API.
Properties
public static SimpleDataComponent<int> AdditionalTradeCost { get; }public static AttributeModifiersDataComponent AttributeModifiers { get; }public static BannerPatternsDataComponent BannerPatterns { get; }public static SimpleDataComponent<Dye> BaseColor { get; }public static BeesDataComponent Bees { get; }public static EntityDataComponent BlockEntityData { get; }public static SimpleDataComponent<ImmutableArray<BlockStateProperty>> BlockState { get; }BlockTransformer
public static SimpleDataComponent<string> BlockTransformer { get; }A named block transformer, such as minecraft:hoe.
public static SimpleDataComponent<FuelComponentData> BrewingFuel { get; }public static BucketEntityDataComponent BucketEntityData { get; }public static SimpleDataComponent<ImmutableArray<ItemStack>> BundleContents { get; }public static SimpleDataComponent<ImmutableArray<ItemStack>> ChargedProjectiles { get; }public static SimpleDataComponent<ComponentIntValue> Compostable { get; }Consumable
public static ConsumableDataComponent Consumable { get; }Vanilla's minecraft:consumable for food: eaten in 1.6 seconds, with the eating animation, sound and particles, and no effects.
public static SimpleDataComponent<ImmutableArray<ItemStack>> Container { get; }public static SimpleDataComponent<NbtCompound> ContainerLoot { get; }public static SimpleDataComponent<FuelComponentData> CookingFuel { get; }CreativeSlotLock
public static SimpleDataComponent CreativeSlotLock { get; }Marks the item as non-interactive on the creative inventory (the first 5 rows of items). This is used internally by the client on the paper icon in the saved hot-bars tab.
public static SimpleDataComponent<Dye> CushionColor { get; }public static SimpleDataComponent<NbtCompound> CustomData { get; }public static CustomModelDataComponent CustomModelData { get; }public static SimpleDataComponent<ChatMessage> CustomName { get; }public static SimpleDataComponent<int> Damage { get; }DamageResistant
public static SimpleDataComponent<IdSet> DamageResistant { get; }Marks this item as damage resistant. The client won't render the item as being on-fire if this component is present.
public static SimpleDataComponent<ImmutableArray<IConsumeEffect>> DeathProtection { get; }public static SimpleDataComponent<NbtCompound> DebugStickState { get; }public static List<DataComponent> DefaultItemComponents { get; }public static SimpleDataComponent<Dye> Dye { get; }public static SimpleDataComponent<int> DyedColor { get; }public static SimpleDataComponent<int> Enchantable { get; }public static SimpleDataComponent<bool> EnchantmentGlintOverride { get; }public static SimpleDataComponent<ImmutableArray<Enchantment>> Enchantments { get; }public static EntityDataComponent EntityData { get; }Equippable
public static EquippableDataComponent Equippable { get; }A minecraft:equippable with vanilla's defaults: the generic armour equip sound, dispensable, swappable by using it, and damaged when its wearer is hurt. Set its slot.
public static SimpleDataComponent<FireworkExplosion> FireworkExplosion { get; }Food
public static FoodDataComponent Food { get; }A minecraft:food giving nothing; set its nutrition and saturation modifier.
public static SimpleDataComponent Glider { get; }public static InstrumentDataComponent Instrument { get; }public static SimpleDataComponent<NbtCompound> IntangibleProjectile { get; }public static SimpleDataComponent<string> ItemModel { get; }public static SimpleDataComponent<ChatMessage> ItemName { get; }public static SimpleDataComponent<NbtCompound> Lock { get; }public static SimpleDataComponent<ImmutableArray<ChatMessage>> Lore { get; }public static SimpleDataComponent<int> MapId { get; }public static SimpleDataComponent<MapPostProcessingType> MapPostProcessing { get; }public static SimpleDataComponent<int> MaxDamage { get; }public static SimpleDataComponent<int> MaxStackSize { get; }public static SimpleDataComponent<MobVisibilityData> MobVisibility { get; }public static SimpleDataComponent<string> NoteBlockSound { get; }public static SimpleDataComponent<int> OminousBottleAmplifier { get; }PotDecorations
public static SimpleDataComponent<ImmutableArray<ItemStack>> PotDecorations { get; }Back, left, right and front templates; absent faces are null.
ProvidesPotteryPattern
public static SimpleDataComponent<string> ProvidesPotteryPattern { get; }The decorated pot pattern supplied by this stack.
public static SimpleDataComponent<ItemRarity> Rarity { get; }public static SimpleDataComponent<ImmutableArray<string>> Recipes { get; }public static SimpleDataComponent<IdSet> Repairable { get; }RepairCost
public static SimpleDataComponent<int> RepairCost { get; }Accumulated anvil usage cost. The client displays "Too Expensive" if the value is greater than 40 and the player is not in creative mode (more specifically, if they don't have the insta-build flag enabled). This behavior can be overridden by setting the level with the Set Container Property packet.
public static SimpleDataComponent<ImmutableArray<Enchantment>> StoredEnchantments { get; }public static SimpleDataComponent<ItemStack> SulfurCubeContent { get; }public static SimpleDataComponent<ImmutableArray<SuspiciousStewEffect>> SuspiciousStewEffects { get; }Tool
public static ToolDataComponent Tool { get; }A minecraft:tool without rules, mining at speed 1 and taking 1 damage per block, like vanilla's defaults.
public static SimpleDataComponent<string> TooltipStyle { get; }public static SimpleDataComponent<bool> Unbreakable { get; }public static SimpleDataComponent<ItemStack> UseRemainder { get; }public static SimpleDataComponent<int> VillagerFood { get; }public static SimpleDataComponent Waxed { get; }public static SimpleDataComponent<ImmutableArray<Page>> WritableBookContent { get; }public static WrittenBookDataComponent WrittenBookContent { get; }Methods
public static SimpleDataComponent<TValue> BuildSimpleComponent<TValue>(DataComponentType type, string identifier, Action<INetStreamWriter, TValue> writer, Func<INetStreamReader, TValue> reader, Func<TValue, TValue> copy = null);public static DataComponent Create(DataComponentType type);