Interface ItemStackKJS

All Superinterfaces:
AttributeModifierFunctions, ComponentFunctions, IngredientSupplierKJS, ItemComponentFunctions, ItemMatch, JsonSerializable, MutableDataComponentHolderFunctions, NBTSerializable, RegistryObjectKJS<net.minecraft.world.item.Item>, Replaceable, ReplacementMatch, dev.latvian.mods.rhino.util.SpecialEquality, dev.latvian.mods.rhino.util.ToStringJS, WithCodec
All Known Implementing Classes:
ItemStackMixin

@RemapPrefixForJS("kjs$") public interface ItemStackKJS extends dev.latvian.mods.rhino.util.SpecialEquality, WithCodec, IngredientSupplierKJS, dev.latvian.mods.rhino.util.ToStringJS, Replaceable, ItemComponentFunctions, MutableDataComponentHolderFunctions, ItemMatch, RegistryObjectKJS<net.minecraft.world.item.Item>
  • Method Details

    • kjs$self

      default net.minecraft.world.item.ItemStack kjs$self()
    • specialEquals

      default boolean specialEquals(dev.latvian.mods.rhino.Context cx, Object o, boolean shallow)
      Specified by:
      specialEquals in interface RegistryObjectKJS<net.minecraft.world.item.Item>
      Specified by:
      specialEquals in interface dev.latvian.mods.rhino.util.SpecialEquality
    • kjs$equalsIgnoringCount

      default boolean kjs$equalsIgnoringCount(net.minecraft.world.item.ItemStack stack)
    • kjs$getRegistryId

      default net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<net.minecraft.world.item.Item>> kjs$getRegistryId()
      Specified by:
      kjs$getRegistryId in interface RegistryObjectKJS<net.minecraft.world.item.Item>
    • kjs$getRegistry

      default net.minecraft.core.Registry<net.minecraft.world.item.Item> kjs$getRegistry()
      Specified by:
      kjs$getRegistry in interface RegistryObjectKJS<net.minecraft.world.item.Item>
    • kjs$getIdLocation

      default net.minecraft.resources.ResourceLocation kjs$getIdLocation()
      Specified by:
      kjs$getIdLocation in interface RegistryObjectKJS<net.minecraft.world.item.Item>
    • kjs$asHolder

      default net.minecraft.core.Holder<net.minecraft.world.item.Item> kjs$asHolder()
      Specified by:
      kjs$asHolder in interface RegistryObjectKJS<net.minecraft.world.item.Item>
    • kjs$getKey

      default net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> kjs$getKey()
      Specified by:
      kjs$getKey in interface RegistryObjectKJS<net.minecraft.world.item.Item>
    • kjs$getId

      default String kjs$getId()
      Specified by:
      kjs$getId in interface RegistryObjectKJS<net.minecraft.world.item.Item>
    • kjs$getMod

      default String kjs$getMod()
      Specified by:
      kjs$getMod in interface RegistryObjectKJS<net.minecraft.world.item.Item>
    • kjs$getBlock

      @Nullable default @Nullable net.minecraft.world.level.block.Block kjs$getBlock()
    • kjs$withCount

      @ReturnsSelf(copy=true) default net.minecraft.world.item.ItemStack kjs$withCount(int c)
    • kjs$getComponentString

      default String kjs$getComponentString(dev.latvian.mods.rhino.Context cx)
      Specified by:
      kjs$getComponentString in interface ComponentFunctions
    • kjs$withCustomName

      @ReturnsSelf(copy=true) default net.minecraft.world.item.ItemStack kjs$withCustomName(@Nullable @Nullable net.minecraft.network.chat.Component name)
    • kjs$getEnchantments

      default net.minecraft.world.item.enchantment.ItemEnchantments kjs$getEnchantments()
    • kjs$hasEnchantment

      default boolean kjs$hasEnchantment(net.minecraft.core.Holder<net.minecraft.world.item.enchantment.Enchantment> enchantment, int level)
    • kjs$enchant

      @ReturnsSelf default net.minecraft.world.item.ItemStack kjs$enchant(net.minecraft.core.Holder<net.minecraft.world.item.enchantment.Enchantment> enchantment, int level)
    • kjs$enchant

      @ReturnsSelf(copy=true) default net.minecraft.world.item.ItemStack kjs$enchant(net.minecraft.world.item.enchantment.ItemEnchantments enchantments)
    • kjs$areItemsEqual

      default boolean kjs$areItemsEqual(net.minecraft.world.item.ItemStack other)
    • kjs$areComponentsEqual

      default boolean kjs$areComponentsEqual(net.minecraft.world.item.ItemStack other)
    • kjs$getHarvestSpeed

      default float kjs$getHarvestSpeed(@Nullable @Nullable LevelBlock block)
    • kjs$getHarvestSpeed

      default float kjs$getHarvestSpeed()
    • kjs$getTypeData

      default Map<String,Object> kjs$getTypeData()
    • toStringJS

      default String toStringJS(dev.latvian.mods.rhino.Context cx)
      Specified by:
      toStringJS in interface dev.latvian.mods.rhino.util.ToStringJS
    • kjs$toItemString

      default String kjs$toItemString(dev.latvian.mods.rhino.Context cx)
    • kjs$withChance

      @Deprecated default net.minecraft.world.item.ItemStack kjs$withChance(dev.latvian.mods.rhino.Context cx, float chance)
      Deprecated.
    • kjs$toItemString0

      default String kjs$toItemString0(@Nullable @Nullable com.mojang.serialization.DynamicOps<net.minecraft.nbt.Tag> dynamicOps)
    • kjs$asIngredient

      default net.minecraft.world.item.crafting.Ingredient kjs$asIngredient()
      Specified by:
      kjs$asIngredient in interface IngredientSupplierKJS
    • getCodec

      default com.mojang.serialization.Codec<net.minecraft.world.item.ItemStack> getCodec(dev.latvian.mods.rhino.Context cx)
      Specified by:
      getCodec in interface WithCodec
    • kjs$withLore

      @ReturnsSelf(copy=true) default net.minecraft.world.item.ItemStack kjs$withLore(net.minecraft.network.chat.Component[] lines)
    • kjs$withLore

      @ReturnsSelf(copy=true) default net.minecraft.world.item.ItemStack kjs$withLore(net.minecraft.network.chat.Component[] lines, net.minecraft.network.chat.Component[] styledLines)
    • replaceThisWith

      default Object replaceThisWith(RecipeScriptContext cx, Object with)
      Specified by:
      replaceThisWith in interface Replaceable
    • matches

      default boolean matches(RecipeMatchContext cx, net.minecraft.world.item.ItemStack s, boolean exact)
      Specified by:
      matches in interface ItemMatch
    • matches

      default boolean matches(RecipeMatchContext cx, net.minecraft.world.item.crafting.Ingredient in, boolean exact)
      Specified by:
      matches in interface ItemMatch
    • matches

      default boolean matches(RecipeMatchContext cx, net.minecraft.world.level.ItemLike itemLike, boolean exact)
      Specified by:
      matches in interface ItemMatch
    • kjs$getWebIconURL

      default RelativeURL kjs$getWebIconURL(com.mojang.serialization.DynamicOps<net.minecraft.nbt.Tag> ops, int size)