// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.server.npc.storage;

import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
import com.hypixel.hytale.component.ComponentAccessor;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import com.hypixel.hytale.component.Ref;

public abstract class PersistentParameter<Type>
{
    protected PersistentParameter() {
    }
    
    public void set(@Nonnull final Ref<EntityStore> ownerRef, @Nullable final Type value, @Nonnull final ComponentAccessor<EntityStore> componentAccessor) {
        this.set0(value);
        final TransformComponent transformComponent = componentAccessor.getComponent(ownerRef, TransformComponent.getComponentType());
        if (transformComponent != null) {
            transformComponent.markChunkDirty(componentAccessor);
        }
    }
    
    protected abstract void set0(@Nullable final Type p0);
}
