Class ContainmentDataHolder

java.lang.Object
com.binaris.wizardry.capabilities.ContainmentDataHolder
All Implemented Interfaces:
ContainmentData, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class ContainmentDataHolder extends Object implements net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>, ContainmentData
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraftforge.common.capabilities.Capability<ContainmentDataHolder>
     
    static final net.minecraft.resources.ResourceLocation
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ContainmentDataHolder(net.minecraft.world.entity.LivingEntity entity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deserializeNBT(net.minecraft.nbt.CompoundTag tag)
     
    @Nullable net.minecraft.core.BlockPos
    Gets the containment position for the containment effect, used for the Shrine structure and Containment spell.
    net.minecraft.world.entity.LivingEntity
    Gets the living entity that this containment data is associated with.
    net.minecraft.nbt.CompoundTag
     
    void
    setContainmentPos(@Nullable net.minecraft.core.BlockPos pos)
    Sets the containment position for the containment effect, used for the Shrine structure and Containment spell.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • LOCATION

      public static final net.minecraft.resources.ResourceLocation LOCATION
    • INSTANCE

      public static final net.minecraftforge.common.capabilities.Capability<ContainmentDataHolder> INSTANCE
  • Constructor Details

    • ContainmentDataHolder

      public ContainmentDataHolder(net.minecraft.world.entity.LivingEntity entity)
  • Method Details

    • getProvider

      public net.minecraft.world.entity.LivingEntity getProvider()
      Description copied from interface: ContainmentData
      Gets the living entity that this containment data is associated with.
      Specified by:
      getProvider in interface ContainmentData
      Returns:
      the living entity provider
    • getContainmentPos

      @Nullable public @Nullable net.minecraft.core.BlockPos getContainmentPos()
      Description copied from interface: ContainmentData
      Gets the containment position for the containment effect, used for the Shrine structure and Containment spell.
      Specified by:
      getContainmentPos in interface ContainmentData
      Returns:
      The BlockPos representing the containment position, or null if not contained.
    • setContainmentPos

      public void setContainmentPos(@Nullable @Nullable net.minecraft.core.BlockPos pos)
      Description copied from interface: ContainmentData
      Sets the containment position for the containment effect, used for the Shrine structure and Containment spell.
      Specified by:
      setContainmentPos in interface ContainmentData
      Parameters:
      pos - The BlockPos to set as the containment position, or null to clear it.
    • serializeNBT

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

      public void deserializeNBT(net.minecraft.nbt.CompoundTag tag)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>