类 SpawnEggItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.SpawnEggItem
- 所有已实现的接口:
FeatureElement
,ItemLike
,IForgeItem
- 直接已知子类:
ForgeSpawnEggItem
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.item.Item
Item.Properties
-
字段概要
字段修饰符和类型字段说明private final int
private static final Map<EntityType<? extends Mob>,
SpawnEggItem> private final EntityType<?>
private final int
从类继承的字段 net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器构造器说明SpawnEggItem
(EntityType<? extends Mob> pDefaultType, int pBackgroundColor, int pHighlightColor, Item.Properties pProperties) 已过时。 -
方法概要
修饰符和类型方法说明static SpawnEggItem
byId
(EntityType<?> pType) 已过时。Forge: callForgeSpawnEggItem.fromEntityType(EntityType)
insteadstatic Iterable<SpawnEggItem>
eggs()
int
getColor
(int pTintIndex) protected EntityType<?>
EntityType<?>
getType
(CompoundTag pNbt) spawnOffspringFromSpawnEgg
(Player pPlayer, Mob pMob, EntityType<? extends Mob> pEntityType, ServerLevel pServerLevel, Vec3 pPos, ItemStack pStack) boolean
spawnsEntity
(CompoundTag pNbt, EntityType<?> pType) use
(Level pLevel, Player pPlayer, InteractionHand pHand) useOn
(UseOnContext pContext) 从类继承的方法 net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, shouldOverrideMultiplayerNbt, toString, useOnRelease, verifyTagAfterLoad
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
字段详细资料
-
BY_ID
-
backgroundColor
private final int backgroundColor -
highlightColor
private final int highlightColor -
defaultType
-
-
构造器详细资料
-
SpawnEggItem
@Deprecated public SpawnEggItem(EntityType<? extends Mob> pDefaultType, int pBackgroundColor, int pHighlightColor, Item.Properties pProperties) 已过时。Forge: UseForgeSpawnEggItem
instead for suppliers
-
-
方法详细资料
-
useOn
-
use
-
spawnsEntity
-
getColor
public int getColor(int pTintIndex) -
byId
已过时。Forge: callForgeSpawnEggItem.fromEntityType(EntityType)
instead -
eggs
-
getType
-
requiredFeatures
- 指定者:
requiredFeatures
在接口中FeatureElement
- 覆盖:
requiredFeatures
在类中Item
-
spawnOffspringFromSpawnEgg
public Optional<Mob> spawnOffspringFromSpawnEgg(Player pPlayer, Mob pMob, EntityType<? extends Mob> pEntityType, ServerLevel pServerLevel, Vec3 pPos, ItemStack pStack) -
getDefaultType
-
ForgeSpawnEggItem
instead for suppliers