Class TradeMachineTileEntity

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.TradeMachineTileEntity
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 TradeMachineTileEntity extends net.minecraft.world.level.block.entity.BlockEntity
Used to trade Pokemon between players.
  • 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
    Modifier and Type
    Field
    Description
    net.minecraft.server.level.ServerPlayer
     
    net.minecraft.server.level.ServerPlayer
     
    int
     
    net.minecraft.nbt.CompoundTag
     
    net.minecraft.nbt.CompoundTag
     
    int
     
    int
     
    boolean
     
    boolean
     
     
     

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

    level, remove, worldPosition

    Fields inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    INFINITE_EXTENT_AABB
  • Constructor Summary

    Constructors
    Constructor
    Description
    TradeMachineTileEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
     
    TradeMachineTileEntity(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 Type
    Method
    Description
     
    net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket
     
    net.minecraft.nbt.CompoundTag
     
    void
    load(net.minecraft.nbt.CompoundTag compound)
     
    void
    onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt)
     
    boolean
    ready(net.minecraft.world.entity.player.Player player, boolean ready)
     
    void
    registerPlayer(net.minecraft.server.level.ServerPlayer player)
     
    void
    removePlayer(net.minecraft.world.entity.player.Player player)
     
    void
    saveAdditional(net.minecraft.nbt.CompoundTag compound)
     
    void
     
    void
    setColour(net.minecraft.world.item.DyeColor dyeColor)
     
    void
    setOwner(UUID owner)
     
    void
    setPos1(int pos)
    Sets the Pokemon in the left side of the trade machine.
    void
    setPos2(int pos)
    Sets the Pokemon in the right side of the trade machine.
    static void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TradeMachineTileEntity blockEntity)
     
    void
     

    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, triggerEvent

    Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider

    areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider

    getCapability, getCapability

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlockEntity

    deserializeNBT, getModelData, getRenderBoundingBox, handleUpdateTag, hasCustomOutlineRendering, onLoad, requestModelDataUpdate, serializeNBT
  • Field Details

    • playerCount

      public int playerCount
    • player1

      public net.minecraft.server.level.ServerPlayer player1
    • player2

      public net.minecraft.server.level.ServerPlayer player2
    • ready1

      public boolean ready1
    • ready2

      public boolean ready2
    • pos1

      public int pos1
    • pos2

      public int pos2
    • user1

      public String user1
    • user2

      public String user2
    • poke1

      public net.minecraft.nbt.CompoundTag poke1
    • poke2

      public net.minecraft.nbt.CompoundTag poke2
  • Constructor Details

    • TradeMachineTileEntity

      public TradeMachineTileEntity(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
    • TradeMachineTileEntity

      public TradeMachineTileEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockState)
  • Method Details

    • saveAdditional

      public void saveAdditional(net.minecraft.nbt.CompoundTag compound)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • load

      public void load(net.minecraft.nbt.CompoundTag compound)
      Overrides:
      load in class net.minecraft.world.level.block.entity.BlockEntity
    • setColour

      public void setColour(net.minecraft.world.item.DyeColor dyeColor)
    • getOwnerUUID

      public UUID getOwnerUUID()
    • setOwner

      public void setOwner(UUID owner)
    • getUpdateTag

      public net.minecraft.nbt.CompoundTag getUpdateTag()
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdatePacket

      public net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity
    • onDataPacket

      public void onDataPacket(net.minecraft.network.Connection net, net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket pkt)
    • registerPlayer

      public void registerPlayer(net.minecraft.server.level.ServerPlayer player)
    • ready

      public boolean ready(net.minecraft.world.entity.player.Player player, boolean ready)
    • setPos1

      public void setPos1(int pos)
      Sets the Pokemon in the left side of the trade machine.
      Parameters:
      pos - The party slot of the Pokemon to add.
    • setPos2

      public void setPos2(int pos)
      Sets the Pokemon in the right side of the trade machine.
      Parameters:
      pos - The party slot of the Pokemon to add.
    • removePlayer

      public void removePlayer(net.minecraft.world.entity.player.Player player)
    • trade

      public void trade()
    • sendChanges

      public void sendChanges()
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, TradeMachineTileEntity blockEntity)