Package net.minecraft.util
Interface Nameable
- All Known Implementing Classes:
AbstractClientPlayerEntity,AbstractDecorationEntity,AbstractDonkeyEntity,AbstractFireballEntity,AbstractFurnaceBlockEntity,AbstractHorseEntity,AbstractMinecartEntity,AbstractPiglinEntity,AbstractSkeletonEntity,AllayEntity,AmbientEntity,AnimalEntity,AreaEffectCloudEntity,ArmorStandEntity,ArrowEntity,AxolotlEntity,BannerBlockEntity,BarrelBlockEntity,BatEntity,BeaconBlockEntity,BeeEntity,BlastFurnaceBlockEntity,BlazeEntity,BoatEntity,BrewingStandBlockEntity,CamelEntity,CatEntity,CaveSpiderEntity,ChestBlockEntity,ChestBoatEntity,ChestMinecartEntity,ChickenEntity,ClientPlayerEntity,CodEntity,CommandBlockMinecartEntity,CowEntity,CreeperEntity,DispenserBlockEntity,DisplayEntity,DisplayEntity.BlockDisplayEntity,DisplayEntity.ItemDisplayEntity,DisplayEntity.TextDisplayEntity,DolphinEntity,DonkeyEntity,DragonFireballEntity,DropperBlockEntity,DrownedEntity,EggEntity,ElderGuardianEntity,EnchantingTableBlockEntity,EndCrystalEntity,EnderDragonEntity,EnderDragonPart,EndermanEntity,EndermiteEntity,EnderPearlEntity,Entity,EvokerEntity,EvokerFangsEntity,ExperienceBottleEntity,ExperienceOrbEntity,ExplosiveProjectileEntity,EyeOfEnderEntity,FallingBlockEntity,FireballEntity,FireworkRocketEntity,FishEntity,FishingBobberEntity,FlyingEntity,FoxEntity,FrogEntity,FurnaceBlockEntity,FurnaceMinecartEntity,GhastEntity,GiantEntity,GlowItemFrameEntity,GlowSquidEntity,GoatEntity,GolemEntity,GuardianEntity,HoglinEntity,HopperBlockEntity,HopperMinecartEntity,HorseEntity,HostileEntity,HuskEntity,IllagerEntity,IllusionerEntity,InteractionEntity,IronGolemEntity,ItemEntity,ItemFrameEntity,LeashKnotEntity,LightningEntity,LivingEntity,LlamaEntity,LlamaSpitEntity,LockableContainerBlockEntity,LootableContainerBlockEntity,MagmaCubeEntity,MarkerEntity,MerchantEntity,MinecartEntity,MobEntity,MooshroomEntity,MuleEntity,OcelotEntity,OtherClientPlayerEntity,PaintingEntity,PandaEntity,ParrotEntity,PassiveEntity,PathAwareEntity,PatrolEntity,PersistentProjectileEntity,PhantomEntity,PigEntity,PiglinBruteEntity,PiglinEntity,PillagerEntity,PlayerEntity,PlayerInventory,PolarBearEntity,PotionEntity,ProjectileEntity,PufferfishEntity,RabbitEntity,RaiderEntity,RavagerEntity,SalmonEntity,SchoolingFishEntity,ServerPlayerEntity,SheepEntity,ShulkerBoxBlockEntity,ShulkerBulletEntity,ShulkerEntity,SilverfishEntity,SkeletonEntity,SkeletonHorseEntity,SlimeEntity,SmallFireballEntity,SmokerBlockEntity,SnifferEntity,SnowballEntity,SnowGolemEntity,SpawnerMinecartEntity,SpectralArrowEntity,SpellcastingIllagerEntity,SpiderEntity,SquidEntity,StorageMinecartEntity,StrayEntity,StriderEntity,TadpoleEntity,TameableEntity,TameableShoulderEntity,ThrownEntity,ThrownItemEntity,TntEntity,TntMinecartEntity,TraderLlamaEntity,TrappedChestBlockEntity,TridentEntity,TropicalFishEntity,TurtleEntity,VexEntity,VillagerEntity,VindicatorEntity,WanderingTraderEntity,WardenEntity,WaterCreatureEntity,WitchEntity,WitherEntity,WitherSkeletonEntity,WitherSkullEntity,WolfEntity,ZoglinEntity,ZombieEntity,ZombieHorseEntity,ZombieVillagerEntity,ZombifiedPiglinEntity
public interface Nameable
Represents something that can be named, such as block entities or entities.
- Mappings:
Namespace Name official beaintermediary net/minecraft/class_1275named net/minecraft/util/Nameable
-
Method Details
-
getName
Text getName()Returns the name of this object.This should return the custom name if it exists, otherwise the default name. This should not have styling applied.
- Returns:
- the name of this object
- Mappings:
Namespace Name Mixin selector official YLbea;Y()Lsw;intermediary method_5477Lnet/minecraft/class_1275;method_5477()Lnet/minecraft/class_2561;named getNameLnet/minecraft/util/Nameable;getName()Lnet/minecraft/text/Text;
-
hasCustomName
default boolean hasCustomName()Returns whether this object has a custom name.- Returns:
- whether this object has a custom name
- Mappings:
Namespace Name Mixin selector official ZLbea;Z()Zintermediary method_16914Lnet/minecraft/class_1275;method_16914()Znamed hasCustomNameLnet/minecraft/util/Nameable;hasCustomName()Z
-
getDisplayName
Returns the display name of this object.By default, this returns the result of
getName(). The return value can have styling applied.- Returns:
- the display name of this object
- Mappings:
Namespace Name Mixin selector official G_Lbea;G_()Lsw;intermediary method_5476Lnet/minecraft/class_1275;method_5476()Lnet/minecraft/class_2561;named getDisplayNameLnet/minecraft/util/Nameable;getDisplayName()Lnet/minecraft/text/Text;
-
getCustomName
Returns the custom name of this object, ornullif there is none.- Returns:
- the custom name of this object, or
nullif there is none - Mappings:
Namespace Name Mixin selector official aaLbea;aa()Lsw;intermediary method_5797Lnet/minecraft/class_1275;method_5797()Lnet/minecraft/class_2561;named getCustomNameLnet/minecraft/util/Nameable;getCustomName()Lnet/minecraft/text/Text;
-