Interface DataSerializable
- All Known Subinterfaces:
AcceleratingProjectile
,Advancement
,AdvancementTemplate
,Aerial
,Ageable
,Agent
,Allay
,Ambient
,Angerable
,Animal
,AnvilCost
,Aquatic
,Archetype<S,
,E> AreaEffectCloud
,Armadillo
,ArmorStand
,Arrow
,ArrowLike
,ArtTypeTemplate
,Attackable
,Axolotl
,Banner
,BannerPatternLayer
,Barrel
,Bat
,Beacon
,Bed
,Bee
,Beehive
,Bell
,BiomeTemplate
,BlastFurnace
,Blaze
,BlockDisplay
,BlockEntity
,BlockEntityArchetype
,BlockOccupiedMinecart
,BlockSnapshot
,BlockState
,Boat
,Bogged
,Boss
,Breedable
,Breeze
,BreezeWindCharge
,BrewingStand
,Camel
,Campfire
,CarrierBlockEntity
,CarrierMinecart<M>
,CarverTemplate
,Cat
,CaveSpider
,Chargeable
,ChatTypeTemplate
,Chest
,ChestBoat
,ChestMinecart
,Chicken
,ClientPlayer
,Cod
,CommandBlock
,CommandBlockMinecart
,Comparator
,ComplexLiving<T>
,ComplexLivingPart<P>
,Conduit
,Cow
,Crafter
,Creaking
,CreakingHeart
,Creeper
,DamageTypeTemplate
,DataPackEntry<T>
,DaylightDetector
,DecoratedPot
,DensityFunctionTemplate
,Dispenser
,DisplayEntity
,Dolphin
,Donkey
,DragonFireball
,Dropper
,Drowned
,Egg
,ElderGuardian
,Enchantment
,EnchantmentTable
,EndCrystal
,EnderChest
,EnderDragon
,EnderDragonPart
,Enderman
,Endermite
,EnderPearl
,EndGateway
,EndPortal
,Entity
,EntityArchetype
,EntitySnapshot
,Evoker
,EvokerFangs
,ExperienceBottle
,ExperienceOrb
,Explosive
,ExplosiveFireball
,EyeOfEnder
,FallingBlock
,FeatureTemplate
,FireworkEffect
,FireworkRocket
,Fish
,FishingBobber
,FluidStack
,FluidStackSnapshot
,FluidState
,Fox
,Frog
,Furnace
,FurnaceBlockEntity
,FurnaceMinecart
,FusedExplosive
,GameProfile
,Ghast
,Giant
,GlowItemFrame
,GlowSquid
,Goat
,Golem
,Guardian
,Hanging
,Hoglin
,Hopper
,HopperMinecart
,Horse
,HorseLike
,Hostile
,Human
,Humanoid
,Husk
,IgnitingProjectile
,Illager
,Illusioner
,Interaction
,IronGolem
,Item
,ItemDisplay
,ItemFrame
,ItemRepresentable
,ItemStack
,ItemStackLike
,ItemStackSnapshot
,Jigsaw
,JigsawPoolTemplate
,Jukebox
,KeyValueMatcher<V>
,Leashable
,LeashKnot
,Lectern
,LightningBolt
,Living
,Llama
,LlamaSpit
,LocalPlayer
,LocatableBlock
,LocatableSnapshot<T>
,MagmaCube
,MapCanvas
,MapColor
,MapDecoration
,MapInfo
,Marker
,Minecart
,MinecartLike
,MobSpawner
,Monster
,Mooshroom
,Mule
,NameableBlockEntity
,NameableCarrierBlockEntity
,NoiseGeneratorConfigTemplate
,NoiseTemplate
,Ocelot
,OfflineChunk
,OminousItemSpawner
,Ownable
,PackHorse
,Painting
,Panda
,Parrot
,ParticleEffect
,PathfinderAgent
,Patroller
,Phantom
,Pig
,Piglin
,PiglinBrute
,PiglinLike
,Pillager
,Piston
,PlacedFeatureTemplate
,Player
,PolarBear
,Potion
,PotionEffect
,PrimedTNT
,ProcessorListTemplate
,ProfileProperty
,Projectile
,Pufferfish
,Rabbit
,Raft
,Raider
,RangedAgent
,Ranger
,Ravager
,RecipeRegistration
,RemotePlayer
,Saddleable
,Salmon
,SchematicTemplate
,SchoolingFish
,SculkSensor
,SerializableDataHolder
,SerializableDataHolder.Immutable<I>
,SerializableDataHolder.Mutable
,ServerLocation
,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
,StructureSetTemplate
,StructureTemplate
,Tadpole
,TagTemplate<T>
,TameableAnimal
,Targeting
,TextDisplay
,ThrowableItemProjectile
,TNTMinecart
,TradeOffer
,TraderLlama
,TrappedChest
,TrialSpawner
,Trident
,TropicalFish
,Turtle
,VariableAmount
,Vehicle
,Vex
,Villager
,VillagerLike
,Vindicator
,WanderingTrader
,Warden
,Weather
,WindCharge
,WindChargeLike
,Witch
,Wither
,WitherSkeleton
,WitherSkull
,Wolf
,WorldTemplate
,WorldTypeTemplate
,Zoglin
,Zombie
,ZombieHorse
,ZombieVillager
,ZombifiedPiglin
- All Known Implementing Classes:
BlockTransaction
,BlockTransactionReceipt
,Color
,EmptyObject
,RespawnLocation
,SlotTransaction
,Transaction
,VariableAmount.BaseAndAddition
,VariableAmount.BaseAndVariance
,VariableAmount.Fixed
,VariableAmount.OptionalAmount
,WeightedSerializableObject
public interface DataSerializable
Represents an object that can be represented by a
DataContainer
.
DataContainers received from toContainer()
should be considered to be copies of the original data, and therefore,
thread safe.
-
Method Summary
Modifier and TypeMethodDescriptionint
Gets the content version of thisDataSerializable
.Serializes this object into a comprehensibleDataContainer
.
-
Method Details
-
contentVersion
int contentVersion()Gets the content version of thisDataSerializable
. The version may differ between instances of plugins and implementations such that theDataView
fromtoContainer()
may include different information, or remove other information as they are no longer deemed necessary. The version goes hand in hand withDataContentUpdater
as it is required when there exists anyDataView
of thisDataSerializable
with an "older" version.- Returns:
- The version of the content being serialized
-
toContainer
DataContainer toContainer()Serializes this object into a comprehensibleDataContainer
.- Returns:
- A newly created DataContainer
-