package net.minecraft.world;

public class InteractionResultHolder<T> {
    private final InteractionResult result;
    private final T object;
    
    public InteractionResultHolder(final InteractionResult ajl, final T object) {
        this.result = ajl;
        this.object = object;
    }
    
    public InteractionResult getResult() {
        return this.result;
    }
    
    public T getObject() {
        return this.object;
    }
    
    public static <T> InteractionResultHolder<T> success(final T object) {
        return new InteractionResultHolder<T>(InteractionResult.SUCCESS, object);
    }
    
    public static <T> InteractionResultHolder<T> consume(final T object) {
        return new InteractionResultHolder<T>(InteractionResult.CONSUME, object);
    }
    
    public static <T> InteractionResultHolder<T> pass(final T object) {
        return new InteractionResultHolder<T>(InteractionResult.PASS, object);
    }
    
    public static <T> InteractionResultHolder<T> fail(final T object) {
        return new InteractionResultHolder<T>(InteractionResult.FAIL, object);
    }
}
