Package org.spongepowered.api.data
Interface SerializableDataHolder
- All Superinterfaces:
CopyableDataHolder
,DataHolder
,DataSerializable
,ValueContainer
- All Known Subinterfaces:
Aerial
,Ageable
,Agent
,Allay
,Ambient
,Animal
,Aquatic
,Archetype<S,
,E> AreaEffectCloud
,Armadillo
,ArmorStand
,Arrow
,ArrowEntity
,Axolotl
,Banner
,Barrel
,Bat
,Beacon
,Bed
,Bee
,Beehive
,Bell
,BlastFurnace
,Blaze
,BlockDisplay
,BlockEntity
,BlockEntityArchetype
,BlockOccupiedMinecart
,BlockSnapshot
,BlockState
,Boat
,Bogged
,Boss
,Breeze
,BreezeWindCharge
,BrewingStand
,Camel
,Campfire
,CarrierBlockEntity
,CarrierMinecart<M>
,Cat
,CaveSpider
,Chest
,ChestBoat
,ChestMinecart
,Chicken
,ClientPlayer
,Cod
,CommandBlock
,CommandBlockMinecart
,Comparator
,ComplexLiving<T>
,ComplexLivingPart<P>
,Conduit
,Cow
,Creature
,Creeper
,DamagingProjectile
,DaylightDetector
,Dispenser
,DisplayEntity
,Dolphin
,Donkey
,DragonFireball
,Dropper
,Drowned
,Egg
,ElderGuardian
,EnchantmentTable
,EndCrystal
,EnderChest
,EnderDragon
,EnderDragonPart
,Enderman
,Endermite
,EnderPearl
,EndGateway
,EndPortal
,Entity
,EntityArchetype
,EntitySnapshot
,EntityTargetingProjectile
,Evoker
,EvokerFangs
,ExperienceBottle
,ExperienceOrb
,Explosive
,ExplosiveFireball
,EyeOfEnder
,FallingBlock
,FireballEntity
,FireworkRocket
,Fish
,FishingBobber
,FluidStack
,FluidStackSnapshot
,FluidState
,Fox
,Frog
,Furnace
,FurnaceBlockEntity
,FurnaceMinecart
,FusedExplosive
,Ghast
,Giant
,GlowSquid
,Goat
,Golem
,Guardian
,Hanging
,Hoglin
,Hopper
,HopperMinecart
,Horse
,HorseLike
,Hostile
,Human
,Humanoid
,Husk
,Illager
,Illusioner
,Interaction
,IronGolem
,Item
,ItemDisplay
,ItemFrame
,ItemStack
,ItemStackSnapshot
,Jigsaw
,Jukebox
,LeashKnot
,Lectern
,LightningBolt
,Living
,Llama
,LlamaLike
,LlamaSpit
,LocalPlayer
,LocatableBlock
,LocatableSnapshot<T>
,MagmaCube
,Marker
,Minecart
,MinecartLike
,MobSpawner
,Monster
,Mooshroom
,Mule
,NameableBlockEntity
,NameableCarrierBlockEntity
,Ocelot
,OminousItemSpawner
,PackHorse
,Painting
,Panda
,Parrot
,Patroller
,Phantom
,Pig
,Piglin
,PiglinBrute
,PiglinLike
,Pillager
,Piston
,Player
,PolarBear
,Potion
,PrimedTNT
,Projectile
,Pufferfish
,Rabbit
,Raider
,Ranger
,Ravager
,RemotePlayer
,Salmon
,SchoolingFish
,SculkSensor
,SerializableDataHolder.Immutable<I>
,SerializableDataHolder.Mutable
,ServerPlayer
,Sheep
,Shulker
,ShulkerBox
,ShulkerBullet
,Sign
,Silverfish
,Sittable
,Skeleton
,SkeletonHorse
,SkeletonLike
,Skull
,Slime
,SmallFireball
,Smoker
,Sniffer
,Snowball
,SnowGolem
,Spawner
,SpawnerMinecart
,SpectralArrow
,Spellcaster
,Spider
,Squid
,State<S>
,Stray
,Strider
,StructureBlock
,Tadpole
,TameableAnimal
,TameableHorse
,TextDisplay
,TNTMinecart
,Trader
,TraderLlama
,TrappedChest
,Trident
,TropicalFish
,Turtle
,Vehicle
,Vex
,Villager
,Vindicator
,WanderingTrader
,Warden
,WeatherEffect
,WindCharge
,WindChargeLike
,Witch
,Wither
,WitherSkeleton
,WitherSkull
,Wolf
,Zoglin
,Zombie
,ZombieHorse
,ZombieLike
,ZombieVillager
,ZombifiedPiglin
Represents a
DataHolder
that can be serialized into a DataContainer
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Creates a clone copy of thisCopyableDataHolder
as a newCopyableDataHolder
such that all theValue
s are safely duplicated to the new instance.boolean
validateRawData
(DataView container) Validates the container with known data required to set the raw data to thisSerializableDataHolder
.Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializable
contentVersion, toContainer
-
Method Details
-
validateRawData
Validates the container with known data required to set the raw data to thisSerializableDataHolder
. If the container is incomplete or contains invalid data,false
is returned.This validation should be checked prior to calling
SerializableDataHolder.Mutable.setRawData(DataView)
orSerializableDataHolder.Immutable.withRawData(DataView)
to avoid exceptions.- Parameters:
container
- The raw data to validate- Returns:
- True if the data is valid
-
copy
SerializableDataHolder copy()Description copied from interface:CopyableDataHolder
Creates a clone copy of thisCopyableDataHolder
as a newCopyableDataHolder
such that all theValue
s are safely duplicated to the new instance. It is not guaranteed that the returning container is of the same type as this container.- Specified by:
copy
in interfaceCopyableDataHolder
- Returns:
- The new copy
-