Interface IWithData<R>
- Type Parameters:
R- the type of the object
- All Known Subinterfaces:
DataComponentHolderResource<T>, FluidInstance, Holder<T>, IHolderExtension<T>, ItemInstance, RegisteredResource<T>, TypedInstance<T>, TypedInstanceExtension<T>
- All Known Implementing Classes:
AbstractArrow, AbstractBoat, AbstractChestBoat, AbstractChestedHorse, AbstractClientPlayer, AbstractCow, AbstractCubeMob, AbstractFish, AbstractFurnaceBlockEntity, AbstractGolem, AbstractHorse, AbstractHurtingProjectile, AbstractIllager, AbstractMinecart, AbstractMinecartContainer, AbstractNautilus, AbstractPiglin, AbstractSchoolingFish, AbstractSkeleton, AbstractThrownPotion, AbstractVillager, AbstractWindCharge, AgeableMob, AgeableWaterCreature, Allay, AmbientCreature, Animal, AreaEffectCloud, Armadillo, ArmorStand, Arrow, Avatar, Axolotl, BannerBlockEntity, BarrelBlockEntity, BaseContainerBlockEntity, Bat, BeaconBlockEntity, Bee, BeehiveBlockEntity, BellBlockEntity, BlastFurnaceBlockEntity, Blaze, BlockAttachedEntity, BlockBehaviour.BlockStateBase, BlockEntity, BlockState, Boat, Bogged, Breeze, BreezeWindCharge, BrewingStandBlockEntity, BrushableBlockEntity, CalibratedSculkSensorBlockEntity, Camel, CamelHusk, CampfireBlockEntity, Cat, CaveSpider, ChestBlockEntity, ChestBoat, ChestRaft, Chicken, ChiseledBookShelfBlockEntity, ClientMannequin, Cod, CommandBlockEntity, ComparatorBlockEntity, ConduitBlockEntity, CopperGolem, CopperGolemStatueBlockEntity, Cow, CrafterBlockEntity, Creaking, CreakingHeartBlockEntity, Creeper, DaylightDetectorBlockEntity, DecoratedPotBlockEntity, DeferredBlock, DeferredHolder, DeferredItem, DispenserBlockEntity, Display, Display.BlockDisplay, Display.ItemDisplay, Display.TextDisplay, Dolphin, Donkey, DragonFireball, DropperBlockEntity, Drowned, ElderGuardian, EnchantingTableBlockEntity, EndCrystal, EnderChestBlockEntity, EnderDragon, EnderDragonPart, EnderMan, Endermite, Entity, Evoker, EvokerFangs, ExperienceOrb, EyeOfEnder, FakePlayer, FallingBlockEntity, Fireball, FireworkRocketEntity, FishingHook, FluidResource, FluidStack, FluidStackTemplate, FluidState, Fox, Frog, FurnaceBlockEntity, Ghast, Giant, GlowItemFrame, GlowSquid, Goat, Guardian, HangingEntity, HangingSignBlockEntity, HappyGhast, Hoglin, Holder.Direct, Holder.Reference, HopperBlockEntity, Horse, Husk, Illusioner, Interaction, IronGolem, ItemEntity, ItemFrame, ItemResource, ItemStack, ItemStackTemplate, JigsawBlockEntity, JukeboxBlockEntity, LargeFireball, LeashFenceKnotEntity, LecternBlockEntity, LightningBolt, LivingEntity, Llama, LlamaSpit, LocalPlayer, MagmaCube, Mannequin, Marker, Minecart, MinecartChest, MinecartCommandBlock, MinecartFurnace, MinecartHopper, MinecartSpawner, MinecartTNT, Mob, Monster, Mule, MushroomCow, Nautilus, Ocelot, OminousItemSpawner, Painting, Panda, Parched, Parrot, PartEntity, PathfinderMob, PatrollingMonster, Phantom, Pig, Piglin, PiglinBrute, Pillager, PistonMovingBlockEntity, Player, PolarBear, PotentSulfurBlockEntity, PrimedTnt, Projectile, Pufferfish, Rabbit, Raft, Raider, RandomizableContainerBlockEntity, Ravager, RegistrySetBuilder.LazyHolder, RemotePlayer, Salmon, SculkCatalystBlockEntity, SculkSensorBlockEntity, SculkShriekerBlockEntity, ServerPlayer, Sheep, ShelfBlockEntity, ShoulderRidingEntity, Shulker, ShulkerBoxBlockEntity, ShulkerBullet, SignBlockEntity, Silverfish, Skeleton, SkeletonHorse, SkullBlockEntity, Slime, SmallFireball, SmokerBlockEntity, Sniffer, Snowball, SnowGolem, SpawnerBlockEntity, SpectralArrow, SpellcasterIllager, Spider, Squid, Stray, Strider, StructureBlockEntity, SulfurCube, Tadpole, TamableAnimal, TestBlockEntity, TestInstanceBlockEntity, TheEndGatewayBlockEntity, TheEndPortalBlockEntity, ThrowableItemProjectile, ThrowableProjectile, ThrownEgg, ThrownEnderpearl, ThrownExperienceBottle, ThrownLingeringPotion, ThrownSplashPotion, ThrownTrident, TraderLlama, TrappedChestBlockEntity, TrialSpawnerBlockEntity, TropicalFish, Turtle, VaultBlockEntity, VehicleEntity, Vex, Villager, Vindicator, WanderingTrader, Warden, WaterAnimal, WindCharge, Witch, WitherBoss, WitherSkeleton, WitherSkull, Wolf, Zoglin, Zombie, ZombieHorse, ZombieNautilus, ZombieVillager, ZombifiedPiglin
public interface IWithData<R>
Represents a registry object (usually a
Holder) or an instance thereof that has data maps.-
Method Summary
Modifier and TypeMethodDescriptiondefault <T> @Nullable TgetData(DataMapType<R, T> type) Returns the data of the given type that is attached to this object, ornullif one isn't.
-
Method Details
-
getData
Returns the data of the given type that is attached to this object, ornullif one isn't.- Type Parameters:
T- the type of the data- Parameters:
type- the data type- Returns:
- the data of the given type that is attached to this object, or
nullif one isn't
-