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

public class BattleRuleOwnedTileEntity extends OwnedTileEntity
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected int
     
    protected String
     
    protected String
     
    protected boolean
     
    protected int
     
    protected String
    The commands stored in the battle block.
    protected String
     
    protected int
    Time limit in seconds

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    BattleRuleOwnedTileEntity(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 Type
    Method
    Description
    void
    endGame(PlayerServerState winner, PlayerServerState loser, boolean tiedGame)
     
    formatCommand(String command, String winnerName, String loserName)
     
    int
     
    int
     
     
     
     
    int
     
    net.minecraft.server.MinecraftServer
     
     
     
    int
     
    boolean
     
    protected void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries)
     
    void
    saveAdditional(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider lookup)
     
    void
    setDeckSize(int deckSize)
     
    void
    setEloMinimum(int eloMinimum)
     
    void
    setEndingCommand(String endingCommand)
     
    void
    setEndingMessage(String endingMessage)
     
    void
    setPrizeCount(int prizeCount)
     
    void
    setShadowGame(boolean b)
     
    void
    setStartingCommand(String startingCommand)
     
    void
    setStartingMessage(String startingMessage)
     
    void
    setTimeLimit(int timeLimit)
     
    void
     
    int
    trigger(net.minecraft.world.level.Level level, String command, String winnerName, String loserName)
     

    Methods inherited from class com.pixelmonmod.tcg.tileentity.OwnedTileEntity

    getOwnerId, getUpdatePacket, onDataPacket, setOwnerId

    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, getUpdateTag, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, hasData, removeData, setData

    Methods 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

      protected String startingCommand
      The commands stored in the battle block.
    • endingCommand

      protected String endingCommand
    • startingMessage

      protected String startingMessage
    • endingMessage

      protected String endingMessage
    • timeLimit

      protected int timeLimit
      Time 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:
      loadAdditional in class OwnedTileEntity
    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag nbt, net.minecraft.core.HolderLookup.Provider lookup)
      Overrides:
      saveAdditional in class OwnedTileEntity
    • trigger

      public int trigger(net.minecraft.world.level.Level level, String command, String winnerName, String loserName)
    • formatCommand

      public String formatCommand(String command, String winnerName, String loserName)
    • 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

      public String getStartingCommand()
    • setStartingCommand

      public void setStartingCommand(String startingCommand)
    • getEndingCommand

      public String getEndingCommand()
    • setEndingCommand

      public void setEndingCommand(String endingCommand)
    • getStartingMessage

      public String getStartingMessage()
    • setStartingMessage

      public void setStartingMessage(String startingMessage)
    • getEndingMessage

      public String getEndingMessage()
    • setEndingMessage

      public void setEndingMessage(String endingMessage)
    • setTimeLimit

      public void setTimeLimit(int timeLimit)
    • getName

      public String getName()
    • getServer

      @Nullable public net.minecraft.server.MinecraftServer getServer()
    • endGame

      public void endGame(PlayerServerState winner, PlayerServerState loser, boolean tiedGame)
    • isShadowGame

      public boolean isShadowGame()
    • setShadowGame

      public void setShadowGame(boolean b)
    • toggleShadowGame

      public void toggleShadowGame()