Package com.pixelmonmod.tcg.tileentity
Class BattleRuleOwnedTileEntity
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
com.pixelmonmod.tcg.tileentity.OwnedTileEntity
com.pixelmonmod.tcg.tileentity.BattleRuleOwnedTileEntity
- All Implemented Interfaces:
net.neoforged.neoforge.attachment.IAttachmentHolder,net.neoforged.neoforge.common.extensions.IBlockEntityExtension
- Direct Known Subclasses:
BattleOwnedTileEntityController
-
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
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected Stringprotected Stringprotected booleanprotected intprotected StringThe commands stored in the battle block.protected Stringprotected intTime limit in secondsFields 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
ConstructorsConstructorDescriptionBattleRuleOwnedTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidendGame(PlayerServerState winner, PlayerServerState loser, boolean tiedGame) formatCommand(String command, String winnerName, String loserName) intintgetName()intnet.minecraft.server.MinecraftServerintbooleanprotected voidloadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) voidsaveAdditional(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider lookup) voidsetDeckSize(int deckSize) voidsetEloMinimum(int eloMinimum) voidsetEndingCommand(String endingCommand) voidsetEndingMessage(String endingMessage) voidsetPrizeCount(int prizeCount) voidsetShadowGame(boolean b) voidsetStartingCommand(String startingCommand) voidsetStartingMessage(String startingMessage) voidsetTimeLimit(int timeLimit) voidintMethods inherited from class com.pixelmonmod.tcg.tileentity.OwnedTileEntity
getOwnerId, getUpdatePacket, onDataPacket, setOwnerIdMethods 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, getUpdateTag, 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, onLoad, requestModelDataUpdate
-
Field Details
-
deckSize
protected int deckSize -
prizeCount
protected int prizeCount -
eloMinimum
protected int eloMinimum -
startingCommand
The commands stored in the battle block. -
endingCommand
-
startingMessage
-
endingMessage
-
timeLimit
protected int timeLimitTime limit in seconds -
isShadowGame
protected boolean isShadowGame
-
-
Constructor Details
-
BattleRuleOwnedTileEntity
public BattleRuleOwnedTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
loadAdditional
protected void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) - Overrides:
loadAdditionalin classOwnedTileEntity
-
saveAdditional
public void saveAdditional(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider lookup) - Overrides:
saveAdditionalin classOwnedTileEntity
-
trigger
-
formatCommand
-
getDeckSize
public int getDeckSize() -
setDeckSize
public void setDeckSize(int deckSize) -
getTimeLimit
public int getTimeLimit() -
getPrizeCount
public int getPrizeCount() -
setPrizeCount
public void setPrizeCount(int prizeCount) -
getEloMinimum
public int getEloMinimum() -
setEloMinimum
public void setEloMinimum(int eloMinimum) -
getStartingCommand
-
setStartingCommand
-
getEndingCommand
-
setEndingCommand
-
getStartingMessage
-
setStartingMessage
-
getEndingMessage
-
setEndingMessage
-
setTimeLimit
public void setTimeLimit(int timeLimit) -
getName
-
getServer
@Nullable public net.minecraft.server.MinecraftServer getServer() -
endGame
-
isShadowGame
public boolean isShadowGame() -
setShadowGame
public void setShadowGame(boolean b) -
toggleShadowGame
public void toggleShadowGame()
-