Class PokeGiftTileEntity
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.block.entity.BlockEntity>
net.minecraft.world.level.block.entity.BlockEntity
com.pixelmonmod.pixelmon.blocks.tileentity.PokeGiftTileEntity
- All Implemented Interfaces:
net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.block.entity.BlockEntity>,net.minecraftforge.common.capabilities.ICapabilitySerializable<net.minecraft.nbt.CompoundTag>,net.minecraftforge.common.extensions.IForgeBlockEntity,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
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.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
INFINITE_EXTENT_AABB -
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.CompoundTagGets 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.voidload(net.minecraft.nbt.CompoundTag tagger) voidremoveClaimer(UUID playerID) Removes a player from the list of players who have claimed the Poké Gift.voidsaveAdditional(net.minecraft.nbt.CompoundTag compound) 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, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onChunkUnloaded, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapabilityMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity
deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onDataPacket, onLoad, requestModelDataUpdate, serializeNBT
-
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) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
load
public void load(net.minecraft.nbt.CompoundTag tagger) - Overrides:
loadin 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()- 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.
-