Class GoatHornItem

java.lang.Object
net.minecraft.item.Item
net.minecraft.item.GoatHornItem
All Implemented Interfaces:
ItemConvertible

public class GoatHornItem extends Item
Mappings:
Namespace Name
official byu
intermediary net/minecraft/class_7430
named net/minecraft/item/GoatHornItem
  • Field Details

    • SOUND_VARIANT_KEY

      private static final String SOUND_VARIANT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbyu;a:Ljava/lang/String;
      intermediary field_39052 Lnet/minecraft/class_7430;field_39052:Ljava/lang/String;
      named SOUND_VARIANT_KEY Lnet/minecraft/item/GoatHornItem;SOUND_VARIANT_KEY:Ljava/lang/String;
    • field_39123

      private TagKey<class_7444> field_39123
      Mappings:
      Namespace Name Mixin selector
      official b Lbyu;b:Lajs;
      intermediary field_39123 Lnet/minecraft/class_7430;field_39123:Lnet/minecraft/class_6862;
      named field_39123 Lnet/minecraft/item/GoatHornItem;field_39123:Lnet/minecraft/tag/TagKey;
  • Constructor Details

  • Method Details

    • appendTooltip

      public void appendTooltip(ItemStack stack, @Nullable @Nullable World world, List<Text> tooltip, TooltipContext context)
      Overrides:
      appendTooltip in class Item
      Mappings:
      Namespace Name Mixin selector
      official a Lbyw;a(Lbza;Lcfa;Ljava/util/List;Lcao;)V
      intermediary method_7851 Lnet/minecraft/class_1792;method_7851(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Ljava/util/List;Lnet/minecraft/class_1836;)V
      named appendTooltip Lnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/item/TooltipContext;)V
    • getStackForSoundVariant

      public static ItemStack getStackForSoundVariant(Item item, RegistryEntry<class_7444> registryEntry)
      Mappings:
      Namespace Name Mixin selector
      official a Lbyu;a(Lbyw;Lgy;)Lbza;
      intermediary method_43558 Lnet/minecraft/class_7430;method_43558(Lnet/minecraft/class_1792;Lnet/minecraft/class_6880;)Lnet/minecraft/class_1799;
      named getStackForSoundVariant Lnet/minecraft/item/GoatHornItem;getStackForSoundVariant(Lnet/minecraft/item/Item;Lnet/minecraft/util/registry/RegistryEntry;)Lnet/minecraft/item/ItemStack;
    • setRandomSoundVariant

      public static void setRandomSoundVariant(ItemStack itemStack, TagKey<class_7444> tagKey, AbstractRandom abstractRandom)
      Mappings:
      Namespace Name Mixin selector
      official a Lbyu;a(Lbza;Lajs;Lalf;)V
      intermediary method_43562 Lnet/minecraft/class_7430;method_43562(Lnet/minecraft/class_1799;Lnet/minecraft/class_6862;Lnet/minecraft/class_5819;)V
      named setRandomSoundVariant Lnet/minecraft/item/GoatHornItem;setRandomSoundVariant(Lnet/minecraft/item/ItemStack;Lnet/minecraft/tag/TagKey;Lnet/minecraft/util/math/random/AbstractRandom;)V
    • setSoundVariant

      private static void setSoundVariant(ItemStack stack, RegistryEntry<class_7444> registryEntry)
      Mappings:
      Namespace Name Mixin selector
      official a Lbyu;a(Lbza;Lgy;)V
      intermediary method_43561 Lnet/minecraft/class_7430;method_43561(Lnet/minecraft/class_1799;Lnet/minecraft/class_6880;)V
      named setSoundVariant Lnet/minecraft/item/GoatHornItem;setSoundVariant(Lnet/minecraft/item/ItemStack;Lnet/minecraft/util/registry/RegistryEntry;)V
    • appendStacks

      public void appendStacks(ItemGroup group, DefaultedList<ItemStack> stacks)
      Appends the stacks of this item shown in the item group to the list.
      Overrides:
      appendStacks in class Item
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lbyw;a(Lbxm;Lhe;)V
      intermediary method_7850 Lnet/minecraft/class_1792;method_7850(Lnet/minecraft/class_1761;Lnet/minecraft/class_2371;)V
      named appendStacks Lnet/minecraft/item/Item;appendStacks(Lnet/minecraft/item/ItemGroup;Lnet/minecraft/util/collection/DefaultedList;)V
    • use

      public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand)
      Called when an item is used by a player. The use action, by default, is bound to the right mouse button.

      This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using world.isClient().

      Overrides:
      use in class Item
      Parameters:
      world - the world the item was used in
      user - the player who used the item
      hand - the hand used
      Returns:
      a typed action result that specifies whether using the item was successful. The action result contains the new item stack that the player's hand will be set to.
      Mappings:
      Namespace Name Mixin selector
      official a Lbyw;a(Lcfa;Lbsf;Layn;)Layp;
      intermediary method_7836 Lnet/minecraft/class_1792;method_7836(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271;
      named use Lnet/minecraft/item/Item;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
    • getMaxUseTime

      public int getMaxUseTime(ItemStack stack)
      Returns the maximum use (right-click) time of this item, in ticks. Once a player has used an item for said number of ticks, they stop using it, and Item.finishUsing(net.minecraft.item.ItemStack, net.minecraft.world.World, net.minecraft.entity.LivingEntity) is called.
      Overrides:
      getMaxUseTime in class Item
      Returns:
      the maximum use (right-click) time of this item, in ticks
      Mappings:
      Namespace Name Mixin selector
      official b Lbyw;b(Lbza;)I
      intermediary method_7881 Lnet/minecraft/class_1792;method_7881(Lnet/minecraft/class_1799;)I
      named getMaxUseTime Lnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
    • method_43711

      @Nullable private static @Nullable class_7444 method_43711(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official d Lbyu;d(Lbza;)Lbyt;
      intermediary method_43711 Lnet/minecraft/class_7430;method_43711(Lnet/minecraft/class_1799;)Lnet/minecraft/class_7444;
      named method_43711 Lnet/minecraft/item/GoatHornItem;method_43711(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/class_7444;
    • getSoundVariant

      @Nullable private static @Nullable Identifier getSoundVariant(ItemStack itemStack)
      Mappings:
      Namespace Name Mixin selector
      official k Lbyu;k(Lbza;)Lzy;
      intermediary method_43564 Lnet/minecraft/class_7430;method_43564(Lnet/minecraft/class_1799;)Lnet/minecraft/class_2960;
      named getSoundVariant Lnet/minecraft/item/GoatHornItem;getSoundVariant(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/Identifier;
    • getUseAction

      public UseAction getUseAction(ItemStack stack)
      Overrides:
      getUseAction in class Item
      Mappings:
      Namespace Name Mixin selector
      official c Lbyw;c(Lbza;)Lcaq;
      intermediary method_7853 Lnet/minecraft/class_1792;method_7853(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1839;
      named getUseAction Lnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
    • playSound

      private static void playSound(World world, PlayerEntity player, class_7444 class_7444)
      Mappings:
      Namespace Name Mixin selector
      official a Lbyu;a(Lcfa;Lbsf;Lbyt;)V
      intermediary method_43563 Lnet/minecraft/class_7430;method_43563(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_7444;)V
      named playSound Lnet/minecraft/item/GoatHornItem;playSound(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/class_7444;)V