use of org.spongepowered.common.data.nbt.validation.DelegateDataValidator in project SpongeCommon by SpongePowered.
the class SpongeEntityArchetypeBuilder method entityData.
@Override
public EntityArchetype.Builder entityData(final DataView view) {
final DataContainer container = Objects.requireNonNull(view, "Provided DataView cannot be null!").copy();
new DelegateDataValidator(SpongeEntityArchetype.VALIDATORS, ValidationTypes.ENTITY.get()).validate(container);
this.compound = NBTTranslator.INSTANCE.translate(container);
SpongeEntityArchetypeBuilder.stripCompound(this.compound);
return this;
}
Aggregations