Package appeng.api.stacks
Class AEFluidKey
java.lang.Object
appeng.api.stacks.AEKey
appeng.api.stacks.AEFluidKey
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDrops(long amount, List<net.minecraft.world.item.ItemStack> drops, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Adds the drops if the container holding this key is broken, such as an interface holding stacks.@Nullable net.minecraft.nbt.CompoundTagcopyTag()booleanstatic AEKeyFilterfilter()static AEFluidKeyfromPacket(net.minecraft.network.FriendlyByteBuf data) static AEFluidKeyfromTag(net.minecraft.nbt.CompoundTag tag) net.minecraft.world.level.material.FluidgetFluid()net.minecraft.resources.ResourceLocationgetId()@Nullable net.minecraft.nbt.CompoundTaggetTag()getType()inthashCode()booleanhasTag()static booleanis(@Nullable GenericStack stack) static booleanbooleanisTagged(net.minecraft.tags.TagKey<?> tag) If the underlying resource supports tagging, this method checks if the resource represented by this key is tagged by the given tag.static booleanbooleanmatches(net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant variant) static @Nullable AEFluidKeyof(net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant fluidVariant) static AEFluidKeyof(net.minecraft.world.level.material.Fluid fluid) static AEFluidKeyof(net.minecraft.world.level.material.Fluid fluid, @Nullable net.minecraft.nbt.CompoundTag tag) toString()net.minecraft.nbt.CompoundTagtoTag()Serialized keys MUST NOT contain keys that start with#, because this prefix can be used to add additional data into the same tag as the key.net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariantvoidwriteToPacket(net.minecraft.network.FriendlyByteBuf data) Methods inherited from class appeng.api.stacks.AEKey
formatAmount, fromTagGeneric, fuzzyEquals, getAmountPerByte, getAmountPerOperation, getAmountPerUnit, getDisplayName, getFuzzySearchMaxValue, getFuzzySearchValue, getModId, getUnitSymbol, matches, readKey, readOptionalKey, supportsFuzzyRangeSearch, toTagGeneric, wrapForDisplayOrFilter, writeKey, writeOptionalKey
-
Field Details
-
AMOUNT_BUCKET
public static final int AMOUNT_BUCKET- See Also:
-
AMOUNT_BLOCK
public static final int AMOUNT_BLOCK- See Also:
-
-
Method Details
-
of
public static AEFluidKey of(net.minecraft.world.level.material.Fluid fluid, @Nullable @Nullable net.minecraft.nbt.CompoundTag tag) -
of
-
of
@Nullable public static @Nullable AEFluidKey of(net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant fluidVariant) -
matches
public static boolean matches(AEKey what, net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant fluid) -
is
-
filter
-
matches
public boolean matches(net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant variant) -
getType
-
dropSecondary
- Specified by:
dropSecondaryin classAEKey- Returns:
- This object if it has no secondary component, otherwise a copy of this resource key with the secondary component removed.
-
equals
-
hashCode
public int hashCode() -
fromTag
-
toTag
public net.minecraft.nbt.CompoundTag toTag()Description copied from class:AEKeySerialized keys MUST NOT contain keys that start with#, because this prefix can be used to add additional data into the same tag as the key. -
getPrimaryKey
- Specified by:
getPrimaryKeyin classAEKey
-
getId
public net.minecraft.resources.ResourceLocation getId() -
addDrops
public void addDrops(long amount, List<net.minecraft.world.item.ItemStack> drops, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Description copied from class:AEKeyAdds the drops if the container holding this key is broken, such as an interface holding stacks. Item stacks should be placed in the list and not spawned directly into the world -
isTagged
public boolean isTagged(net.minecraft.tags.TagKey<?> tag) Description copied from class:AEKeyIf the underlying resource supports tagging, this method checks if the resource represented by this key is tagged by the given tag. -
toVariant
public net.fabricmc.fabric.api.transfer.v1.fluid.FluidVariant toVariant() -
getFluid
public net.minecraft.world.level.material.Fluid getFluid() -
getTag
@Nullable public @Nullable net.minecraft.nbt.CompoundTag getTag()- Returns:
- NEVER MODIFY THE RETURNED TAG
-
copyTag
@Nullable public @Nullable net.minecraft.nbt.CompoundTag copyTag() -
hasTag
public boolean hasTag() -
writeToPacket
public void writeToPacket(net.minecraft.network.FriendlyByteBuf data) - Specified by:
writeToPacketin classAEKey
-
fromPacket
-
is
-
toString
-