IFluidStack
Link to ifluidstack
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.fluid.IFluidStack;
Implemented Interfaces
Link to implemented-interfaces
IFluidStack implements the following interfaces. That means all methods defined in these interfaces are also available in IFluidStack
Static Methods
Link to static-methods
Name: empty
Gets the empty IFluidStack
Returns: The empty IFluidStack
Return Type: IFluidStack
ZenScript Copy// IFluidStack.empty() as IFluidStack
IFluidStack.empty();
Casters
Link to casters
Result Type | Is Implicit |
---|---|
Result Type Fluid | Is Implicit true |
Result Type FluidIngredient | Is Implicit true |
Result Type IData | Is Implicit true |
Methods
Link to methods
Name: applyComponents
Return Type: IFluidStack
ZenScript CopyIFluidStack.applyComponents(map as DataComponentMap) as IFluidStack
Parameter | Type |
---|---|
Parameter map | Type DataComponentMap |
Name: applyComponents
Return Type: IFluidStack
ZenScript CopyIFluidStack.applyComponents(patch as DataComponentPatch) as IFluidStack
Parameter | Type |
---|---|
Parameter patch | Type DataComponentPatch |
Name: asIData
Return Type: IData
ZenScript Copy// IFluidStack.asIData() as IData
myIFluidStack.asIData();
Name: asImmutable
Return Type: IFluidStack
ZenScript Copy// IFluidStack.asImmutable() as IFluidStack
myIFluidStack.asImmutable();
Name: asMutable
Makes this stack mutable
Returns: A new Stack, that is mutable.
Return Type: IFluidStack
ZenScript Copy// IFluidStack.asMutable() as IFluidStack
myIFluidStack.asMutable();
Name: copy
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
ZenScript Copy// IFluidStack.copy() as IFluidStack
myIFluidStack.copy();
Name: isImmutable
Return Type: boolean
ZenScript Copy// IFluidStack.isImmutable() as boolean
myIFluidStack.isImmutable();
Name: matches
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
Return Type: boolean
ZenScript CopyIFluidStack.matches(other as IFluidStack) as boolean
Parameter | Type | Description |
---|---|---|
Parameter other | Type IFluidStack | Description other IFluidStack to compare against |
Name: remove
Return Type: IFluidStack
ZenScript CopyIFluidStack.remove<T : Object>(type as DataComponentType<T>) as IFluidStack
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter T | Type Object |
Name: setAmount
Sets the fluid amount in MilliBuckets (mB)
Returns: A new stack, or this stack, depending on if this stack is mutable
Return Type: IFluidStack
ZenScript Copy// IFluidStack.setAmount(amount as int) as IFluidStack
myIFluidStack.setAmount(1000);
Parameter | Type | Description |
---|---|---|
Parameter amount | Type int | Description The amount to multiply this stack |
Name: update
Return Type: IFluidStack
ZenScript CopyIFluidStack.update<T : Object>(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as IFluidStack
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter defaultValue | Type T |
Parameter operator | Type UnaryOperator<T> |
Parameter T | Type Object |
Name: update
Return Type: IFluidStack
ZenScript CopyIFluidStack.update<T : Object, U : Object>(type as DataComponentType<T>, defaultValue as T, data as U, operator as BiFunction<T,U,T>) as IFluidStack
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter defaultValue | Type T |
Parameter data | Type U |
Parameter operator | Type BiFunction<T,U,T> |
Parameter T | Type Object |
Parameter U | Type Object |
Name: with
Return Type: IFluidStack
ZenScript CopyIFluidStack.with<T : Object>(type as DataComponentType<T>, value as @org.openzen.zencode.java.ZenCodeType.Nullable T) as IFluidStack
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter value | Type @org.openzen.zencode.java.ZenCodeType.Nullable T |
Parameter T | Type Object |
Name: withAttributeModifiers
Sets the <componenttype:minecraft:attribute_modifiers> of the ComponentAccess to have the given ItemAttributeModifiers
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withAttributeModifiers(modifiers as ItemAttributeModifiers) as T
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(););
Parameter | Type | Description |
---|---|---|
Parameter modifiers | Type ItemAttributeModifiers | Description The attributes to give to the item. |
Name: withAttributeModifiers
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withAttributeModifiers(modifier as ItemAttributeModifiersEntry, showInTooltip as boolean) as T
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter modifier | Type ItemAttributeModifiersEntry | Optional false | Default Value ​ |
Parameter showInTooltip | Type boolean | Optional true | Default Value true |
Name: withAttributeModifiers
Return Type: T
ZenScript CopyIFluidStack.withAttributeModifiers(modifiers as stdlib.List<ItemAttributeModifiersEntry>, showInTooltip as boolean) as T
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter modifiers | Type stdlib.List<ItemAttributeModifiersEntry> | Optional false | Default Value ​ |
Parameter showInTooltip | Type boolean | Optional true | Default Value true |
Name: withBannerPatterns
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given BannerPatternLayers
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withBannerPatterns(layers as BannerPatternLayers) as T
Parameter | Type |
---|---|
Parameter layers | Type BannerPatternLayers |
Name: withBannerPatterns
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given stdlib.List<BannerPatternLayersLayer>
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withBannerPatterns(layers as stdlib.List<BannerPatternLayersLayer>) as T
Parameter | Type |
---|---|
Parameter layers | Type stdlib.List<BannerPatternLayersLayer> |
Name: withBees
Sets the <componenttype:minecraft:bees> of the ComponentAccess to have the given occupants
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withBees(occupants as stdlib.List<BeehiveBlockEntityOccupant>) as T
Parameter | Type |
---|---|
Parameter occupants | Type stdlib.List<BeehiveBlockEntityOccupant> |
Name: withBlockEntityData
Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given CustomData
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withBlockEntityData(data as CustomData) as T
Parameter | Type |
---|---|
Parameter data | Type CustomData |
Name: withBlockState
Sets the <componenttype:minecraft:block_state> of the ComponentAccess to have the given BlockItemStateProperties
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withBlockState(properties as BlockItemStateProperties) as T
Parameter | Type |
---|---|
Parameter properties | Type BlockItemStateProperties |
Name: withBucketEntityData
Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given CustomData
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withBucketEntityData(data as CustomData) as T
Parameter | Type |
---|---|
Parameter data | Type CustomData |
Name: withBundleContents
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given BundleContents
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withBundleContents(contents as BundleContents) as T
Parameter | Type |
---|---|
Parameter contents | Type BundleContents |
Name: withBundleContents
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given contents
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withBundleContents(contents as stdlib.List<IItemStack>) as T
myIFluidStack.withBundleContents([<item:minecraft:diamond> * 64]);
Parameter | Type | Description |
---|---|---|
Parameter contents | Type stdlib.List<IItemStack> | Description A list of items to store within. |
Name: withCanBreak
Sets the <componenttype:minecraft:can_break> of the ComponentAccess to have the given AdventureModePredicate
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withCanBreak(predicate as AdventureModePredicate) as T
Parameter | Type | Description |
---|---|---|
Parameter predicate | Type AdventureModePredicate | Description The adventure mode predicate to use to determine whether the item can be used to break a block. |
Name: withCanBreak
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.
Return Type: T
ZenScript Copy// IFluidStack.withCanBreak(predicates as stdlib.List<BlockPredicate>, showInTooltip as boolean) as T
myIFluidStack.withCanBreak(BlockPredicate.create().of(<block:minecraft:diamond_ore>).build(), true);
Parameter | Type | Description | Optional | Default Value |
---|---|---|---|---|
Parameter predicates | Type stdlib.List<BlockPredicate> | Description The collection of predicates to test for | Optional false | Default Value ​ |
Parameter showInTooltip | Type boolean | Description Whether to show the ability in the tooltip or not. | Optional true | Default Value true |
Name: withCanPlaceOn
Sets the <componenttype:minecraft:can_place_on> of the ComponentAccess to have the given AdventureModePredicate
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withCanPlaceOn(predicate as AdventureModePredicate) as T
Parameter | Type | Description |
---|---|---|
Parameter predicate | Type AdventureModePredicate | Description The adventure mode predicate to use to determine whether the current block can be placed on another block. |
Name: withCanPlaceOn
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.
Return Type: T
ZenScript CopyIFluidStack.withCanPlaceOn(predicates as stdlib.List<BlockPredicate>, showInTooltip as boolean) as T
Parameter | Type | Description | Optional | Default Value |
---|---|---|---|---|
Parameter predicates | Type stdlib.List<BlockPredicate> | Description The collection of predicates to test for | Optional false | Default Value ​ |
Parameter showInTooltip | Type boolean | Description Whether to show the restriction in the tooltip or not. | Optional true | Default Value true |
Name: withChargedProjectiles
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given ChargedProjectiles
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withChargedProjectiles(chargedProjectiles as ChargedProjectiles) as T
Parameter | Type |
---|---|
Parameter chargedProjectiles | Type ChargedProjectiles |
Name: withChargedProjectiles
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given IItemStack
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withChargedProjectiles(item as IItemStack) as T
myIFluidStack.withChargedProjectiles(<item:minecraft:arrow>);
Parameter | Type | Description |
---|---|---|
Parameter item | Type IItemStack | Description The item to store within. |
Name: withChargedProjectiles
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given items.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withChargedProjectiles(items as stdlib.List<IItemStack>) as T
myIFluidStack.withChargedProjectiles([<item:minecraft:arrow>]);
Parameter | Type | Description |
---|---|---|
Parameter items | Type stdlib.List<IItemStack> | Description The items to store within. |
Name: withContainer
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given ItemContainerContents
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withContainer(contents as ItemContainerContents) as T
Parameter | Type |
---|---|
Parameter contents | Type ItemContainerContents |
Name: withContainer
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given values.
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withContainer(contents as stdlib.List<IItemStack>) as T
Parameter | Type |
---|---|
Parameter contents | Type stdlib.List<IItemStack> |
Name: withContainerLoot
Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given SeededContainerLoot
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withContainerLoot(loot as SeededContainerLoot) as T
Parameter | Type |
---|---|
Parameter loot | Type SeededContainerLoot |
Name: withContainerLoot
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.
Return Type: T
ZenScript CopyIFluidStack.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as T
Parameter | Type |
---|---|
Parameter lootTable | Type ResourceKey<LootTable> |
Parameter seed | Type long |
Name: withCreativeSlotLock
Sets the <componenttype:minecraft:creative_slot_lock> of the ComponentAccess to exist.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withCreativeSlotLock() as T
myIFluidStack.withCreativeSlotLock();
Name: withCustomData
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given CustomData
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withCustomData(customData as CustomData) as T
Parameter | Type |
---|---|
Parameter customData | Type CustomData |
Name: withCustomData
Sets the componenttype:minecraft:custom_data of the ComponentAccess to have the given MapData
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withCustomData(customData as MapData) as T
myIFluidStack.withCustomData({custom_ammo_thing: 1, owner: "Benji"});
Parameter | Type | Description |
---|---|---|
Parameter customData | Type MapData | Description The MapData to set the component to. |
Name: withCustomModelData
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withCustomModelData(data as CustomModelData) as T
Parameter | Type |
---|---|
Parameter data | Type CustomModelData |
Name: withCustomModelData
Sets the <componenttype:minecraft:custom_model_data> of the ComponentAccess to have the given value.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withCustomModelData(value as int) as T
myIFluidStack.withCustomModelData(2);
Parameter | Type | Description |
---|---|---|
Parameter value | Type int | Description The value to set the CustomModelData to |
Name: withCustomName
Sets the <componenttype:minecraft:custom_name> of the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withCustomName(name as Component) as T
myIFluidStack.withCustomName(Component.literal("Fancy Water"));
myIFluidStack.withCustomName(Component.translatable("mypack.lore.fancy_water"));
Parameter | Type | Description |
---|---|---|
Parameter name | Type Component | Description The component to use. |
Name: withDamage
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.
Return Type: T
ZenScript Copy// IFluidStack.withDamage(damage as int) as T
myIFluidStack.withDamage(16);
Parameter | Type | Description |
---|---|---|
Parameter damage | Type int | Description The new damage of the ComponentAccess. |
Name: withDebugStickState
Sets the <componenttype:minecraft:debug_stick_state> of the ComponentAccess to have the given DebugStickState
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withDebugStickState(state as DebugStickState) as T
Parameter | Type |
---|---|
Parameter state | Type DebugStickState |
Name: withDyedColor
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess to have the given DyedItemColor
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withDyedColor(color as DyedItemColor) as T
Parameter | Type |
---|---|
Parameter color | Type DyedItemColor |
Name: withDyedColor
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withDyedColor(rgb as int, showInTooltip as boolean) as T
myIFluidStack.withDyedColor(0xFFFF00, true);
Parameter | Type | Description | Optional | Default Value |
---|---|---|---|---|
Parameter rgb | Type int | Description The colour to dye this item with | Optional false | Default Value ​ |
Parameter showInTooltip | Type boolean | Description Whether to show this information in a tooltip | Optional true | Default Value true |
Name: withEnchantment
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given Enchantment and level.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withEnchantment(enchantment as Enchantment, level as int) as T
myIFluidStack.withEnchantment(<enchantment:minecraft:efficiency>, 4);
Parameter | Type | Description | Optional | Default Value |
---|---|---|---|---|
Parameter enchantment | Type Enchantment | Description The enchantment to add | Optional false | Default Value ​ |
Parameter level | Type int | Description The level of the enchantment to set | Optional true | Default Value 1 |
Name: withEnchantmentGlintOverride
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.
Return Type: T
ZenScript Copy// IFluidStack.withEnchantmentGlintOverride(value as boolean) as T
myIFluidStack.withEnchantmentGlintOverride(true);
Parameter | Type | Description |
---|---|---|
Parameter value | Type boolean | Description The value of the override, as described above |
Name: withEnchantments
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withEnchantments(enchantments as ItemEnchantments) as T
Parameter | Type |
---|---|
Parameter enchantments | Type ItemEnchantments |
Name: withEntityData
Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given CustomData
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withEntityData(data as CustomData) as T
Parameter | Type |
---|---|
Parameter data | Type CustomData |
Name: withFireResistant
Sets the <componenttype:minecraft:fire_resistant> of the ComponentAccess to exist.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withFireResistant() as T
myIFluidStack.withFireResistant();
Name: withFireworkExplosion
Sets the <componenttype:minecraft:firework_explosion> of the ComponentAccess to have the given FireworkExplosion
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withFireworkExplosion(explosion as FireworkExplosion) as T
Parameter | Type |
---|---|
Parameter explosion | Type FireworkExplosion |
Name: withFireworks
Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given duration and explosions.
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withFireworks(flightDuration as int, explosions as stdlib.List<FireworkExplosion>) as T
Parameter | Type |
---|---|
Parameter flightDuration | Type int |
Parameter explosions | Type stdlib.List<FireworkExplosion> |
Name: withFood
Sets the <componenttype:minecraft:food> of the ComponentAccess to have the given FoodProperties
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withFood(food as FoodProperties) as T
Parameter | Type |
---|---|
Parameter food | Type FoodProperties |
Name: withHideAdditionalTooltip
Sets the <componenttype:minecraft:hide_additional_tooltip> of the ComponentAccess to exist.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withHideAdditionalTooltip() as T
myIFluidStack.withHideAdditionalTooltip();
Name: withHideTooltip
Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withHideTooltip() as T
myIFluidStack.withHideTooltip();
Name: withInstrument
Sets the <componenttype:minecraft:instrument> of the ComponentAccess to have the given Instrument
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withInstrument(instrument as Instrument) as T
Parameter | Type |
---|---|
Parameter instrument | Type Instrument |
Name: withIntangibleProjectile
Sets the <componenttype:minecraft:intangible_projectile> of the ComponentAccess to exist.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withIntangibleProjectile() as T
myIFluidStack.withIntangibleProjectile();
Name: withItemName
Sets the <componenttype:minecraft:item_name> of the ComponentAccess to have the given Component
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withItemName(name as Component) as T
myIFluidStack.withItemName(Component.literal("Fancy Water"));
myIFluidStack.withItemName(Component.translatable("mypack.lore.fancy_water"));
Parameter | Type |
---|---|
Parameter name | Type Component |
Name: withJsonComponent
Return Type: IFluidStack
ZenScript CopyIFluidStack.withJsonComponent(type as DataComponentType, value as IData?) as IFluidStack
Parameter | Type |
---|---|
Parameter type | Type DataComponentType |
Parameter value | Type IData? |
Name: withJsonComponents
Return Type: IFluidStack
ZenScript CopyIFluidStack.withJsonComponents(value as IData) as IFluidStack
Parameter | Type |
---|---|
Parameter value | Type IData |
Name: withLock
Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given string.
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withLock(code as string) as T
Parameter | Type |
---|---|
Parameter code | Type string |
Name: withLodestoneTracker
Sets the <componenttype:minecraft:lodestone_tracker> of the ComponentAccess to have the given LodestoneTracker
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withLodestoneTracker(tracker as LodestoneTracker) as T
Parameter | Type |
---|---|
Parameter tracker | Type LodestoneTracker |
Name: withLore
Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given stdlib.List<Component>
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withLore(components as stdlib.List<Component>) as T
myIFluidStack.withLore([Component.literal("Found in a dark cave"), Component.translatable("Belonged to a Dragon")]);
Parameter | Type | Description |
---|---|---|
Parameter components | Type stdlib.List<Component> | Description The list of Components to add as lore. |
Name: withMapColor
Sets the <componenttype:minecraft:map_color> of the ComponentAccess to have the given MapItemColor
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withMapColor(color as MapItemColor) as T
Parameter | Type |
---|---|
Parameter color | Type MapItemColor |
Name: withMapColor
Sets the <componenttype:minecraft:map_color> of the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withMapColor(rgb as int) as T
myIFluidStack.withMapColor(0xFF0000);
Parameter | Type | Description |
---|---|---|
Parameter rgb | Type int | Description The new map colour |
Name: withMapDecorations
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given MapDecorations
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withMapDecorations(decorations as MapDecorations) as T
Parameter | Type |
---|---|
Parameter decorations | Type MapDecorations |
Name: withMapDecorations
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given values.
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withMapDecorations(decorations as MapDecorationsEntry[string]) as T
Parameter | Type |
---|---|
Parameter decorations | Type MapDecorationsEntry[string] |
Name: withMapId
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.
Return Type: T
ZenScript CopyIFluidStack.withMapId(id as int) as T
Parameter | Type |
---|---|
Parameter id | Type int |
Name: withMapPostProcessing
Sets the <componenttype:minecraft:map_post_processing> of the ComponentAccess to have the given MapPostProcessing
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withMapPostProcessing(value as MapPostProcessing) as T
Parameter | Type |
---|---|
Parameter value | Type MapPostProcessing |
Name: withMaxDamage
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.
Return Type: T
ZenScript Copy// IFluidStack.withMaxDamage(maxDamage as int) as T
myIFluidStack.withMaxDamage(1024);
myIFluidStack.withMaxDamage(1024);
Parameter | Type |
---|---|
Parameter maxDamage | Type int |
Name: withMaxStackSize
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.
Return Type: T
ZenScript Copy// IFluidStack.withMaxStackSize(maxStackSize as int) as T
myIFluidStack.withMaxStackSize(16);
Parameter | Type | Description |
---|---|---|
Parameter maxStackSize | Type int | Description The new maxStackSize of the ComponentAccess. |
Name: withNoteBlockSound
Sets the <componenttype:minecraft:note_block_sound> of the ComponentAccess to have the given ResourceLocation
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withNoteBlockSound(sound as ResourceLocation) as T
Parameter | Type |
---|---|
Parameter sound | Type ResourceLocation |
Name: withOminousBottleAmplifier
Sets the <componenttype:minecraft:ominous_bottle_amplifier> of the ComponentAccess to have the given amplifier.
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withOminousBottleAmplifier(amplifier as int) as T
Parameter | Type |
---|---|
Parameter amplifier | Type int |
Name: withPotDecorations
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given PotDecorations
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withPotDecorations(decorations as PotDecorations) as T
Parameter | Type |
---|---|
Parameter decorations | Type PotDecorations |
Name: withPotDecorations
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given items.
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withPotDecorations(back as ItemDefinition, left as ItemDefinition, right as ItemDefinition, front as ItemDefinition) as T
Parameter | Type |
---|---|
Parameter back | Type ItemDefinition |
Parameter left | Type ItemDefinition |
Parameter right | Type ItemDefinition |
Parameter front | Type ItemDefinition |
Name: withPotionContents
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given PotionContents
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withPotionContents(contents as PotionContents) as T
Parameter | Type |
---|---|
Parameter contents | Type PotionContents |
Name: withPotionContents
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.
Return Type: T
ZenScript Copy// IFluidStack.withPotionContents(potion as Potion) as T
myIFluidStack.withPotionContents(<potion:minecraft:swiftness>);
Parameter | Type | Description |
---|---|---|
Parameter potion | Type Potion | Description The potion to store within |
Name: withPotionContents
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.
Return Type: T
ZenScript Copy// IFluidStack.withPotionContents(potion as Potion, customEffects as stdlib.List<MobEffectInstance>) as T
myIFluidStack.withPotionContents(<potion:minecraft:swiftness>, [MobEffectInstance.of(<mobeffect:minecraft:strength>, 20 * 20, 1, false, false, true)]);
Parameter | Type | Description |
---|---|---|
Parameter potion | Type Potion | Description The potion to store within. |
Parameter customEffects | Type stdlib.List<MobEffectInstance> | Description The effects to grant upon consuming this potion. |
Name: withPotionContents
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.
Return Type: T
ZenScript Copy// IFluidStack.withPotionContents(potion as Potion, customColor as int, customEffects as stdlib.List<MobEffectInstance>) as T
myIFluidStack.withPotionContents(<potion:minecraft:swiftness>, 0xFFFFFF00, [MobEffectInstance.of(<mobeffect:minecraft:strength>, 20 * 20, 1, false, false, true)]);
Parameter | Type | Description |
---|---|---|
Parameter potion | Type Potion | Description The potion to store within. |
Parameter customColor | Type int | Description The ARGB color the potion will have. |
Parameter customEffects | Type stdlib.List<MobEffectInstance> | Description The effects to grant upon consuming this potion. |
Name: withProfile
Sets the <componenttype:minecraft:profile> of the ComponentAccess to have the given ResolvableProfile
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withProfile(profile as ResolvableProfile) as T
Parameter | Type |
---|---|
Parameter profile | Type ResolvableProfile |
Name: withRarity
Sets the <componenttype:minecraft:rarity> of the ComponentAccess to have the given Rarity
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withRarity(rarity as Rarity) as T
myIFluidStack.withRarity(<constant:minecraft:item/rarity:epic>);
Parameter | Type | Description |
---|---|---|
Parameter rarity | Type Rarity | Description The rarity to set |
Name: withRecipes
Sets the <componenttype:minecraft:recipes> of the ComponentAccess to have the given stdlib.List<ResourceLocation>
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withRecipes(recipes as stdlib.List<ResourceLocation>) as T
Parameter | Type |
---|---|
Parameter recipes | Type stdlib.List<ResourceLocation> |
Name: withRepairCost
Sets the <componenttype:minecraft:repair_cost> of the ComponentAccess to have the given value.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withRepairCost(cost as int) as T
myIFluidStack.withRepairCost(20);
Parameter | Type | Description |
---|---|---|
Parameter cost | Type int | Description The repair cost |
Name: withStoredEnchantments
Sets the <componenttype:minecraft:stored_enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withStoredEnchantments(enchantments as ItemEnchantments) as T
Parameter | Type |
---|---|
Parameter enchantments | Type ItemEnchantments |
Name: withSuspiciousStewEffects
Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects SuspiciousStewEffectsEntry is effectively a pair of Effect and duration.
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withSuspiciousStewEffects(effects as stdlib.List<SuspiciousStewEffectsEntry>) as T
Parameter | Type | Description |
---|---|---|
Parameter effects | Type stdlib.List<SuspiciousStewEffectsEntry> | Description The list of effects to grant on consumption. |
Name: withSuspiciousStewEffects
Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as T
Parameter | Type |
---|---|
Parameter suspiciousStewEffects | Type SuspiciousStewEffects |
Name: withTool
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.
Return Type: T
ZenScript Copy// IFluidStack.withTool(rules as stdlib.List<ToolRule>, defaultMiningSpeed as float, damagePerBlock as int) as T
myIFluidStack.withTool([ToolRule.minesAndDrops(<tag:blocks:minecraft:planks>, 6.0f)], 0.25f, 1);
Parameter | Type | Description |
---|---|---|
Parameter rules | Type stdlib.List<ToolRule> | Description The list of rules the new Tool instance will have |
Parameter defaultMiningSpeed | Type float | Description The default mining speed of the new tool |
Parameter damagePerBlock | Type int | Description The damage or durability that is dealt to the Tool after use. |
Name: withUnbreakable
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.
Return Type: T
ZenScript CopyIFluidStack.withUnbreakable(showInTooltip as boolean) as T
Parameter | Type | Description | Optional | Default Value |
---|---|---|---|---|
Parameter showInTooltip | Type boolean | Description Whether to show that the ComponentAccess is unbreakable in a tooltip. | Optional true | Default Value true |
Name: withUnbreakable
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.
Return Type: T
ZenScript CopyIFluidStack.withUnbreakable(unbreakable as Unbreakable) as T
Parameter | Type | Description |
---|---|---|
Parameter unbreakable | Type Unbreakable | Description The Unbreakable instance with the configured values. |
Name: withWritableBookContent
Sets the <componenttype:minecraft:writable_book_content> of the ComponentAccess to have the given WritableBookContent
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withWritableBookContent(content as WritableBookContent) as T
Parameter | Type |
---|---|
Parameter content | Type WritableBookContent |
Name: withWritableBookContent
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withWritableBookContent(pages as stdlib.List<Filterable<string>>) as T
Parameter | Type |
---|---|
Parameter pages | Type stdlib.List<Filterable<string>> |
Name: withWrittenBookContent
Sets the <componenttype:minecraft:written_book_content> of the ComponentAccess to have the given WrittenBookContent
Returns: The new instance with the modified data.
Return Type: T
ZenScript CopyIFluidStack.withWrittenBookContent(content as WrittenBookContent) as T
Parameter | Type |
---|---|
Parameter content | Type WrittenBookContent |
Name: without
Return Type: IFluidStack
ZenScript CopyIFluidStack.without<T : Object>(type as DataComponentType<T>) as IFluidStack
Parameter | Type |
---|---|
Parameter type | Type DataComponentType<T> |
Parameter T | Type Object |
Name: withoutAttributeModifiers
Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutAttributeModifiers() as T
myIFluidStack.withoutAttributeModifiers();
Name: withoutBannerPatterns
Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutBannerPatterns() as T
myIFluidStack.withoutBannerPatterns();
Name: withoutBaseColor
Removes the <componenttype:minecraft:base_color> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutBaseColor() as T
myIFluidStack.withoutBaseColor();
Name: withoutBees
Removes the <componenttype:minecraft:bees> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutBees() as T
myIFluidStack.withoutBees();
Name: withoutBlockEntityData
Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutBlockEntityData() as T
myIFluidStack.withoutBlockEntityData();
Name: withoutBlockState
Removes the <componenttype:minecraft:block_state> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutBlockState() as T
myIFluidStack.withoutBlockState();
Name: withoutBucketEntityData
Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutBucketEntityData() as T
myIFluidStack.withoutBucketEntityData();
Name: withoutBundleContents
Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutBundleContents() as T
myIFluidStack.withoutBundleContents();
Name: withoutCanBreak
Removes the <componenttype:minecraft:can_break> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutCanBreak() as T
myIFluidStack.withoutCanBreak();
Name: withoutCanPlaceOn
Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutCanPlaceOn() as T
myIFluidStack.withoutCanPlaceOn();
Name: withoutChargedProjectiles
Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutChargedProjectiles() as T
myIFluidStack.withoutChargedProjectiles();
Name: withoutContainer
Removes the <componenttype:minecraft:container> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutContainer() as T
myIFluidStack.withoutContainer();
Name: withoutContainerLoot
Removes the <componenttype:minecraft:container_loot> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutContainerLoot() as T
myIFluidStack.withoutContainerLoot();
Name: withoutCreativeSlotLock
Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutCreativeSlotLock() as T
myIFluidStack.withoutCreativeSlotLock();
Name: withoutCustomData
Removes the <componenttype:minecraft:custom_data> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutCustomData() as T
myIFluidStack.withoutCustomData();
Name: withoutCustomModelData
Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutCustomModelData() as T
myIFluidStack.withoutCustomModelData();
Name: withoutCustomName
Removes the <componenttype:minecraft:custom_name> from the ComponentAccess
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutCustomName() as T
myIFluidStack.withoutCustomName();
Name: withoutDamage
Removes the <componenttype:minecraft:damage> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutDamage() as T
myIFluidStack.withoutDamage();
Name: withoutDebugStickState
Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutDebugStickState() as T
myIFluidStack.withoutDebugStickState();
Name: withoutDyedColor
Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutDyedColor() as T
myIFluidStack.withoutDyedColor();
Name: withoutEnchantment
Removes the Enchantment from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutEnchantment(enchantment as Enchantment) as T
myIFluidStack.withoutEnchantment(<enchantment:minecraft:mending>);
Parameter | Type | Description |
---|---|---|
Parameter enchantment | Type Enchantment | Description The Enchantment to remove |
Name: withoutEnchantmentGlintOverride
Removes the <componenttype:minecraft:enchantment_glint_override> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutEnchantmentGlintOverride() as T
myIFluidStack.withoutEnchantmentGlintOverride();
Name: withoutEnchantments
Removes the <componenttype:minecraft:enchantments> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutEnchantments() as T
myIFluidStack.withoutEnchantments();
Name: withoutEntityDate
Removes the <componenttype:minecraft:entity_data> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutEntityDate() as T
myIFluidStack.withoutEntityDate();
Name: withoutFireResistant
Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutFireResistant() as T
myIFluidStack.withoutFireResistant();
Name: withoutFireworkExplosion
Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutFireworkExplosion() as T
myIFluidStack.withoutFireworkExplosion();
Name: withoutFireworks
Removes the <componenttype:minecraft:fireworks> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutFireworks() as T
myIFluidStack.withoutFireworks();
Name: withoutFood
Removes the <componenttype:minecraft:food> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutFood() as T
myIFluidStack.withoutFood();
Name: withoutHideAdditionalTooltip
Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutHideAdditionalTooltip() as T
myIFluidStack.withoutHideAdditionalTooltip();
Name: withoutHideTooltip
Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutHideTooltip() as T
myIFluidStack.withoutHideTooltip();
Name: withoutInstrument
Removes the <componenttype:minecraft:instrument> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutInstrument() as T
myIFluidStack.withoutInstrument();
Name: withoutIntangibleProjectile
Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutIntangibleProjectile() as T
myIFluidStack.withoutIntangibleProjectile();
Name: withoutItemName
Removes the <componenttype:minecraft:item_name> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutItemName() as T
myIFluidStack.withoutItemName();
Name: withoutLock
Removes the <componenttype:minecraft:lock> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutLock() as T
myIFluidStack.withoutLock();
Name: withoutLodestoneTracker
Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutLodestoneTracker() as T
myIFluidStack.withoutLodestoneTracker();
Name: withoutLore
Removes the <componenttype:minecraft:lore> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutLore() as T
myIFluidStack.withoutLore();
Name: withoutMapColor
Removes the <componenttype:minecraft:map_color> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutMapColor() as T
myIFluidStack.withoutMapColor();
Name: withoutMapDecorations
Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutMapDecorations() as T
myIFluidStack.withoutMapDecorations();
Name: withoutMapId
Removes the <componenttype:minecraft:map_id> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutMapId() as T
myIFluidStack.withoutMapId();
Name: withoutMapPostProcessing
Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutMapPostProcessing() as T
myIFluidStack.withoutMapPostProcessing();
Name: withoutMaxDamage
Removes the <componenttype:minecraft:max_damage> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutMaxDamage() as T
myIFluidStack.withoutMaxDamage();
Name: withoutMaxStackSize
Removes the <componenttype:minecraft:stack_size> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutMaxStackSize() as T
myIFluidStack.withoutMaxStackSize();
Name: withoutNoteBlockSound
Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutNoteBlockSound() as T
myIFluidStack.withoutNoteBlockSound();
Name: withoutOminousBottleAmplifier
Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutOminousBottleAmplifier() as T
myIFluidStack.withoutOminousBottleAmplifier();
Name: withoutPotDecorations
Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutPotDecorations() as T
myIFluidStack.withoutPotDecorations();
Name: withoutPotionContents
Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutPotionContents() as T
myIFluidStack.withoutPotionContents();
Name: withoutProfile
Removes the <componenttype:minecraft:profile> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutProfile() as T
myIFluidStack.withoutProfile();
Name: withoutRarity
Removes the <componenttype:minecraft:rarity> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutRarity() as T
myIFluidStack.withoutRarity();
Name: withoutRecipes
Removes the <componenttype:minecraft:recipes> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutRecipes() as T
myIFluidStack.withoutRecipes();
Name: withoutRepairCost
Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutRepairCost() as T
myIFluidStack.withoutRepairCost();
Name: withoutStoredEnchantments
Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutStoredEnchantments() as T
myIFluidStack.withoutStoredEnchantments();
Name: withoutSuspiciousStewEffects
Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutSuspiciousStewEffects() as T
myIFluidStack.withoutSuspiciousStewEffects();
Name: withoutTool
Removes the <componenttype:minecraft:tool> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutTool() as T
myIFluidStack.withoutTool();
Name: withoutTrim
Removes the <componenttype:minecraft:trim> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutTrim() as T
myIFluidStack.withoutTrim();
Name: withoutUnbreakable
Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutUnbreakable() as T
myIFluidStack.withoutUnbreakable();
Name: withoutWritableBookContent
Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutWritableBookContent() as T
myIFluidStack.withoutWritableBookContent();
Name: withoutWrittenBookContent
Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess.
Returns: The new instance with the modified data.
Return Type: T
ZenScript Copy// IFluidStack.withoutWrittenBookContent() as T
myIFluidStack.withoutWrittenBookContent();
Operators
Link to operators
Name: CONTAINS
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
ZenScript Copyother as IFluidStack in myIFluidStack
Name: MUL
Sets the fluid amount in MilliBuckets (mB)
ZenScript CopymyIFluidStack * amount as int
myIFluidStack * 1000
Name: OR
ZenScript CopymyIFluidStack | other as FluidIngredient
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name amount | Type long | Has Getter true | Has Setter false | Description Gets the fluid amount in MilliBuckets (mB). |
Name attributeModifiers | Type ItemAttributeModifiers | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:attribute_modifiers> |
Name bannerPatterns | Type BannerPatternLayers | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:banner_patterns> |
Name baseColor | Type DyeColor | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:base_color> |
Name bees | Type stdlib.List<BeehiveBlockEntityOccupant> | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:bees> |
Name blockEntityData | Type CustomData | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:block_entity_data> |
Name blockState | Type BlockItemStateProperties | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:block_state> |
Name bucketEntityData | Type CustomData | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:bucket_entity_data> |
Name bundleContents | Type BundleContents | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:bundle_contents> |
Name canBreak | Type AdventureModePredicate | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:can_break> |
Name canPlaceOn | Type AdventureModePredicate | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:can_place_on> |
Name chargedProjectiles | Type ChargedProjectiles | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:charged_projectiles> |
Name container | Type ItemContainerContents | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:container> |
Name containerLoot | Type SeededContainerLoot | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:container_loot> |
Name creativeSlotLock | Type boolean | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:creative_slot_lock> |
Name customData | Type CustomData | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:custom_data> |
Name customModelData | Type CustomModelData | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:custom_model_data> |
Name customName | Type Component | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:custom_name> A custom name is generally displayed in italics and controlled by the user. |
Name damage | Type int | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:damage> |
Name debugStickState | Type DebugStickState | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:debug_stick_state> |
Name dyedColor | Type DyedItemColor | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:dye_color> |
Name empty | Type boolean | Has Getter true | Has Setter false | Description Gets whether this fluid stack is empty. |
Name enchantmentGlintOverride | Type boolean | Has Getter true | Has Setter false | Description 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. |
Name enchantments | Type ItemEnchantments | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:enchantments> |
Name entityData | Type CustomData | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:entity_data> |
Name fireworkExplosion | Type FireworkExplosion | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:firework_explosion> |
Name fireworks | Type Fireworks | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:fireworks> |
Name fluid | Type Fluid | Has Getter true | Has Setter false | Description Retrieves this fluid stack's fluid. |
Name food | Type FoodProperties | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:food> |
Name hasAttributeModifiers | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:attribute_modifiers> |
Name hasBannerPatterns | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:banner_patterns> |
Name hasBaseColor | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:base_color> Used for shield colouring. |
Name hasBees | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:bees> |
Name hasBlockEntityData | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:block_entity_data> |
Name hasBlockState | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:block_state> |
Name hasBucketEntityData | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:bucket_entity_data> |
Name hasBundleContents | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:bundle_contents> |
Name hasCanBreak | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:can_break> |
Name hasCanPlaceOn | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:can_place_on> |
Name hasChargedProjectiles | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:charged_projectiles> This component is used for crossbows. |
Name hasContainer | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:container> |
Name hasContainerLoot | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:container_loot> |
Name hasCustomData | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:custom_data> |
Name hasCustomModelData | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:custom_model_data> |
Name hasCustomName | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:custom_name> |
Name hasDamage | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:damage> |
Name hasDebugStickState | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:debug_stick_state> |
Name hasDyedColor | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:dyed_color> |
Name hasEnchantmentGlintOverride | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:enchantment_glint_override> |
Name hasEnchantments | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:enchantments> |
Name hasEntityData | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:entity_data> |
Name hasFireworkExplosion | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:firework_explosion> |
Name hasFireworks | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:fireworks> |
Name hasFood | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:food> |
Name hasInstrument | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:instrument> |
Name hasItemName | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:item_namegt; |
Name hasLock | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:lock> |
Name hasLodestoneTracker | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:lodestone_tracker> |
Name hasLore | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:lore> |
Name hasMapColor | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:map_color> |
Name hasMapDecorations | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:map_decorations> MapDecorations are additional elements that render on a map, such as waypoints. |
Name hasMapId | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:map_id> |
Name hasMapPostProcessing | Type boolean | Has Getter true | Has Setter false | Description 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. |
Name hasMaxDamage | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:max_damage> |
Name hasMaxStackSize | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:max_stack_size> |
Name hasNoteBlockSound | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:note_block_sound> |
Name hasOminousBottleAmplifier | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:ominous_bottle_amplifier> |
Name hasPotDecorations | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:pot_decorations> |
Name hasPotionContents | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:potion_contents> Stores Potion Data on an item. |
Name hasProfile | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:profile> |
Name hasRarity | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:rarity> |
Name hasRecipes | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:recipes> Used for Knowledge Books. |
Name hasRepairCost | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:repair_cost> |
Name hasStoredEnchantments | Type boolean | Has Getter true | Has Setter false | Description 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. |
Name hasSuspiciousStewEffects | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:suspicious_stew_effects> |
Name hasTool | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:tool> |
Name hasTrim | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:trim> |
Name hasUnbreakable | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has the <componenttype:minecraft:unbreakable> |
Name hasWritableBookContent | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:writable_book_content> |
Name hasWrittenBookContent | Type boolean | Has Getter true | Has Setter false | Description Checks whether the ComponentAccess has <componenttype:minecraft:written_book_content> |
Name hideAdditionalTooltip | Type boolean | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:hide_additional_tooltip> |
Name hideTooltip | Type boolean | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:hide_tooltip> |
Name instrument | Type Instrument | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:instrument> |
Name isFireResistant | Type boolean | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:fire_resistant> |
Name isImmutable | Type boolean | Has Getter true | Has Setter false | Description ​ |
Name isIntangibleProjectile | Type boolean | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:intangible_projectile> |
Name itemName | Type Component | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:custom_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. |
Name lockComponent | Type LockCode | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:lock> |
Name lodestoneTracker | Type LodestoneTracker | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:lodestone_tracker> |
Name lore | Type ItemLore | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:lore> |
Name mapColor | Type MapItemColor | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:map_color> |
Name mapDecorations | Type MapDecorations | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:map_decorations> |
Name mapId | Type MapId | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:map_id> |
Name mapPostProcessing | Type MapPostProcessing | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:map_post_processing> |
Name maxDamage | Type int | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:max_damage> |
Name maxStackSize | Type int | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:max_stack_size> |
Name noteBlockSound | Type ResourceLocation | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:note_block_sound> |
Name ominousBottleAmplifier | Type int | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:ominous_bottle_amplifier> |
Name potDecorations | Type PotDecorations | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:pot_decorations> |
Name potionContents | Type PotionContents | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:potion_contents> |
Name profile | Type ResolvableProfile | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:profile> |
Name rarity | Type Rarity | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:rarity> |
Name recipes | Type stdlib.List<ResourceLocation> | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:recipes> |
Name registryName | Type ResourceLocation | Has Getter true | Has Setter false | Description Gets the registry name for the fluid this stack is representing. |
Name repairCost | Type int | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:repair_cost> |
Name storedEnchantments | Type ItemEnchantments | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:stored_enchantments> |
Name suspiciousStewEffects | Type SuspiciousStewEffects | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:suspicious_stew_effects> |
Name tool | Type Tool | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:tool> |
Name trim | Type ArmorTrim | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:trim> |
Name unbreakable | Type Unbreakable | Has Getter true | Has Setter false | Description Gets the data in the <componenttype:minecraft:unbreakable> |
Name writableBookContent | Type WritableBookContent | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:writable_book_content> |
Name writtenBookContent | Type WrittenBookContent | Has Getter true | Has Setter false | Description Gets the data in <componenttype:minecraft:written_book_content> |