Class ContainmentDataHolder

java.lang.Object
com.binaris.wizardry.cca.entity.ContainmentDataHolder
All Implemented Interfaces:
ContainmentData, dev.onyxstudios.cca.api.v3.component.Component, dev.onyxstudios.cca.api.v3.component.ComponentV3, dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent, dev.onyxstudios.cca.api.v3.component.sync.ComponentPacketWriter, dev.onyxstudios.cca.api.v3.component.sync.PlayerSyncPredicate

public class ContainmentDataHolder extends Object implements ContainmentData, dev.onyxstudios.cca.api.v3.component.ComponentV3, dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    @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.
    void
    readFromNbt(@NotNull net.minecraft.nbt.CompoundTag tag)
     
    void
    setContainmentPos(@Nullable net.minecraft.core.BlockPos pos)
    Sets the containment position for the containment effect, used for the Shrine structure and Containment spell.
    void
     
    void
    writeToNbt(@NotNull net.minecraft.nbt.CompoundTag tag)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent

    applySyncPacket, shouldSyncWith, writeSyncPacket

    Methods inherited from interface dev.onyxstudios.cca.api.v3.component.Component

    equals
  • Constructor Details

    • ContainmentDataHolder

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

    • sync

      public void sync()
    • 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.
    • readFromNbt

      public void readFromNbt(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag)
      Specified by:
      readFromNbt in interface dev.onyxstudios.cca.api.v3.component.Component
    • writeToNbt

      public void writeToNbt(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag)
      Specified by:
      writeToNbt in interface dev.onyxstudios.cca.api.v3.component.Component