Class SerializableCapabilityProvider<T>

java.lang.Object
org.cyclops.cyclopscore.modcompat.capabilities.DefaultCapabilityProvider<T>
org.cyclops.cyclopscore.modcompat.capabilities.SerializableCapabilityProvider<T>
All Implemented Interfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.Tag>

public abstract class SerializableCapabilityProvider<T> extends DefaultCapabilityProvider<T> implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.Tag>
A serializable implementation of the capability provider.
  • Constructor Details

    • SerializableCapabilityProvider

      public SerializableCapabilityProvider(ICapabilityTypeGetter<T> capabilityGetter, T capability)
    • SerializableCapabilityProvider

      @Deprecated public SerializableCapabilityProvider(net.minecraftforge.common.capabilities.Capability<T> capabilityType, T capability)
      Deprecated.
  • Method Details

    • serializeNBT

      public net.minecraft.nbt.Tag serializeNBT()
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<T>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.nbt.Tag nbt)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<T>
    • serializeNBT

      protected abstract net.minecraft.nbt.Tag serializeNBT(T capability)
    • deserializeNBT

      protected abstract void deserializeNBT(T capability, net.minecraft.nbt.Tag tag)