primaryColor
private final int primaryColor
- Mappings:
Namespace Name Mixin selector official b
Lbow;b:I
intermediary field_8916
Lnet/minecraft/class_1826;field_8916:I
named primaryColor
Lnet/minecraft/item/SpawnEggItem;primaryColor:I
ItemConvertible
public class SpawnEggItem extends Item
Namespace | Name |
---|---|
official | bow |
intermediary | net/minecraft/class_1826 |
named | net/minecraft/item/SpawnEggItem |
Item.Settings
Modifier and Type | Field | Description |
---|---|---|
private int |
primaryColor |
|
private int |
secondaryColor |
|
private static Map<EntityType<? extends MobEntity>,SpawnEggItem> |
SPAWN_EGGS |
|
private EntityType<?> |
type |
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group
Constructor | Description |
---|---|
SpawnEggItem(EntityType<? extends MobEntity> type,
int primaryColor,
int secondaryColor,
Item.Settings settings) |
Modifier and Type | Method | Description |
---|---|---|
static SpawnEggItem |
forEntity(EntityType<?> type) |
|
static Iterable<SpawnEggItem> |
getAll() |
|
int |
getColor(int num) |
|
EntityType<?> |
getEntityType(CompoundTag tag) |
|
boolean |
isOfSameEntityType(CompoundTag tag,
EntityType<?> type) |
|
Optional<MobEntity> |
spawnBaby(PlayerEntity user,
MobEntity entity,
EntityType<? extends MobEntity> entityType,
ServerWorld world,
Vec3d pos,
ItemStack stack) |
|
TypedActionResult<ItemStack> |
use(World world,
PlayerEntity user,
Hand hand) |
Called when an item is used by a player.
|
ActionResult |
useOnBlock(ItemUsageContext context) |
Called when an item is used on a block.
|
appendStacks, appendTooltip, asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getEquipSound, getFoodComponent, getGroup, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, hasStoredInventory, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isIn, isItemBarVisible, isNetworkSynced, isSuitableFor, isUsedOnRelease, onClicked, onCraft, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postHit, postMine, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, useOnEntity
Namespace | Name | Mixin selector |
---|---|---|
official | a |
Lbow;a:Ljava/util/Map; |
intermediary | field_8914 |
Lnet/minecraft/class_1826;field_8914:Ljava/util/Map; |
named | SPAWN_EGGS |
Lnet/minecraft/item/SpawnEggItem;SPAWN_EGGS:Ljava/util/Map; |
Namespace | Name | Mixin selector |
---|---|---|
official | b |
Lbow;b:I |
intermediary | field_8916 |
Lnet/minecraft/class_1826;field_8916:I |
named | primaryColor |
Lnet/minecraft/item/SpawnEggItem;primaryColor:I |
Namespace | Name | Mixin selector |
---|---|---|
official | c |
Lbow;c:I |
intermediary | field_8915 |
Lnet/minecraft/class_1826;field_8915:I |
named | secondaryColor |
Lnet/minecraft/item/SpawnEggItem;secondaryColor:I |
Namespace | Name | Mixin selector |
---|---|---|
official | d |
Lbow;d:Laqz; |
intermediary | field_8917 |
Lnet/minecraft/class_1826;field_8917:Lnet/minecraft/class_1299; |
named | type |
Lnet/minecraft/item/SpawnEggItem;type:Lnet/minecraft/entity/EntityType; |
Namespace | Name | Mixin selector |
---|---|---|
official | <init> |
Lbow;<init>(Laqz;IILbnr$a;)V |
intermediary | <init> |
Lnet/minecraft/class_1826;<init>(Lnet/minecraft/class_1299;IILnet/minecraft/class_1792$class_1793;)V |
named | <init> |
Lnet/minecraft/item/SpawnEggItem;<init>(Lnet/minecraft/entity/EntityType;IILnet/minecraft/item/Item$Settings;)V |
This method is called on both the logical client and logical server, so take caution when using this method.
The logical side can be checked using context.getWorld().isClient()
.
useOnBlock
in class Item
context
- the usage contextNamespace | Name | Mixin selector |
---|---|---|
official | a |
Lbnr;a(Lbpx;)Lapq; |
intermediary | method_7884 |
Lnet/minecraft/class_1792;method_7884(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269; |
named | useOnBlock |
Lnet/minecraft/item/Item;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult; |
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()
.
use
in class Item
world
- the world the item was used inuser
- the player who used the itemhand
- the hand usedNamespace | Name | Mixin selector |
---|---|---|
official | a |
Lbnr;a(Lbtv;Lbhl;Lapp;)Lapr; |
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; |
Namespace | Name | Mixin selector |
---|---|---|
official | a |
Lbow;a(Lmq;Laqz;)Z |
intermediary | method_8018 |
Lnet/minecraft/class_1826;method_8018(Lnet/minecraft/class_2487;Lnet/minecraft/class_1299;)Z |
named | isOfSameEntityType |
Lnet/minecraft/item/SpawnEggItem;isOfSameEntityType(Lnet/minecraft/nbt/CompoundTag;Lnet/minecraft/entity/EntityType;)Z |
Namespace | Name | Mixin selector |
---|---|---|
official | a |
Lbow;a(I)I |
intermediary | method_8016 |
Lnet/minecraft/class_1826;method_8016(I)I |
named | getColor |
Lnet/minecraft/item/SpawnEggItem;getColor(I)I |
Namespace | Name | Mixin selector |
---|---|---|
official | a |
Lbow;a(Laqz;)Lbow; |
intermediary | method_8019 |
Lnet/minecraft/class_1826;method_8019(Lnet/minecraft/class_1299;)Lnet/minecraft/class_1826; |
named | forEntity |
Lnet/minecraft/item/SpawnEggItem;forEntity(Lnet/minecraft/entity/EntityType;)Lnet/minecraft/item/SpawnEggItem; |
Namespace | Name | Mixin selector |
---|---|---|
official | i |
Lbow;i()Ljava/lang/Iterable; |
intermediary | method_8017 |
Lnet/minecraft/class_1826;method_8017()Ljava/lang/Iterable; |
named | getAll |
Lnet/minecraft/item/SpawnEggItem;getAll()Ljava/lang/Iterable; |
Namespace | Name | Mixin selector |
---|---|---|
official | a |
Lbow;a(Lmq;)Laqz; |
intermediary | method_8015 |
Lnet/minecraft/class_1826;method_8015(Lnet/minecraft/class_2487;)Lnet/minecraft/class_1299; |
named | getEntityType |
Lnet/minecraft/item/SpawnEggItem;getEntityType(Lnet/minecraft/nbt/CompoundTag;)Lnet/minecraft/entity/EntityType; |
Namespace | Name | Mixin selector |
---|---|---|
official | a |
Lbow;a(Lbhl;Larj;Laqz;Laav;Ldiu;Lbnv;)Ljava/util/Optional; |
intermediary | method_24793 |
Lnet/minecraft/class_1826;method_24793(Lnet/minecraft/class_1657;Lnet/minecraft/class_1308;Lnet/minecraft/class_1299;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;Lnet/minecraft/class_1799;)Ljava/util/Optional; |
named | spawnBaby |
Lnet/minecraft/item/SpawnEggItem;spawnBaby(Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/entity/mob/MobEntity;Lnet/minecraft/entity/EntityType;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/item/ItemStack;)Ljava/util/Optional; |