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

package com.hypixel.hytale.server.core.modules.entity.component;

import javax.annotation.Nonnull;
import com.hypixel.hytale.server.core.modules.entity.EntityModule;
import com.hypixel.hytale.component.ComponentType;
import com.hypixel.hytale.server.core.asset.type.model.config.Model;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import com.hypixel.hytale.component.Component;

public class ModelComponent implements Component<EntityStore>
{
    private final Model model;
    private boolean isNetworkOutdated;
    
    public static ComponentType<EntityStore, ModelComponent> getComponentType() {
        return EntityModule.get().getModelComponentType();
    }
    
    public ModelComponent(final Model model) {
        this.isNetworkOutdated = true;
        this.model = model;
    }
    
    public Model getModel() {
        return this.model;
    }
    
    public boolean consumeNetworkOutdated() {
        final boolean temp = this.isNetworkOutdated;
        this.isNetworkOutdated = false;
        return temp;
    }
    
    @Nonnull
    @Override
    public Component<EntityStore> clone() {
        return new ModelComponent(this.model);
    }
}
