If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
import crafttweaker . api.fluid . IFluidStack;
IFluidStack
implements the following interfaces:
CommandStringDisplayable
,DataComponentHolder
,ComponentAccess <IFluidStack >
Undocumented Interfaces IDataComponentHolderExtension
Checks if this IFluidStack, matches the given IFluidStack by checking if the fluids are the same, and if this fluid's amount is bigger than the given fluid's amount myIFluidStack in myIFluidStack
Return Type:
bool
Sets the fluid amount in MilliBuckets (mB) Parameters:
amount: int
Type: int
- The amount to multiply this stack
Return Type:
IFluidStack
Gets the fluid amount in MilliBuckets (mB). // IFluidStack.amount as long
Return Type:
long
myIFluidStack . applyComponents(myDataComponentMap);
Return Type:
IFluidStack
myIFluidStack . applyComponents(myDataComponentPatch);
Return Type:
IFluidStack
// IFluidStack.asIData() as IData ;
Return Type:
IData
Makes this stack mutable Returns : A new Stack, that is mutable.
myIFluidStack . asMutable();
Return Type:
IFluidStack
Gets the data in <componenttype:minecraft:attribute_modifiers> myIFluidStack . attributeModifiers
Return Type:
ItemAttributeModifiers
Gets the data in <componenttype:minecraft:banner_patterns> myIFluidStack . bannerPatterns
Return Type:
BannerPatternLayers
Gets the data in <componenttype:minecraft:base_color>
Return Type:
DyeColor
Gets the data in <componenttype:minecraft:block_entity_data> myIFluidStack . blockEntityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:bucket_entity_data> myIFluidStack . bucketEntityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:bundle_contents> myIFluidStack . bundleContents
Return Type:
BundleContents
Gets the data in <componenttype:minecraft:charged_projectiles> myIFluidStack . chargedProjectiles
Return Type:
ChargedProjectiles
Gets the data in <componenttype:minecraft:container_loot> myIFluidStack . containerLoot
Return Type:
SeededContainerLoot
Copies the stack. Only needed when mutable stacks are involved. Returns : A new stack, that contains the same info as this one
Return Type:
IFluidStack
Gets the data in <componenttype:minecraft:creative_slot_lock> // IFluidStack.creativeSlotLock as bool
myIFluidStack . creativeSlotLock
Return Type:
bool
Gets the data in the <componenttype:minecraft:custom_data>
Return Type:
CustomData
Gets the data in <componenttype:minecraft:custom_model_data> myIFluidStack . customModelData
Return Type:
CustomModelData
Gets the data in the <componenttype:minecraft:custom_name> A custom name is generally displayed in italics and controlled by the user.
Return Type:
Component
Gets the data in the <componenttype:minecraft:damage> // IFluidStack.damage as int
Return Type:
int
Gets the data in <componenttype:minecraft:debug_stick_state> myIFluidStack . debugStickState
Return Type:
DebugStickState
Gets the data in <componenttype:minecraft:dye_color>
Return Type:
DyedItemColor
Gets whether this fluid stack is empty. // IFluidStack.empty as bool
Return Type:
bool
Gets the empty IFluidStack Returns : The empty IFluidStack
Return Type:
IFluidStack
Gets the data in <componenttype:minecraft:enchantment_glint_override> If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments. // IFluidStack.enchantmentGlintOverride as bool
myIFluidStack . enchantmentGlintOverride
Return Type:
bool
Gets the data in <componenttype:minecraft:enchantments> myIFluidStack . enchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:entity_data>
Return Type:
CustomData
Gets the data in <componenttype:minecraft:firework_explosion> myIFluidStack . fireworkExplosion
Return Type:
FireworkExplosion
Gets the data in <componenttype:minecraft:fireworks>
Return Type:
Fireworks
Retrieves this fluid stack's fluid. // IFluidStack.fluid as Fluid
Return Type:
Fluid
Retrieves this fluid stack's fluid.
Return Type:
Fluid
Gets the data in <componenttype:minecraft:food>
Return Type:
FoodProperties
Checks whether the ComponentAccess has <componenttype:minecraft:attribute_modifiers> // IFluidStack.hasAttributeModifiers as bool
myIFluidStack . hasAttributeModifiers
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:banner_patterns> // IFluidStack.hasBannerPatterns as bool
myIFluidStack . hasBannerPatterns
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:base_color> Used for shield colouring. // IFluidStack.hasBaseColor as bool
myIFluidStack . hasBaseColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bees> // IFluidStack.hasBees as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:block_entity_data> // IFluidStack.hasBlockEntityData as bool
myIFluidStack . hasBlockEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:block_state> // IFluidStack.hasBlockState as bool
myIFluidStack . hasBlockState
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bucket_entity_data> // IFluidStack.hasBucketEntityData as bool
myIFluidStack . hasBucketEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bundle_contents> // IFluidStack.hasBundleContents as bool
myIFluidStack . hasBundleContents
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:can_break> // IFluidStack.hasCanBreak as bool
myIFluidStack . hasCanBreak
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:can_place_on> // IFluidStack.hasCanPlaceOn as bool
myIFluidStack . hasCanPlaceOn
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:charged_projectiles> This component is used for crossbows. // IFluidStack.hasChargedProjectiles as bool
myIFluidStack . hasChargedProjectiles
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:container> // IFluidStack.hasContainer as bool
myIFluidStack . hasContainer
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:container_loot> // IFluidStack.hasContainerLoot as bool
myIFluidStack . hasContainerLoot
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:custom_data> // IFluidStack.hasCustomData as bool
myIFluidStack . hasCustomData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:custom_model_data> // IFluidStack.hasCustomModelData as bool
myIFluidStack . hasCustomModelData
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:custom_name> // IFluidStack.hasCustomName as bool
myIFluidStack . hasCustomName
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:damage> // IFluidStack.hasDamage as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:debug_stick_state> // IFluidStack.hasDebugStickState as bool
myIFluidStack . hasDebugStickState
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:dyed_color> // IFluidStack.hasDyedColor as bool
myIFluidStack . hasDyedColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:enchantment_glint_override> // IFluidStack.hasEnchantmentGlintOverride as bool
myIFluidStack . hasEnchantmentGlintOverride
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:enchantments> // IFluidStack.hasEnchantments as bool
myIFluidStack . hasEnchantments
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:entity_data> // IFluidStack.hasEntityData as bool
myIFluidStack . hasEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:firework_explosion> // IFluidStack.hasFireworkExplosion as bool
myIFluidStack . hasFireworkExplosion
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:fireworks> // IFluidStack.hasFireworks as bool
myIFluidStack . hasFireworks
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:food> // IFluidStack.hasFood as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:instrument> // IFluidStack.hasInstrument as bool
myIFluidStack . hasInstrument
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:item_namegt; // IFluidStack.hasItemName as bool
myIFluidStack . hasItemName
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:lock> // IFluidStack.hasLock as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:lodestone_tracker> // IFluidStack.hasLodestoneTracker as bool
myIFluidStack . hasLodestoneTracker
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:lore> // IFluidStack.hasLore as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_color> // IFluidStack.hasMapColor as bool
myIFluidStack . hasMapColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_decorations> MapDecorations are additional elements that render on a map, such as waypoints. // IFluidStack.hasMapDecorations as bool
myIFluidStack . hasMapDecorations
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_id> // IFluidStack.hasMapId as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_post_processing> This componenet stores additional info on the map, such as the scale or whether to lock it. // IFluidStack.hasMapPostProcessing as bool
myIFluidStack . hasMapPostProcessing
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:max_damage> // IFluidStack.hasMaxDamage as bool
myIFluidStack . hasMaxDamage
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:max_stack_size> // IFluidStack.hasMaxStackSize as bool
myIFluidStack . hasMaxStackSize
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:note_block_sound> // IFluidStack.hasNoteBlockSound as bool
myIFluidStack . hasNoteBlockSound
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:ominous_bottle_amplifier> // IFluidStack.hasOminousBottleAmplifier as bool
myIFluidStack . hasOminousBottleAmplifier
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:pot_decorations> // IFluidStack.hasPotDecorations as bool
myIFluidStack . hasPotDecorations
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:potion_contents> Stores Potion Data on an item. // IFluidStack.hasPotionContents as bool
myIFluidStack . hasPotionContents
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:profile> // IFluidStack.hasProfile as bool
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:rarity> // IFluidStack.hasRarity as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:recipes> Used for Knowledge Books. // IFluidStack.hasRecipes as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:repair_cost> // IFluidStack.hasRepairCost as bool
myIFluidStack . hasRepairCost
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:stored_enchantments> The stored enchantments component is only present in enchanted books, since it just stores the enchantments under a lid for future use. The item is not enchanted. // IFluidStack.hasStoredEnchantments as bool
myIFluidStack . hasStoredEnchantments
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:suspicious_stew_effects> // IFluidStack.hasSuspiciousStewEffects as bool
myIFluidStack . hasSuspiciousStewEffects
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:tool> // IFluidStack.hasTool as bool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:trim> // IFluidStack.hasTrim as bool
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:unbreakable> // IFluidStack.hasUnbreakable as bool
myIFluidStack . hasUnbreakable
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:writable_book_content> // IFluidStack.hasWritableBookContent as bool
myIFluidStack . hasWritableBookContent
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:written_book_content> // IFluidStack.hasWrittenBookContent as bool
myIFluidStack . hasWrittenBookContent
Return Type:
bool
Gets the data in <componenttype:minecraft:hide_additional_tooltip> // IFluidStack.hideAdditionalTooltip as bool
myIFluidStack . hideAdditionalTooltip
Return Type:
bool
Gets the data in <componenttype:minecraft:hide_tooltip> // IFluidStack.hideTooltip as bool
myIFluidStack . hideTooltip
Return Type:
bool
Gets the data in <componenttype:minecraft:instrument>
Return Type:
Instrument
Gets the data in <componenttype:minecraft:fire_resistant> // IFluidStack.isFireResistant as bool
myIFluidStack . isFireResistant
Return Type:
bool
// IFluidStack.isImmutable as bool
myIFluidStack . isImmutable
Return Type:
bool
// IFluidStack.isImmutable() as bool;
myIFluidStack . isImmutable();
Return Type:
bool
Gets the data in <componenttype:minecraft:intangible_projectile> // IFluidStack.isIntangibleProjectile as bool
myIFluidStack . isIntangibleProjectile
Return Type:
bool
Gets the data in the <componenttype:minecraft:item_name> In the case of items, an item name is set by the make to make a special instance of an item, such as with ominous banners.
Return Type:
Component
Gets the data in <componenttype:minecraft:lock> // IFluidStack.lockComponent as LockCode myIFluidStack . lockComponent
Return Type:
LockCode
Gets the data in <componenttype:minecraft:lodestone_tracker> myIFluidStack . lodestoneTracker
Return Type:
LodestoneTracker
Gets the data in the <componenttype:minecraft:lore>
Return Type:
ItemLore
Gets the data in <componenttype:minecraft:map_color>
Return Type:
MapItemColor
Gets the data in <componenttype:minecraft:map_decorations> myIFluidStack . mapDecorations
Return Type:
MapDecorations
Gets the data in <componenttype:minecraft:map_id> // IFluidStack.mapId as MapId
Return Type:
MapId
Gets the data in <componenttype:minecraft:map_post_processing> myIFluidStack . mapPostProcessing
Return Type:
MapPostProcessing
Checks if this IFluidStack, matches the given IFluidStack by checking if the fluids are the same, and if this fluid's amount is bigger than the given fluid's amount Returns : true if this fluid contains the other fluid
myIFluidStack . matches(myIFluidStack);
Return Type:
bool
Gets the data in the <componenttype:minecraft:max_damage> // IFluidStack.maxDamage as int
Return Type:
int
Gets the data in the <componenttype:minecraft:max_stack_size> // IFluidStack.maxStackSize as int
myIFluidStack . maxStackSize
Return Type:
int
Gets the data in <componenttype:minecraft:note_block_sound> myIFluidStack . noteBlockSound
Return Type:
ResourceLocation
Gets the data in <componenttype:minecraft:ominous_bottle_amplifier> // IFluidStack.ominousBottleAmplifier as int
myIFluidStack . ominousBottleAmplifier
Return Type:
int
Gets the data in <componenttype:minecraft:pot_decorations> myIFluidStack . potDecorations
Return Type:
PotDecorations
Gets the data in <componenttype:minecraft:potion_contents> myIFluidStack . potionContents
Return Type:
PotionContents
Gets the data in <componenttype:minecraft:profile>
Return Type:
ResolvableProfile
Gets the data in the <componenttype:minecraft:rarity> // IFluidStack.rarity as Rarity
Return Type:
Rarity
Gets the data in <componenttype:minecraft:recipes>
Return Type:
List <ResourceLocation >
Gets the registry name for the fluid this stack is representing. myIFluidStack . registryName
Return Type:
ResourceLocation
myIFluidStack . remove < T>(myDataComponentType);
Return Type:
IFluidStack
Gets the data in <componenttype:minecraft:repair_cost> // IFluidStack.repairCost as int
Return Type:
int
Sets the fluid amount in MilliBuckets (mB) Returns : A new stack, or this stack, depending on if this stack is mutable
// IFluidStack.setAmount(amount as int) as IFluidStack ; myIFluidStack . setAmount( 1000 );
Parameters:
amount: int
Type: int
- The amount to multiply this stack
Return Type:
IFluidStack
Gets the data in <componenttype:minecraft:stored_enchantments> myIFluidStack . storedEnchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:suspicious_stew_effects> myIFluidStack . suspiciousStewEffects
Return Type:
SuspiciousStewEffects
Gets the data in <componenttype:minecraft:tool> // IFluidStack.tool as Tool
Return Type:
Tool
Gets the data in <componenttype:minecraft:trim>
Return Type:
ArmorTrim
Gets the data in the <componenttype:minecraft:unbreakable> myIFluidStack . unbreakable
Return Type:
Unbreakable
myIFluidStack . update < T, U>(myDataComponentType, myT, myU, myBiFunction);
Parameters:
defaultValue: T
Type: T
data: U
Type: U
operator: BiFunction <T , T , U >
Type: BiFunction <T , T , U >
Return Type:
IFluidStack
myIFluidStack . update < T>(myDataComponentType, myT, myUnaryOperator);
Parameters:
defaultValue: T
Type: T
operator: UnaryOperator <T >
Type: UnaryOperator <T >
Return Type:
IFluidStack
myIFluidStack . with < T>(myDataComponentType, myT);
Return Type:
IFluidStack
Sets the <componenttype:minecraft:attribute_modifiers> of the ComponentAccess to have the given ItemAttributeModifiers
Returns : The new instance with the modified data.
myIFluidStack . withAttributeModifiers( ItemAttributeModifiers . builder().add( < attribute : minecraft:player.block_break_speed > ,
AttributeModifier . create( "test" , 2.0 , < constant : minecraft:attribute/operation:add_value > , "596e0826-7c66-42c6-b3da-45a6d667ccf7" ),
< constant : minecraft:equipmentslot/group:mainhand > ).build(););
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
myIFluidStack . withAttributeModifiers(myEntry, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
myIFluidStack . withAttributeModifiers(myList, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given List<BannerPatternLayers.Layer> Returns : The new instance with the modified data.
myIFluidStack . withBannerPatterns(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given BannerPatternLayers
Returns : The new instance with the modified data.
myIFluidStack . withBannerPatterns(myBannerPatternLayers);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:base_color> of the ComponentAccess to have the given DyeColor
Returns : The new instance with the modified data.
myIFluidStack . withBaseColor(myDyeColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bees> of the ComponentAccess to have the given occupants Returns : The new instance with the modified data.
myIFluidStack . withBees(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myIFluidStack . withBlockEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myIFluidStack . withBlockEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_state> of the ComponentAccess to have the given BlockItemStateProperties
Returns : The new instance with the modified data.
myIFluidStack . withBlockState(myBlockItemStateProperties);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myIFluidStack . withBucketEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myIFluidStack . withBucketEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given contents Returns : The new instance with the modified data.
myIFluidStack . withBundleContents([ < item : minecraft:diamond > * 64 ]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given BundleContents
Returns : The new instance with the modified data.
myIFluidStack . withBundleContents(myBundleContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_break> with the given BlockPredicates. Any predicate that matches will allow the Block to be broken by this ItemStack. Returns : The new instance with the modified data.
myIFluidStack . withCanBreak( BlockPredicate . create().of( < block : minecraft:diamond_ore > ).build(), true );
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show the ability in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_break> of the ComponentAccess to have the given AdventureModePredicate
Returns : The new instance with the modified data.
myIFluidStack . withCanBreak(myAdventureModePredicate);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_place_on> with the given BlockPredicates. Any predicate that matches will allow the BlockItem within the ItemStack to be placed. Returns : The new instance with the modified data.
myIFluidStack . withCanPlaceOn( BlockPredicate . create().of( < block : minecraft:dirt > ).build(), myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show the restriction in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_place_on> of the ComponentAccess to have the given AdventureModePredicate
Returns : The new instance with the modified data.
myIFluidStack . withCanPlaceOn(myAdventureModePredicate);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given IItemStack
Returns : The new instance with the modified data.
myIFluidStack . withChargedProjectiles( < item : minecraft:arrow > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given items. Returns : The new instance with the modified data.
myIFluidStack . withChargedProjectiles([ < item : minecraft:arrow > ]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given ChargedProjectiles
Returns : The new instance with the modified data.
myIFluidStack . withChargedProjectiles(myChargedProjectiles);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given values. Returns : The new instance with the modified data.
myIFluidStack . withContainer(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given ItemContainerContents
Returns : The new instance with the modified data.
myIFluidStack . withContainer(myItemContainerContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given loot table and seed. Returns : The new instance with the modified data.
myIFluidStack . withContainerLoot(myResourceKey, myLong);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given SeededContainerLoot
Returns : The new instance with the modified data.
myIFluidStack . withContainerLoot(mySeededContainerLoot);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:creative_slot_lock> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myIFluidStack . withCreativeSlotLock();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myIFluidStack . withCustomData({custom_ammo_thing: 1 , owner: "Benji" });
Parameters:
customData: MapData
Type: MapData
- The MapData to set the component to.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myIFluidStack . withCustomData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_model_data> of the ComponentAccess to have the given value. Returns : The new instance with the modified data.
myIFluidStack . withCustomModelData( 2 );
Parameters:
value: int
Type: int
- The value to set the CustomModelData to
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
myIFluidStack . withCustomModelData(myCustomModelData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_name> of the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withCustomName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:damage> of the ComponentAccess to have the given value. Damage is related to durability. Using this on an item that has no maxDamage may have unforeseen issues. Returns : The new instance with the modified data.
myIFluidStack . withDamage( 16 );
Parameters:
damage: int
Type: int
- The new damage of the ComponentAccess.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:debug_stick_state> of the ComponentAccess to have the given DebugStickState
Returns : The new instance with the modified data.
myIFluidStack . withDebugStickState(myDebugStickState);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess. Returns : The new instance with the modified data.
// IFluidStack.withDyedColor(rgb as int, showInTooltip as bool = true) as ComponentAccess ; myIFluidStack . withDyedColor( 0xFFFF00 , true );
Parameters:
rgb: int
Type: int
- The colour to dye this item with
showInTooltip: bool
(optional) Type: bool
- Whether to show this information in a tooltip
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess to have the given DyedItemColor
Returns : The new instance with the modified data.
myIFluidStack . withDyedColor(myDyedItemColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given Enchantment
and level. Returns : The new instance with the modified data.
myIFluidStack . withEnchantment( < enchantment : minecraft:efficiency > , 4 );
Parameters:
level: int
(optional) Type: int
- The level of the enchantment to set
Default Value: 1
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantment_glint_override> of the ComponentAccess to have the given value. If it is false, the item will never render the enchantment glint If it is true, the item will render the enchantment glint always, indenpendently of whether it is enchanted or not. Returns : The new instance with the modified data.
// IFluidStack.withEnchantmentGlintOverride(value as bool) as ComponentAccess ; myIFluidStack . withEnchantmentGlintOverride( true );
Parameters:
value: bool
Type: bool
- The value of the override, as described above
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns : The new instance with the modified data.
myIFluidStack . withEnchantments(myItemEnchantments);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myIFluidStack . withEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myIFluidStack . withEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fire_resistant> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myIFluidStack . withFireResistant();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:firework_explosion> of the ComponentAccess to have the given FireworkExplosion
Returns : The new instance with the modified data.
myIFluidStack . withFireworkExplosion(myFireworkExplosion);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given duration and explosions. Returns : The new instance with the modified data.
myIFluidStack . withFireworks(myInt, myList);
Parameters:
flightDuration: int
Type: int
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given Fireworks
Returns : The new instance with the modified data.
myIFluidStack . withFireworks(myFireworks);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:food> of the ComponentAccess to have the given FoodProperties
Returns : The new instance with the modified data.
myIFluidStack . withFood(myFoodProperties);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_additional_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myIFluidStack . withHideAdditionalTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myIFluidStack . withHideTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:instrument> of the ComponentAccess to have the given Instrument
Returns : The new instance with the modified data.
myIFluidStack . withInstrument(myInstrument);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:intangible_projectile> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myIFluidStack . withIntangibleProjectile();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:item_name> of the ComponentAccess to have the given Component
Returns : The new instance with the modified data.
myIFluidStack . withItemName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
myIFluidStack . withJsonComponent(myDataComponentType, myIData);
Return Type:
IFluidStack
myIFluidStack . withJsonComponents(myIData);
Return Type:
IFluidStack
Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given string. Returns : The new instance with the modified data.
myIFluidStack . withLock(myString);
Parameters:
code: string
Type: string
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given LockCode
Returns : The new instance with the modified data.
myIFluidStack . withLock(myLockCode);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lodestone_tracker> of the ComponentAccess to have the given LodestoneTracker
Returns : The new instance with the modified data.
myIFluidStack . withLodestoneTracker(myLodestoneTracker);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given stdlib.List< Component
> Returns : The new instance with the modified data.
myIFluidStack . withLore([ Component . literal( "Found in a dark cave" ), Component . translatable( "Belonged to a Dragon" )]);
Parameters:
components: List <Component >
Type: List <Component >
- The list of Components to add as lore.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given ItemLore
Returns : The new instance with the modified data.
myIFluidStack . withLore(myItemLore);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withMapColor( 0xFF0000 );
Parameters:
rgb: int
Type: int
- The new map colour
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess to have the given MapItemColor
Returns : The new instance with the modified data.
myIFluidStack . withMapColor(myMapItemColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given values. Returns : The new instance with the modified data.
myIFluidStack . withMapDecorations(myMap);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given MapDecorations
Returns : The new instance with the modified data.
myIFluidStack . withMapDecorations(myMapDecorations);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given value. A map id is only useful after the game generates one to store data. Therefore, you should always pass in the parameter for an id you know is available. Returns : The new instance with the modified data.
myIFluidStack . withMapId(myInt);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given MapId
Returns : The new instance with the modified data.
myIFluidStack . withMapId(myMapId);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_post_processing> of the ComponentAccess to have the given MapPostProcessing
Returns : The new instance with the modified data.
myIFluidStack . withMapPostProcessing(myMapPostProcessing);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:max_damage> of the ComponentAccess to have the given value. It is likely that you need to call withDamage(0) in order for some things to function properly. Returns : The new instance with the modified data.
myIFluidStack . withMaxDamage( 1024 );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:stack_size> of the ComponentAccess to have the given value. Non standard stack sizes may render differently and may not be handled correctly by all mods. Test your changes! Returns : The new instance with the modified data.
myIFluidStack . withMaxStackSize( 16 );
Parameters:
maxStackSize: int
Type: int
- The new maxStackSize of the ComponentAccess.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:note_block_sound> of the ComponentAccess to have the given ResourceLocation
Returns : The new instance with the modified data.
myIFluidStack . withNoteBlockSound(myResourceLocation);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:ominous_bottle_amplifier> of the ComponentAccess to have the given amplifier. Returns : The new instance with the modified data.
// IFluidStack.withOminousBottleAmplifier(amplifier as int) as ComponentAccess ; myIFluidStack . withOminousBottleAmplifier(myInt);
Return Type:
ComponentAccess
myIFluidStack . without < T>(myDataComponentType);
Return Type:
IFluidStack
Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutAttributeModifiers();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutBannerPatterns();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:base_color> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutBaseColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bees> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutBees();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutBlockEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_state> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutBlockState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutBucketEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutBundleContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_break> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutCanBreak();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutCanPlaceOn();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutChargedProjectiles();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutContainer();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container_loot> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutContainerLoot();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutCreativeSlotLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_data> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutCustomData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutCustomModelData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_name> from the ComponentAccess Returns : The new instance with the modified data.
myIFluidStack . withoutCustomName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:damage> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutDebugStickState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutDyedColor();
Return Type:
ComponentAccess
Removes the Enchantment
from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutEnchantment( < enchantment : minecraft:mending > );
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:enchantment_glint_override> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutEntityDate();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutFireResistant();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutFireworkExplosion();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fireworks> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutFireworks();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:food> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutFood();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutHideTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:instrument> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutInstrument();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutIntangibleProjectile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:item_name> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutItemName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lock> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutLodestoneTracker();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lore> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutLore();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_color> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutMapColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutMapDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_id> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutMapId();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutMapPostProcessing();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:max_damage> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutMaxDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stack_size> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutMaxStackSize();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutNoteBlockSound();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutPotDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutPotionContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:profile> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutProfile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:rarity> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutRarity();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:recipes> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutRecipes();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutRepairCost();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutStoredEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:tool> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutTool();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:trim> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutTrim();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess Returns : The new instance with the modified data.
myIFluidStack . withoutUnbreakable();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutWritableBookContent();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
myIFluidStack . withoutWrittenBookContent();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given items. Returns : The new instance with the modified data.
myIFluidStack . withPotDecorations(myItem, myItem, myItem, myItem);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given PotDecorations
Returns : The new instance with the modified data.
myIFluidStack . withPotDecorations(myPotDecorations);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and no custom effects Returns : The new instance with the modified data.
myIFluidStack . withPotionContents( < potion : minecraft:swiftness > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and the given MobEffectInstance
effects. Returns : The new instance with the modified data.
myIFluidStack . withPotionContents( < potion : minecraft:swiftness > , [ MobEffectInstance . of( < mobeffect : minecraft:strength > , 20 * 20 , 1 , false , false , true )]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and the given MobEffectInstance
effects. Returns : The new instance with the modified data.
myIFluidStack . withPotionContents( < potion : minecraft:swiftness > , 0xFFFFFF00 , [ MobEffectInstance . of( < mobeffect : minecraft:strength > , 20 * 20 , 1 , false , false , true )]);
Parameters:
customColor: int
Type: int
- The ARGB color the potion will have.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given PotionContents
Returns : The new instance with the modified data.
myIFluidStack . withPotionContents(myPotionContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:profile> of the ComponentAccess to have the given ResolvableProfile
Returns : The new instance with the modified data.
myIFluidStack . withProfile(myResolvableProfile);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:rarity> of the ComponentAccess to have the given Rarity
Returns : The new instance with the modified data.
myIFluidStack . withRarity( < constant : minecraft:item/rarity:epic > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:recipes> of the ComponentAccess to have the given List<ResourceLocation> Returns : The new instance with the modified data.
myIFluidStack . withRecipes(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:repair_cost> of the ComponentAccess to have the given value. Returns : The new instance with the modified data.
myIFluidStack . withRepairCost( 20 );
Parameters:
cost: int
Type: int
- The repair cost
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:stored_enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns : The new instance with the modified data.
myIFluidStack . withStoredEnchantments(myItemEnchantments);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
SuspiciousStewEffects.Entry is effectively a pair of Effect and duration. Returns : The new instance with the modified data.
myIFluidStack . withSuspiciousStewEffects(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
Returns : The new instance with the modified data.
myIFluidStack . withSuspiciousStewEffects(mySuspiciousStewEffects);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given data. A Tool
instance is constructed from the parameters. Returns : The new instance with the modified data.
// IFluidStack.withTool(rules as List< ToolRule >, defaultMiningSpeed as float, damagePerBlock as int) as ComponentAccess ; myIFluidStack . withTool([ ToolRule . minesAndDrops( < tag : blocks:minecraft:planks > , 6.0f )], 0.25f , 1 );
Parameters:
rules: List <ToolRule >
Type: List <ToolRule >
- The list of rules the new Tool instance will have defaultMiningSpeed: float
Type: float
- The default mining speed of the new tool
damagePerBlock: int
Type: int
- The damage or durability that is dealt to the Tool after use.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given Tool
Returns : The new instance with the modified data.
myIFluidStack . withTool(myTool);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:trim> of the ComponentAccess to have the given ArmorTrim
Returns : The new instance with the modified data.
myIFluidStack . withTrim(myArmorTrim);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable. Returns : The new instance with the modified data.
// IFluidStack.withUnbreakable(showInTooltip as bool = true) as ComponentAccess ; myIFluidStack . withUnbreakable(myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show that the ComponentAccess is unbreakable in a tooltip.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable. Returns : The new instance with the modified data.
myIFluidStack . withUnbreakable(myUnbreakable);
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
myIFluidStack . withWritableBookContent(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:writable_book_content> of the ComponentAccess to have the given WritableBookContent
Returns : The new instance with the modified data.
myIFluidStack . withWritableBookContent(myWritableBookContent);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:written_book_content> of the ComponentAccess to have the given WrittenBookContent
Returns : The new instance with the modified data.
myIFluidStack . withWrittenBookContent(myWrittenBookContent);
Return Type:
ComponentAccess
Gets the data in <componenttype:minecraft:writable_book_content> myIFluidStack . writableBookContent
Return Type:
WritableBookContent
Gets the data in <componenttype:minecraft:written_book_content> myIFluidStack . writtenBookContent
Return Type:
WrittenBookContent