IFluidStack
Importing the class
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;Implements
IFluidStack
implements the following interfaces:
CommandStringDisplayable,DataComponentHolder,ComponentAccess<IFluidStack>
Undocumented Interfaces
IDataComponentHolderExtension
Operators
myIFluidStack | myCTFluidIngredientParameters:
other: FluidIngredient Type: FluidIngredient
Return Type:
FluidIngredient
myIFluidStack in myIFluidStackParameters:
Return Type:
bool
// (IFluidStack * (amount as int)) as IFluidStackmyIFluidStack * myIntParameters:
amount: int Type: int
- The amount to multiply this stack
Return Type:
IFluidStack
Members
// IFluidStack.amount as longmyIFluidStack.amount
Return Type:
long
myIFluidStack.applyComponents(myDataComponentMap);Parameters:
map: DataComponentMap Type: DataComponentMap
Return Type:
IFluidStack
myIFluidStack.applyComponents(myDataComponentPatch);Parameters:
patch: DataComponentPatch Type: DataComponentPatch
Return Type:
IFluidStack
// IFluidStack as FluidIngredientmyIFluidStack as CTFluidIngredient
Return Type:
FluidIngredient
Returns: A new Stack, that is mutable.
myIFluidStack.asMutable();
Return Type:
IFluidStack
// IFluidStack.attributeModifiers as ItemAttributeModifiersmyIFluidStack.attributeModifiers
Return Type:
ItemAttributeModifiers
// IFluidStack.bannerPatterns as BannerPatternLayersmyIFluidStack.bannerPatterns
Return Type:
BannerPatternLayers
myIFluidStack.bees
Return Type:
List<BeehiveBlockEntityOccupant>
// IFluidStack.blockEntityData as CustomDatamyIFluidStack.blockEntityData
Return Type:
CustomData
// IFluidStack.blockState as BlockItemStatePropertiesmyIFluidStack.blockState
Return Type:
BlockItemStateProperties
// IFluidStack.bucketEntityData as CustomDatamyIFluidStack.bucketEntityData
Return Type:
CustomData
// IFluidStack.bundleContents as BundleContentsmyIFluidStack.bundleContents
Return Type:
BundleContents
// IFluidStack.canBreak as AdventureModePredicatemyIFluidStack.canBreak
Return Type:
AdventureModePredicate
// IFluidStack.canPlaceOn as AdventureModePredicatemyIFluidStack.canPlaceOn
Return Type:
AdventureModePredicate
// IFluidStack.chargedProjectiles as ChargedProjectilesmyIFluidStack.chargedProjectiles
Return Type:
ChargedProjectiles
// IFluidStack.container as ItemContainerContentsmyIFluidStack.container
Return Type:
ItemContainerContents
// IFluidStack.containerLoot as SeededContainerLootmyIFluidStack.containerLoot
Return Type:
SeededContainerLoot
Returns: A new stack, that contains the same info as this one
myIFluidStack.copy();
Return Type:
IFluidStack
// IFluidStack.creativeSlotLock as boolmyIFluidStack.creativeSlotLock
Return Type:
bool
// IFluidStack.customData as CustomDatamyIFluidStack.customData
Return Type:
CustomData
// IFluidStack.customModelData as CustomModelDatamyIFluidStack.customModelData
Return Type:
CustomModelData
// IFluidStack.damage as intmyIFluidStack.damage
Return Type:
int
// IFluidStack.debugStickState as DebugStickStatemyIFluidStack.debugStickState
Return Type:
DebugStickState
// IFluidStack.dyedColor as DyedItemColormyIFluidStack.dyedColor
Return Type:
DyedItemColor
// IFluidStack.empty as boolmyIFluidStack.empty
Return Type:
bool
Returns: The empty IFluidStack
IFluidStack.empty();
Return Type:
IFluidStack
If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments.
// IFluidStack.enchantmentGlintOverride as boolmyIFluidStack.enchantmentGlintOverride
Return Type:
bool
// IFluidStack.enchantments as ItemEnchantmentsmyIFluidStack.enchantments
Return Type:
ItemEnchantments
// IFluidStack.entityData as CustomDatamyIFluidStack.entityData
Return Type:
CustomData
// IFluidStack.fireworkExplosion as FireworkExplosionmyIFluidStack.fireworkExplosion
Return Type:
FireworkExplosion
// IFluidStack.food as FoodPropertiesmyIFluidStack.food
Return Type:
FoodProperties
// IFluidStack.hasAttributeModifiers as boolmyIFluidStack.hasAttributeModifiers
Return Type:
bool
// IFluidStack.hasBannerPatterns as boolmyIFluidStack.hasBannerPatterns
Return Type:
bool
Used for shield colouring.
// IFluidStack.hasBaseColor as boolmyIFluidStack.hasBaseColor
Return Type:
bool
// IFluidStack.hasBees as boolmyIFluidStack.hasBees
Return Type:
bool
// IFluidStack.hasBlockEntityData as boolmyIFluidStack.hasBlockEntityData
Return Type:
bool
// IFluidStack.hasBlockState as boolmyIFluidStack.hasBlockState
Return Type:
bool
// IFluidStack.hasBucketEntityData as boolmyIFluidStack.hasBucketEntityData
Return Type:
bool
// IFluidStack.hasBundleContents as boolmyIFluidStack.hasBundleContents
Return Type:
bool
// IFluidStack.hasCanBreak as boolmyIFluidStack.hasCanBreak
Return Type:
bool
// IFluidStack.hasCanPlaceOn as boolmyIFluidStack.hasCanPlaceOn
Return Type:
bool
This component is used for crossbows.
// IFluidStack.hasChargedProjectiles as boolmyIFluidStack.hasChargedProjectiles
Return Type:
bool
// IFluidStack.hasContainer as boolmyIFluidStack.hasContainer
Return Type:
bool
// IFluidStack.hasContainerLoot as boolmyIFluidStack.hasContainerLoot
Return Type:
bool
// IFluidStack.hasCustomData as boolmyIFluidStack.hasCustomData
Return Type:
bool
// IFluidStack.hasCustomModelData as boolmyIFluidStack.hasCustomModelData
Return Type:
bool
// IFluidStack.hasCustomName as boolmyIFluidStack.hasCustomName
Return Type:
bool
// IFluidStack.hasDamage as boolmyIFluidStack.hasDamage
Return Type:
bool
// IFluidStack.hasDebugStickState as boolmyIFluidStack.hasDebugStickState
Return Type:
bool
// IFluidStack.hasDyedColor as boolmyIFluidStack.hasDyedColor
Return Type:
bool
// IFluidStack.hasEnchantmentGlintOverride as boolmyIFluidStack.hasEnchantmentGlintOverride
Return Type:
bool
// IFluidStack.hasEnchantments as boolmyIFluidStack.hasEnchantments
Return Type:
bool
// IFluidStack.hasEntityData as boolmyIFluidStack.hasEntityData
Return Type:
bool
// IFluidStack.hasFireworkExplosion as boolmyIFluidStack.hasFireworkExplosion
Return Type:
bool
// IFluidStack.hasFireworks as boolmyIFluidStack.hasFireworks
Return Type:
bool
// IFluidStack.hasFood as boolmyIFluidStack.hasFood
Return Type:
bool
// IFluidStack.hasInstrument as boolmyIFluidStack.hasInstrument
Return Type:
bool
// IFluidStack.hasItemName as boolmyIFluidStack.hasItemName
Return Type:
bool
// IFluidStack.hasLock as boolmyIFluidStack.hasLock
Return Type:
bool
// IFluidStack.hasLodestoneTracker as boolmyIFluidStack.hasLodestoneTracker
Return Type:
bool
// IFluidStack.hasLore as boolmyIFluidStack.hasLore
Return Type:
bool
// IFluidStack.hasMapColor as boolmyIFluidStack.hasMapColor
Return Type:
bool
MapDecorations are additional elements that render on a map, such as waypoints.
// IFluidStack.hasMapDecorations as boolmyIFluidStack.hasMapDecorations
Return Type:
bool
// IFluidStack.hasMapId as boolmyIFluidStack.hasMapId
Return Type:
bool
This componenet stores additional info on the map, such as the scale or whether to lock it.
// IFluidStack.hasMapPostProcessing as boolmyIFluidStack.hasMapPostProcessing
Return Type:
bool
// IFluidStack.hasMaxDamage as boolmyIFluidStack.hasMaxDamage
Return Type:
bool
// IFluidStack.hasMaxStackSize as boolmyIFluidStack.hasMaxStackSize
Return Type:
bool
// IFluidStack.hasNoteBlockSound as boolmyIFluidStack.hasNoteBlockSound
Return Type:
bool
// IFluidStack.hasOminousBottleAmplifier as boolmyIFluidStack.hasOminousBottleAmplifier
Return Type:
bool
// IFluidStack.hasPotDecorations as boolmyIFluidStack.hasPotDecorations
Return Type:
bool
Stores Potion Data on an item.
// IFluidStack.hasPotionContents as boolmyIFluidStack.hasPotionContents
Return Type:
bool
// IFluidStack.hasProfile as boolmyIFluidStack.hasProfile
Return Type:
bool
// IFluidStack.hasRarity as boolmyIFluidStack.hasRarity
Return Type:
bool
Used for Knowledge Books.
// IFluidStack.hasRecipes as boolmyIFluidStack.hasRecipes
Return Type:
bool
// IFluidStack.hasRepairCost as boolmyIFluidStack.hasRepairCost
Return Type:
bool
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 boolmyIFluidStack.hasStoredEnchantments
Return Type:
bool
// IFluidStack.hasSuspiciousStewEffects as boolmyIFluidStack.hasSuspiciousStewEffects
Return Type:
bool
// IFluidStack.hasTool as boolmyIFluidStack.hasTool
Return Type:
bool
// IFluidStack.hasTrim as boolmyIFluidStack.hasTrim
Return Type:
bool
// IFluidStack.hasUnbreakable as boolmyIFluidStack.hasUnbreakable
Return Type:
bool
// IFluidStack.hasWritableBookContent as boolmyIFluidStack.hasWritableBookContent
Return Type:
bool
// IFluidStack.hasWrittenBookContent as boolmyIFluidStack.hasWrittenBookContent
Return Type:
bool
// IFluidStack.hideAdditionalTooltip as boolmyIFluidStack.hideAdditionalTooltip
Return Type:
bool
// IFluidStack.hideTooltip as boolmyIFluidStack.hideTooltip
Return Type:
bool
// IFluidStack.instrument as InstrumentmyIFluidStack.instrument
Return Type:
Instrument
// IFluidStack.isFireResistant as boolmyIFluidStack.isFireResistant
Return Type:
bool
// IFluidStack.isImmutable as boolmyIFluidStack.isImmutable
Return Type:
bool
// IFluidStack.isImmutable() as bool;myIFluidStack.isImmutable();
Return Type:
bool
// IFluidStack.isIntangibleProjectile as boolmyIFluidStack.isIntangibleProjectile
Return Type:
bool
// IFluidStack.lodestoneTracker as LodestoneTrackermyIFluidStack.lodestoneTracker
Return Type:
LodestoneTracker
// IFluidStack.mapColor as MapItemColormyIFluidStack.mapColor
Return Type:
MapItemColor
// IFluidStack.mapDecorations as MapDecorationsmyIFluidStack.mapDecorations
Return Type:
MapDecorations
// IFluidStack.mapPostProcessing as MapPostProcessingmyIFluidStack.mapPostProcessing
Return Type:
MapPostProcessing
Returns: true if this fluid contains the other fluid
myIFluidStack.matches(myIFluidStack);Parameters:
Return Type:
bool
// IFluidStack.maxDamage as intmyIFluidStack.maxDamage
Return Type:
int
// IFluidStack.maxStackSize as intmyIFluidStack.maxStackSize
Return Type:
int
// IFluidStack.noteBlockSound as ResourceLocationmyIFluidStack.noteBlockSound
Return Type:
ResourceLocation
// IFluidStack.ominousBottleAmplifier as intmyIFluidStack.ominousBottleAmplifier
Return Type:
int
// IFluidStack.potDecorations as PotDecorationsmyIFluidStack.potDecorations
Return Type:
PotDecorations
// IFluidStack.potionContents as PotionContentsmyIFluidStack.potionContents
Return Type:
PotionContents
// IFluidStack.profile as ResolvableProfilemyIFluidStack.profile
Return Type:
ResolvableProfile
myIFluidStack.recipes
Return Type:
List<ResourceLocation>
// IFluidStack.registryName as ResourceLocationmyIFluidStack.registryName
Return Type:
ResourceLocation
myIFluidStack.remove<T>(myDataComponentType);Parameters:
type: DataComponentType<T> Type: DataComponentType<T>
Return Type:
IFluidStack
// IFluidStack.repairCost as intmyIFluidStack.repairCost
Return Type:
int
Returns: A new stack, or this stack, depending on if this stack is mutable
myIFluidStack.setAmount(1000);Parameters:
amount: int Type: int
- The amount to multiply this stack
Return Type:
IFluidStack
// IFluidStack.storedEnchantments as ItemEnchantmentsmyIFluidStack.storedEnchantments
Return Type:
ItemEnchantments
// IFluidStack.suspiciousStewEffects as SuspiciousStewEffectsmyIFluidStack.suspiciousStewEffects
Return Type:
SuspiciousStewEffects
// IFluidStack.unbreakable as UnbreakablemyIFluidStack.unbreakable
Return Type:
Unbreakable
// IFluidStack.update<T, U>(type as DataComponentType<T>, defaultValue as T, data as U, operator as BiFunction<T, T, U>) as IFluidStack;myIFluidStack.update<T, U>(myDataComponentType, myT, myU, myBiFunction);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> defaultValue: T Type: T data: U Type: U operator: BiFunction<T, T, U> Type: BiFunction<T, T, U>
Return Type:
IFluidStack
// IFluidStack.update<T>(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as IFluidStack;myIFluidStack.update<T>(myDataComponentType, myT, myUnaryOperator);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> defaultValue: T Type: T operator: UnaryOperator<T> Type: UnaryOperator<T>
Return Type:
IFluidStack
myIFluidStack.with<T>(myDataComponentType, myT);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> value: T? Type: T?
Return Type:
IFluidStack
ItemAttributeModifiersReturns: 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(););Parameters:
modifiers: ItemAttributeModifiers Type: ItemAttributeModifiers
- The attributes to give to the item.
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IFluidStack.withAttributeModifiers(modifier as ItemAttributeModifiersEntry, showInTooltip as bool = true) as ComponentAccess;myIFluidStack.withAttributeModifiers(myEntry, myBool);Parameters:
modifier: ItemAttributeModifiersEntry Type: ItemAttributeModifiersEntry showInTooltip: bool (optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
// IFluidStack.withAttributeModifiers(modifiers as List<ItemAttributeModifiersEntry>, showInTooltip as bool = true) as ComponentAccess;myIFluidStack.withAttributeModifiers(myList, myBool);Parameters:
modifiers: List<ItemAttributeModifiersEntry> Type: List<ItemAttributeModifiersEntry> showInTooltip: bool (optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withBannerPatterns(myList);Parameters:
layers: List<BannerPatternLayersLayer> Type: List<BannerPatternLayersLayer>
Return Type:
ComponentAccess
BannerPatternLayersReturns: The new instance with the modified data.
myIFluidStack.withBannerPatterns(myBannerPatternLayers);Parameters:
layers: BannerPatternLayers Type: BannerPatternLayers
Return Type:
ComponentAccess
DyeColorReturns: The new instance with the modified data.
myIFluidStack.withBaseColor(myDyeColor);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withBees(myList);Parameters:
occupants: List<BeehiveBlockEntityOccupant> Type: List<BeehiveBlockEntityOccupant>
Return Type:
ComponentAccess
MapDataReturns: The new instance with the modified data.
myIFluidStack.withBlockEntityData(myMapData);
Return Type:
ComponentAccess
CustomDataReturns: The new instance with the modified data.
myIFluidStack.withBlockEntityData(myCustomData);Parameters:
data: CustomData Type: CustomData
Return Type:
ComponentAccess
BlockItemStatePropertiesReturns: The new instance with the modified data.
myIFluidStack.withBlockState(myBlockItemStateProperties);Parameters:
properties: BlockItemStateProperties Type: BlockItemStateProperties
Return Type:
ComponentAccess
MapDataReturns: The new instance with the modified data.
myIFluidStack.withBucketEntityData(myMapData);
Return Type:
ComponentAccess
CustomDataReturns: The new instance with the modified data.
myIFluidStack.withBucketEntityData(myCustomData);Parameters:
data: CustomData Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withBundleContents([<item:minecraft:diamond> * 64]);Parameters:
Return Type:
ComponentAccess
BundleContentsReturns: The new instance with the modified data.
myIFluidStack.withBundleContents(myBundleContents);Parameters:
contents: BundleContents Type: BundleContents
Return Type:
ComponentAccess
Any predicate that matches will allow the Block to be broken by this ItemStack.
Returns: The new instance with the modified data.
// IFluidStack.withCanBreak(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;myIFluidStack.withCanBreak(BlockPredicate.create().of(<block:minecraft:diamond_ore>).build(), true);Parameters:
predicates: List<BlockPredicate> Type: List<BlockPredicate>
- The collection of predicates to test for showInTooltip: bool (optional) Type: bool
- Whether to show the ability in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
AdventureModePredicateReturns: The new instance with the modified data.
myIFluidStack.withCanBreak(myAdventureModePredicate);Parameters:
predicate: AdventureModePredicate Type: AdventureModePredicate
- The adventure mode predicate to use to determine whether the item can be used to break a block.
Return Type:
ComponentAccess
Any predicate that matches will allow the BlockItem within the ItemStack to be placed.
Returns: The new instance with the modified data.
// IFluidStack.withCanPlaceOn(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;myIFluidStack.withCanPlaceOn(BlockPredicate.create().of(<block:minecraft:dirt>).build(), myBool);Parameters:
predicates: List<BlockPredicate> Type: List<BlockPredicate>
- The collection of predicates to test for showInTooltip: bool (optional) Type: bool
- Whether to show the restriction in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
AdventureModePredicateReturns: The new instance with the modified data.
myIFluidStack.withCanPlaceOn(myAdventureModePredicate);Parameters:
predicate: AdventureModePredicate Type: AdventureModePredicate
- The adventure mode predicate to use to determine whether the current block can be placed on another block.
Return Type:
ComponentAccess
IItemStackReturns: The new instance with the modified data.
myIFluidStack.withChargedProjectiles(<item:minecraft:arrow>);Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withChargedProjectiles([<item:minecraft:arrow>]);Parameters:
Return Type:
ComponentAccess
ChargedProjectilesReturns: The new instance with the modified data.
myIFluidStack.withChargedProjectiles(myChargedProjectiles);Parameters:
chargedProjectiles: ChargedProjectiles Type: ChargedProjectiles
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withContainer(myList);Parameters:
contents: List<IItemStack> Type: List<IItemStack>
Return Type:
ComponentAccess
ItemContainerContentsReturns: The new instance with the modified data.
myIFluidStack.withContainer(myItemContainerContents);Parameters:
contents: ItemContainerContents Type: ItemContainerContents
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IFluidStack.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess;myIFluidStack.withContainerLoot(myResourceKey, myLong);Parameters:
lootTable: ResourceKey<LootTable> Type: ResourceKey<LootTable> seed: long Type: long
Return Type:
ComponentAccess
SeededContainerLootReturns: The new instance with the modified data.
myIFluidStack.withContainerLoot(mySeededContainerLoot);Parameters:
loot: SeededContainerLoot Type: SeededContainerLoot
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withCreativeSlotLock();
Return Type:
ComponentAccess
MapDataReturns: The new instance with the modified data.
myIFluidStack.withCustomData({custom_ammo_thing: 1, owner: "Benji"});
Return Type:
ComponentAccess
CustomDataReturns: The new instance with the modified data.
myIFluidStack.withCustomData(myCustomData);Parameters:
customData: CustomData Type: CustomData
Return Type:
ComponentAccess
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);Parameters:
data: CustomModelData Type: CustomModelData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withCustomName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
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
DebugStickStateReturns: The new instance with the modified data.
myIFluidStack.withDebugStickState(myDebugStickState);Parameters:
state: DebugStickState Type: DebugStickState
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
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
DyedItemColorReturns: The new instance with the modified data.
myIFluidStack.withDyedColor(myDyedItemColor);Parameters:
color: DyedItemColor Type: DyedItemColor
Return Type:
ComponentAccess
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
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.
myIFluidStack.withEnchantmentGlintOverride(true);Parameters:
value: bool Type: bool
- The value of the override, as described above
Return Type:
ComponentAccess
ItemEnchantmentsReturns: The new instance with the modified data.
myIFluidStack.withEnchantments(myItemEnchantments);Parameters:
enchantments: ItemEnchantments Type: ItemEnchantments
Return Type:
ComponentAccess
MapDataReturns: The new instance with the modified data.
myIFluidStack.withEntityData(myMapData);
Return Type:
ComponentAccess
CustomDataReturns: The new instance with the modified data.
myIFluidStack.withEntityData(myCustomData);Parameters:
data: CustomData Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withFireResistant();
Return Type:
ComponentAccess
FireworkExplosionReturns: The new instance with the modified data.
myIFluidStack.withFireworkExplosion(myFireworkExplosion);Parameters:
explosion: FireworkExplosion Type: FireworkExplosion
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IFluidStack.withFireworks(flightDuration as int, explosions as List<FireworkExplosion>) as ComponentAccess;myIFluidStack.withFireworks(myInt, myList);Parameters:
flightDuration: int Type: int explosions: List<FireworkExplosion> Type: List<FireworkExplosion>
Return Type:
ComponentAccess
FireworksReturns: The new instance with the modified data.
myIFluidStack.withFireworks(myFireworks);
Return Type:
ComponentAccess
FoodPropertiesReturns: The new instance with the modified data.
myIFluidStack.withFood(myFoodProperties);Parameters:
food: FoodProperties Type: FoodProperties
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withHideTooltip();
Return Type:
ComponentAccess
InstrumentReturns: The new instance with the modified data.
myIFluidStack.withInstrument(myInstrument);Parameters:
instrument: Instrument Type: Instrument
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withIntangibleProjectile();
Return Type:
ComponentAccess
ComponentReturns: The new instance with the modified data.
myIFluidStack.withItemName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
myIFluidStack.withJsonComponent(myDataComponentType, myIData);Parameters:
type: DataComponentType<T> Type: DataComponentType<T>
Return Type:
IFluidStack
myIFluidStack.withJsonComponents(myIData);
Return Type:
IFluidStack
Returns: The new instance with the modified data.
myIFluidStack.withLock(myString);Parameters:
code: string Type: string
Return Type:
ComponentAccess
LockCodeReturns: The new instance with the modified data.
myIFluidStack.withLock(myLockCode);
Return Type:
ComponentAccess
LodestoneTrackerReturns: The new instance with the modified data.
myIFluidStack.withLodestoneTracker(myLodestoneTracker);Parameters:
tracker: LodestoneTracker Type: LodestoneTracker
Return Type:
ComponentAccess
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:
Return Type:
ComponentAccess
ItemLoreReturns: The new instance with the modified data.
myIFluidStack.withLore(myItemLore);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withMapColor(0xFF0000);Parameters:
rgb: int Type: int
- The new map colour
Return Type:
ComponentAccess
MapItemColorReturns: The new instance with the modified data.
myIFluidStack.withMapColor(myMapItemColor);Parameters:
color: MapItemColor Type: MapItemColor
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withMapDecorations(myMap);Parameters:
decorations: MapDecorationsEntry[string] Type: MapDecorationsEntry[string]
Return Type:
ComponentAccess
MapDecorationsReturns: The new instance with the modified data.
myIFluidStack.withMapDecorations(myMapDecorations);Parameters:
decorations: MapDecorations Type: MapDecorations
Return Type:
ComponentAccess
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);Parameters:
id: int Type: int
Return Type:
ComponentAccess
MapIdReturns: The new instance with the modified data.
myIFluidStack.withMapId(myMapId);
Return Type:
ComponentAccess
MapPostProcessingReturns: The new instance with the modified data.
myIFluidStack.withMapPostProcessing(myMapPostProcessing);Parameters:
value: MapPostProcessing Type: MapPostProcessing
Return Type:
ComponentAccess
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);Parameters:
maxDamage: int Type: int
Return Type:
ComponentAccess
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
ResourceLocationReturns: The new instance with the modified data.
myIFluidStack.withNoteBlockSound(myResourceLocation);Parameters:
sound: ResourceLocation Type: ResourceLocation
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withOminousBottleAmplifier(myInt);Parameters:
amplifier: int Type: int
Return Type:
ComponentAccess
myIFluidStack.without<T>(myDataComponentType);Parameters:
type: DataComponentType<T> Type: DataComponentType<T>
Return Type:
IFluidStack
Returns: The new instance with the modified data.
myIFluidStack.withoutAttributeModifiers();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutBannerPatterns();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutBaseColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutBees();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutBlockEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutBlockState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutBucketEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutBundleContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutCanBreak();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutCanPlaceOn();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutChargedProjectiles();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutContainer();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutContainerLoot();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutCreativeSlotLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutCustomData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutCustomModelData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutCustomName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutDebugStickState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutDyedColor();
Return Type:
ComponentAccess
Enchantment from the ComponentAccess.Returns: The new instance with the modified data.
myIFluidStack.withoutEnchantment(<enchantment:minecraft:mending>);Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutEntityDate();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutFireResistant();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutFireworkExplosion();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutFireworks();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutFood();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutHideTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutInstrument();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutIntangibleProjectile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutItemName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutLodestoneTracker();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutLore();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutMapColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutMapDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutMapId();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutMapPostProcessing();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutMaxDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutMaxStackSize();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutNoteBlockSound();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutPotDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutPotionContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutProfile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutRarity();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutRecipes();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutRepairCost();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutStoredEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutTool();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutTrim();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutUnbreakable();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutWritableBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withoutWrittenBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IFluidStack.withPotDecorations(back as ItemDefinition, left as ItemDefinition, right as ItemDefinition, front as ItemDefinition) as ComponentAccess;myIFluidStack.withPotDecorations(myItem, myItem, myItem, myItem);Parameters:
back: ItemDefinition Type: ItemDefinition left: ItemDefinition Type: ItemDefinition right: ItemDefinition Type: ItemDefinition front: ItemDefinition Type: ItemDefinition
Return Type:
ComponentAccess
PotDecorationsReturns: The new instance with the modified data.
myIFluidStack.withPotDecorations(myPotDecorations);Parameters:
decorations: PotDecorations Type: PotDecorations
Return Type:
ComponentAccess
Potionand no custom effects
Returns: The new instance with the modified data.
myIFluidStack.withPotionContents(<potion:minecraft:swiftness>);
Return Type:
ComponentAccess
Potionand the given
MobEffectInstance effects.Returns: The new instance with the modified data.
// IFluidStack.withPotionContents(potion as Potion, customEffects as List<MobEffectInstance>) as ComponentAccess;myIFluidStack.withPotionContents(<potion:minecraft:swiftness>, [MobEffectInstance.of(<mobeffect:minecraft:strength>, 20 * 20, 1, false, false, true)]);Parameters:
customEffects: List<MobEffectInstance> Type: List<MobEffectInstance>
- The effects to grant upon consuming this potion.
Return Type:
ComponentAccess
Potionand the given
MobEffectInstance effects.Returns: The new instance with the modified data.
// IFluidStack.withPotionContents(potion as Potion, customColor as int, customEffects as List<MobEffectInstance>) as ComponentAccess;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. customEffects: List<MobEffectInstance> Type: List<MobEffectInstance>
- The effects to grant upon consuming this potion.
Return Type:
ComponentAccess
PotionContentsReturns: The new instance with the modified data.
myIFluidStack.withPotionContents(myPotionContents);Parameters:
contents: PotionContents Type: PotionContents
Return Type:
ComponentAccess
ResolvableProfileReturns: The new instance with the modified data.
myIFluidStack.withProfile(myResolvableProfile);Parameters:
profile: ResolvableProfile Type: ResolvableProfile
Return Type:
ComponentAccess
RarityReturns: The new instance with the modified data.
myIFluidStack.withRarity(<constant:minecraft:item/rarity:epic>);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withRecipes(myList);Parameters:
recipes: List<ResourceLocation> Type: List<ResourceLocation>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withRepairCost(20);Parameters:
cost: int Type: int
- The repair cost
Return Type:
ComponentAccess
ItemEnchantmentsReturns: The new instance with the modified data.
myIFluidStack.withStoredEnchantments(myItemEnchantments);Parameters:
enchantments: ItemEnchantments Type: ItemEnchantments
Return Type:
ComponentAccess
SuspiciousStewEffectsSuspiciousStewEffects.Entry is effectively a pair of Effect and duration.
Returns: The new instance with the modified data.
// IFluidStack.withSuspiciousStewEffects(effects as List<SuspiciousStewEffectsEntry>) as ComponentAccess;myIFluidStack.withSuspiciousStewEffects(myList);Parameters:
effects: List<SuspiciousStewEffectsEntry> Type: List<SuspiciousStewEffectsEntry>
- The list of effects to grant on consumption.
Return Type:
ComponentAccess
SuspiciousStewEffectsReturns: The new instance with the modified data.
// IFluidStack.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess;myIFluidStack.withSuspiciousStewEffects(mySuspiciousStewEffects);Parameters:
suspiciousStewEffects: SuspiciousStewEffects Type: SuspiciousStewEffects
Return Type:
ComponentAccess
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:
Return Type:
ComponentAccess
ToolReturns: The new instance with the modified data.
myIFluidStack.withTool(myTool);
Return Type:
ComponentAccess
ArmorTrimReturns: The new instance with the modified data.
myIFluidStack.withTrim(myArmorTrim);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
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
Returns: The new instance with the modified data.
myIFluidStack.withUnbreakable(myUnbreakable);Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIFluidStack.withWritableBookContent(myList);Parameters:
pages: List<Filterable<string>> Type: List<Filterable<string>>
Return Type:
ComponentAccess
WritableBookContentReturns: The new instance with the modified data.
myIFluidStack.withWritableBookContent(myWritableBookContent);Parameters:
content: WritableBookContent Type: WritableBookContent
Return Type:
ComponentAccess
WrittenBookContentReturns: The new instance with the modified data.
myIFluidStack.withWrittenBookContent(myWrittenBookContent);Parameters:
content: WrittenBookContent Type: WrittenBookContent
Return Type:
ComponentAccess
// IFluidStack.writableBookContent as WritableBookContentmyIFluidStack.writableBookContent
Return Type:
WritableBookContent
// IFluidStack.writtenBookContent as WrittenBookContentmyIFluidStack.writtenBookContent
Return Type:
WrittenBookContent