package com.infinityraider.infinitylib.capability;

import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ICapabilityProvider;

public interface ICapabilityImplementation<C extends ICapabilityProvider, V> {
    Capability<V> getCapability();

    boolean shouldApplyCapability(C carrier);

    V createNewValue(C carrier);

    ResourceLocation getCapabilityKey();

    Class<C> getCarrierClass();
}

@@ -45,16 +45,53 @@
 ility;%0A%0A
+import net.minecraft.util.Direction;%0A
 import n
@@ -122,24 +122,24 @@
 ceLocation;%0A
-
 import net.m
@@ -250,16 +250,103 @@
 rovider;
+%0Aimport net.minecraftforge.common.util.LazyOptional;%0A%0Aimport javax.annotation.Nullable;
 %0A%0Apublic
@@ -573,24 +573,24 @@
 lityKey();%0A%0A
-
     Class%3CC%3E
@@ -608,11 +608,285 @@
 Class();
+%0A%0A    default LazyOptional%3CV%3E getCapability(C carrier) %7B%0A        return carrier.getCapability(this.getCapability());%0A    %7D%0A%0A    default LazyOptional%3CV%3E getCapability(C carrier, @Nullable Direction dir) %7B%0A        return carrier.getCapability(this.getCapability(), dir);%0A    %7D
 %0A%7D%0A

Add default Capability getters to CapabilityImplementation