Class PokeGiftTileEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.pixelmonmod.pixelmon.blocks.tileentity.PokeGiftTileEntity
- All Implemented Interfaces:
net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
public class PokeGiftTileEntity
extends net.minecraft.world.level.block.entity.BlockEntity
Tile entity for a Poké Gift.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionPokeGiftTileEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) PokeGiftTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClaimer(UUID playerID) Registers a player who has claimed the Poké Gift.booleanChecks if a player can claim the Poké Gift.booleanGets whether the chest can only be claimed once before disappearing.booleanGets whether the chest can only be claimed once per player.Gets the Poké Gift's type.getLootClaim(UUID playerID) Gets the identifier for a player who has claimed the Poké Gift.getOwner()Gets the UUID of the Poké Gift's owner.Gets the Pokémon inside the Poké Gift.Gets a copy of the Pokémon inside the Poké Gift.Gets the special Pokémon inside the Poké Gift.net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacketnet.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider registryAccess) Gets the visibility setting of the Poké Gift.booleanisUsableByPlayer(net.minecraft.world.entity.player.Player player) Checks if a player is close enough to interact with the Poké Gift.voidloadAdditional(net.minecraft.nbt.CompoundTag tagger, net.minecraft.core.HolderLookup.Provider registryAccess) voidremoveClaimer(UUID playerID) Removes a player from the list of players who have claimed the Poké Gift.voidsaveAdditional(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registryAccess) voidsetAllSpecialPixelmon(List<PokemonSpecification> pixelmon) Sets the special Pokémon inside the Poké Gift.voidsetChestOneTime(boolean val) Sets whether the chest can only be claimed once before disappearing.voidsetDropOneTime(boolean val) Sets whether the chest can only be claimed once per player.voidSets the UUID of the Poké Gift's owner.voidsetPokemon(Pokemon pokemon) Sets the Pokémon inside the Poké Gift.voidsetSpecialPixelmon(PokemonSpecification pixelmon) Adds a special Pokémon to the Poké Gift.voidSets the Poké Gift's type.voidsetVisibility(EnumPokechestVisibility visible) Sets the visibility setting of the Poké Gift.booleanChecks if claiming the Poké Gift will make it disappear.Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, hasCustomOutlineRendering, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Constructor Details
-
PokeGiftTileEntity
public PokeGiftTileEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState) -
PokeGiftTileEntity
public PokeGiftTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
-
-
Method Details
-
setOwner
Sets the UUID of the Poké Gift's owner.- Parameters:
id- The UUID of the Poké Gift's owner.
-
getOwner
Gets the UUID of the Poké Gift's owner.- Returns:
- The UUID of the Poké Gift's owner.
-
setType
Sets the Poké Gift's type.- Parameters:
t- The Poké Gift's type.
-
getGiftType
Gets the Poké Gift's type.- Returns:
- The Poké Gift's type.
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider registryAccess) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
loadAdditional
public void loadAdditional(net.minecraft.nbt.CompoundTag tagger, net.minecraft.core.HolderLookup.Provider registryAccess) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdatePacket
public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()- Overrides:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider registryAccess) - Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
canClaim
Checks if a player can claim the Poké Gift.- Parameters:
playerID- The UUID of the player attempting to claim the Poké Gift.- Returns:
- Whether the player can claim the Poké Gift.
-
getLootClaim
Gets the identifier for a player who has claimed the Poké Gift.- Parameters:
playerID- The UUID of the player attempting to claim the Poké Gift.- Returns:
- The identifier for the player who is attempting to claim the Poké Gift, or null if the player has not claimed the Poké Gift.
-
addClaimer
Registers a player who has claimed the Poké Gift.- Parameters:
playerID- The UUID of the player who has claimed the Poké Gift.
-
removeClaimer
Removes a player from the list of players who have claimed the Poké Gift.- Parameters:
playerID- The UUID of the player to remove.
-
shouldBreakBlock
public boolean shouldBreakBlock()Checks if claiming the Poké Gift will make it disappear.- Returns:
- Whether claiming the Poké Gift will make it disappear.
-
setChestOneTime
public void setChestOneTime(boolean val) Sets whether the chest can only be claimed once before disappearing.- Parameters:
val- Whether the chest can only be claimed once before disappearing.
-
getChestMode
public boolean getChestMode()Gets whether the chest can only be claimed once before disappearing.- Returns:
- Whether the chest can only be claimed once before disappearing.
-
setDropOneTime
public void setDropOneTime(boolean val) Sets whether the chest can only be claimed once per player.- Parameters:
val- Whether the chest can only be claimed once per player.
-
getDropMode
public boolean getDropMode()Gets whether the chest can only be claimed once per player.- Returns:
- Whether the chest can only be claimed once per player.
-
isUsableByPlayer
public boolean isUsableByPlayer(net.minecraft.world.entity.player.Player player) Checks if a player is close enough to interact with the Poké Gift.- Parameters:
player- The player attempting to interact with the Poké Gift.- Returns:
- Whether the player is close enough to interact with the Poké Gift.
-
getPokemon
Gets the Pokémon inside the Poké Gift.- Returns:
- The Pokémon inside the Poké Gift.
-
getPokemonCopy
Gets a copy of the Pokémon inside the Poké Gift.- Returns:
- The Pokémon inside the Poké Gift.
-
setPokemon
Sets the Pokémon inside the Poké Gift.- Parameters:
pokemon- The Pokémon inside the Poké Gift.
-
getSpecialPixelmon
Gets the special Pokémon inside the Poké Gift.- Returns:
- The special Pokémon inside the Poké Gift.
-
setAllSpecialPixelmon
Sets the special Pokémon inside the Poké Gift.- Parameters:
pixelmon- The special Pokémon inside the Poké Gift.
-
setSpecialPixelmon
Adds a special Pokémon to the Poké Gift.- Parameters:
pixelmon- The special Pokémon to put inside the Poké Gift.
-
getVisibility
Gets the visibility setting of the Poké Gift.- Returns:
- The visibility setting of the Poké Gift.
-
setVisibility
Sets the visibility setting of the Poké Gift.- Parameters:
visible- The visibility setting of the Poké Gift.
-