net.minecraft.world.item

public class SpawnEggItem

extends Item

All mapped superinterfaces:

FeatureElement, ItemLike

cyy
net.minecraft.world.item.SpawnEggItem
net.minecraft.class_1826
net.minecraft.item.SpawnEggItem
net.minecraft.world.item.ItemMonsterEgg

Field summary

Modifier and TypeField
private static final Map<EntityType<? extends Mob>, SpawnEggItem>
a
BY_ID
field_8914
SPAWN_EGGS
private static final com.mojang.serialization.MapCodec<EntityType<?>>
b
ENTITY_TYPE_FIELD_CODEC
field_49273
ENTITY_TYPE_MAP_CODEC
private final int
c
backgroundColor
field_8916
primaryColor
private final int
d
highlightColor
field_8915
secondaryColor
private final EntityType<?>
m
defaultType
field_8917
type

Constructor summary

ModifierConstructor
public (EntityType<? extends Mob> type, int primaryColor, int secondaryColor, Item$Properties settings)

Method summary

Modifier and TypeMethod
public InteractionResult
a(dbi arg0)
useOn(UseOnContext arg0)
method_7884(class_1838 arg0)
useOnBlock(ItemUsageContext arg0)
public InteractionResult
a(dhi arg0, cpx arg1, bti arg2)
use(Level arg0, Player arg1, InteractionHand arg2)
method_7836(class_1937 arg0, class_1657 arg1, class_1268 arg2)
use(World arg0, PlayerEntity arg1, Hand arg2)
public boolean
a(cxp arg0, bvr<?> arg1)
spawnsEntity(ItemStack arg0, EntityType<?> arg1)
method_8018(class_1799 arg0, class_1299<?> arg1)
isOfSameEntityType(ItemStack stack, EntityType<?> type)
public int
a(int arg0)
getColor(int arg0)
method_8016(int arg0)
getColor(int tintIndex)
public static SpawnEggItem
a(bvr<?> arg0)
byId(EntityType<?> arg0)
method_8019(class_1299<?> arg0)
forEntity(EntityType<?> type)
public static Iterable<SpawnEggItem>
b()
eggs()
method_8017()
getAll()
public EntityType<?>
g(cxp arg0)
getType(ItemStack arg0)
method_8015(class_1799 arg0)
getEntityType(ItemStack stack)
public FeatureFlagSet
i()
requiredFeatures()
method_45322()
getRequiredFeatures()
public Optional<Mob>
a(cpx arg0, bwi arg1, bvr<? extends bwi> arg2, ash arg3, fby arg4, cxp arg5)
spawnOffspringFromSpawnEgg(Player arg0, Mob arg1, EntityType<? extends Mob> arg2, ServerLevel arg3, Vec3 arg4, ItemStack arg5)
method_24793(class_1657 arg0, class_1308 arg1, class_1299<? extends class_1308> arg2, class_3218 arg3, class_243 arg4, class_1799 arg5)
spawnBaby(PlayerEntity user, MobEntity entity, EntityType<? extends MobEntity> entityType, ServerWorld world, Vec3d pos, ItemStack stack)