primaryColor
private final int primaryColor
- Mappings:
Namespace Name Mixin selector named primaryColorLnet/minecraft/item/SpawnEggItem;primaryColor:Iintermediary field_8916Lnet/minecraft/class_1826;field_8916:Iofficial cLcwa;c:I
ItemConvertible, ToggleableFeature| Namespace | Name |
|---|---|
| named | net/minecraft/item/SpawnEggItem |
| intermediary | net/minecraft/class_1826 |
| official | cwa |
Item.Settings, Item.TooltipContextprivate static final com.mojang.serialization.MapCodec<EntityType<?>> private final intprivate final intprivate static final Map<EntityType<? extends MobEntity>,SpawnEggItem> private final EntityType<?> BASE_ATTACK_DAMAGE_MODIFIER_ID, BASE_ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, DEFAULT_MAX_COUNT, ITEM_BAR_STEPS, MAX_MAX_COUNTFEATURE_ENABLED_REGISTRY_KEYSSpawnEggItem(EntityType<? extends MobEntity> type,
int primaryColor,
int secondaryColor,
Item.Settings settings) static @Nullable SpawnEggItemforEntity(@Nullable EntityType<?> type) static Iterable<SpawnEggItem> getAll()intgetColor(int tintIndex) EntityType<?> getEntityType(ItemStack stack) booleanisOfSameEntityType(ItemStack stack,
EntityType<?> type) spawnBaby(PlayerEntity user,
MobEntity entity,
EntityType<? extends MobEntity> entityType,
ServerWorld world,
Vec3d pos,
ItemStack stack) use(World world,
PlayerEntity user,
Hand hand) useOnBlock(ItemUsageContext context) appendTooltip, asItem, byRawId, canBeNested, canMine, canRepair, finishUsing, fromBlock, getAttributeModifiers, getBonusAttackDamage, getBreakSound, getComponents, getDefaultStack, getDrinkSound, getEatSound, getEnchantability, getItemBarColor, getItemBarStep, getMaxCount, getMaxUseTime, getMiningSpeed, getName, getName, getOrCreateTranslationKey, getRawId, getRecipeRemainder, getRegistryEntry, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, inventoryTick, isCorrectForDrops, isEnchantable, isItemBarVisible, isNetworkSynced, isUsedOnRelease, onClicked, onCraft, onCraftByPlayer, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postDamageEntity, postHit, postMine, postProcessComponents, raycast, toString, usageTick, useOnEntityclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisEnabled| Namespace | Name | Mixin selector |
|---|---|---|
| named | SPAWN_EGGS |
Lnet/minecraft/item/SpawnEggItem;SPAWN_EGGS:Ljava/util/Map; |
| intermediary | field_8914 |
Lnet/minecraft/class_1826;field_8914:Ljava/util/Map; |
| official | a |
Lcwa;a:Ljava/util/Map; |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | ENTITY_TYPE_MAP_CODEC |
Lnet/minecraft/item/SpawnEggItem;ENTITY_TYPE_MAP_CODEC:Lcom/mojang/serialization/MapCodec; |
| intermediary | field_49273 |
Lnet/minecraft/class_1826;field_49273:Lcom/mojang/serialization/MapCodec; |
| official | b |
Lcwa;b:Lcom/mojang/serialization/MapCodec; |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | primaryColor |
Lnet/minecraft/item/SpawnEggItem;primaryColor:I |
| intermediary | field_8916 |
Lnet/minecraft/class_1826;field_8916:I |
| official | c |
Lcwa;c:I |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | secondaryColor |
Lnet/minecraft/item/SpawnEggItem;secondaryColor:I |
| intermediary | field_8915 |
Lnet/minecraft/class_1826;field_8915:I |
| official | j |
Lcwa;j:I |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | type |
Lnet/minecraft/item/SpawnEggItem;type:Lnet/minecraft/entity/EntityType; |
| intermediary | field_8917 |
Lnet/minecraft/class_1826;field_8917:Lnet/minecraft/class_1299; |
| official | k |
Lcwa;k:Lbsx; |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | <init> |
Lnet/minecraft/item/SpawnEggItem;<init>(Lnet/minecraft/entity/EntityType;IILnet/minecraft/item/Item$Settings;)V |
| intermediary | <init> |
Lnet/minecraft/class_1826;<init>(Lnet/minecraft/class_1299;IILnet/minecraft/class_1792$class_1793;)V |
| official | <init> |
Lcwa;<init>(Lbsx;IILcul$a;)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 Itemcontext - the usage context| Namespace | Name | Mixin selector |
|---|---|---|
| named | useOnBlock |
Lnet/minecraft/item/Item;useOnBlock(Lnet/minecraft/item/ItemUsageContext;)Lnet/minecraft/util/ActionResult; |
| intermediary | method_7884 |
Lnet/minecraft/class_1792;method_7884(Lnet/minecraft/class_1838;)Lnet/minecraft/class_1269; |
| official | a |
Lcul;a(Lcyf;)Lbqr; |
If the item can be used for multiple ticks, then
this will only be called when the player starts using it. After that,
Item.usageTick(net.minecraft.world.World, net.minecraft.entity.LivingEntity, net.minecraft.item.ItemStack, int) is called every tick until the player finishes using the item.
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 Itemworld - the world the item was used inuser - the player who used the itemhand - the hand used| Namespace | Name | Mixin selector |
|---|---|---|
| named | use |
Lnet/minecraft/item/Item;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult; |
| 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; |
| official | a |
Lcul;a(Ldcw;Lcmx;Lbqq;)Lbqs; |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | isOfSameEntityType |
Lnet/minecraft/item/SpawnEggItem;isOfSameEntityType(Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/EntityType;)Z |
| intermediary | method_8018 |
Lnet/minecraft/class_1826;method_8018(Lnet/minecraft/class_1799;Lnet/minecraft/class_1299;)Z |
| official | a |
Lcwa;a(Lcuq;Lbsx;)Z |
tintIndex - the tint indexprimaryColor. Otherwise, returns secondaryColor.| Namespace | Name | Mixin selector |
|---|---|---|
| named | getColor |
Lnet/minecraft/item/SpawnEggItem;getColor(I)I |
| intermediary | method_8016 |
Lnet/minecraft/class_1826;method_8016(I)I |
| official | a |
Lcwa;a(I)I |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | forEntity |
Lnet/minecraft/item/SpawnEggItem;forEntity(Lnet/minecraft/entity/EntityType;)Lnet/minecraft/item/SpawnEggItem; |
| intermediary | method_8019 |
Lnet/minecraft/class_1826;method_8019(Lnet/minecraft/class_1299;)Lnet/minecraft/class_1826; |
| official | a |
Lcwa;a(Lbsx;)Lcwa; |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | getAll |
Lnet/minecraft/item/SpawnEggItem;getAll()Ljava/lang/Iterable; |
| intermediary | method_8017 |
Lnet/minecraft/class_1826;method_8017()Ljava/lang/Iterable; |
| official | h |
Lcwa;h()Ljava/lang/Iterable; |
| Namespace | Name | Mixin selector |
|---|---|---|
| named | getEntityType |
Lnet/minecraft/item/SpawnEggItem;getEntityType(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/EntityType; |
| intermediary | method_8015 |
Lnet/minecraft/class_1826;method_8015(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1299; |
| official | i |
Lcwa;i(Lcuq;)Lbsx; |
getRequiredFeatures in interface ToggleableFeaturegetRequiredFeatures in class Item| Namespace | Name | Mixin selector |
|---|---|---|
| named | getRequiredFeatures |
Lnet/minecraft/resource/featuretoggle/ToggleableFeature;getRequiredFeatures()Lnet/minecraft/resource/featuretoggle/FeatureSet; |
| intermediary | method_45322 |
Lnet/minecraft/class_7695;method_45322()Lnet/minecraft/class_7699; |
| official | i |
Lcpi;i()Lcpl; |
| Namespace | Name | Mixin selector |
|---|---|---|
| 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; |
| 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; |
| official | a |
Lcwa;a(Lcmx;Lbtp;Lbsx;Laqu;Lexc;Lcuq;)Ljava/util/Optional; |