Package com.binaris.wizardry.cca.entity
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 -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.core.BlockPosGets the containment position for the containment effect, used for the Shrine structure and Containment spell.net.minecraft.world.entity.LivingEntityGets the living entity that this containment data is associated with.voidreadFromNbt(@NotNull net.minecraft.nbt.CompoundTag tag) voidsetContainmentPos(@Nullable net.minecraft.core.BlockPos pos) Sets the containment position for the containment effect, used for the Shrine structure and Containment spell.voidsync()voidwriteToNbt(@NotNull net.minecraft.nbt.CompoundTag tag) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent
applySyncPacket, shouldSyncWith, writeSyncPacketMethods 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:ContainmentDataGets the living entity that this containment data is associated with.- Specified by:
getProviderin interfaceContainmentData- Returns:
- the living entity provider
-
getContainmentPos
@Nullable public @Nullable net.minecraft.core.BlockPos getContainmentPos()Description copied from interface:ContainmentDataGets the containment position for the containment effect, used for the Shrine structure and Containment spell.- Specified by:
getContainmentPosin interfaceContainmentData- 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:ContainmentDataSets the containment position for the containment effect, used for the Shrine structure and Containment spell.- Specified by:
setContainmentPosin interfaceContainmentData- 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:
readFromNbtin interfacedev.onyxstudios.cca.api.v3.component.Component
-
writeToNbt
public void writeToNbt(@NotNull @NotNull net.minecraft.nbt.CompoundTag tag) - Specified by:
writeToNbtin interfacedev.onyxstudios.cca.api.v3.component.Component
-