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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.common.capabilities.Capability<ContainmentDataHolder>static final net.minecraft.resources.ResourceLocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeserializeNBT(net.minecraft.nbt.CompoundTag tag) @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.net.minecraft.nbt.CompoundTagvoidsetContainmentPos(@Nullable net.minecraft.core.BlockPos pos) Sets the containment position for the containment effect, used for the Shrine structure and Containment spell.
-
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: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.
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT()- Specified by:
serializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-
deserializeNBT
public void deserializeNBT(net.minecraft.nbt.CompoundTag tag) - Specified by:
deserializeNBTin interfacenet.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
-