Class SinglePlayerTeam

All Implemented Interfaces:
ITeam<SinglePlayerTeam>, net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>

public class SinglePlayerTeam extends AbstractTeam<SinglePlayerTeam> implements net.minecraftforge.common.capabilities.ICapabilityProvider, net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
  • Field Details

    • CAPABILITY

      public static final net.minecraftforge.common.capabilities.Capability<SinglePlayerTeam> CAPABILITY
    • player

      public final net.minecraft.world.entity.player.Player player
  • Constructor Details

    • SinglePlayerTeam

      public SinglePlayerTeam(net.minecraft.world.entity.player.Player player)
  • Method Details

    • getType

      public ITeam.ITeamType<SinglePlayerTeam> getType()
      Specified by:
      getType in interface ITeam<SinglePlayerTeam>
    • isMember

      public boolean isMember(net.minecraft.world.entity.player.Player player)
      Specified by:
      isMember in interface ITeam<SinglePlayerTeam>
    • streamMemberUsernames

      public Stream<String> streamMemberUsernames(net.minecraft.world.level.Level level)
      Specified by:
      streamMemberUsernames in interface ITeam<SinglePlayerTeam>
    • isAdmin

      public boolean isAdmin(net.minecraft.world.entity.player.Player player)
      Description copied from interface: ITeam
      If called, it is assumed that ITeam.isMember(Player) has already passed.
      Specified by:
      isAdmin in interface ITeam<SinglePlayerTeam>
      Returns:
      Whether this Player can manage this Team
    • getName

      public net.minecraft.network.chat.Component getName(net.minecraft.world.level.Level level)
      Specified by:
      getName in interface ITeam<SinglePlayerTeam>
    • setChanged

      public void setChanged(net.minecraft.world.level.Level level, ITeamDataType<?> dataType)
      Specified by:
      setChanged in interface ITeam<SinglePlayerTeam>
    • renderIcon

      public void renderIcon(net.minecraft.client.gui.GuiGraphics graphics)
      Description copied from interface: ITeam
      Render an icon for this ITeam. The icon should occupy (0, 0) -> (16, 16) of the given PoseStack.
      Specified by:
      renderIcon in interface ITeam<SinglePlayerTeam>
    • getRenderedMemberList

      public net.minecraft.network.chat.Component getRenderedMemberList(int maxTextWidth)
      Specified by:
      getRenderedMemberList in interface ITeam<SinglePlayerTeam>
    • getCapability

      @NotNull public <T> @NotNull net.minecraftforge.common.util.LazyOptional<T> getCapability(@NotNull @NotNull net.minecraftforge.common.capabilities.Capability<T> cap, @Nullable @Nullable net.minecraft.core.Direction side)
      Specified by:
      getCapability in interface net.minecraftforge.common.capabilities.ICapabilityProvider
    • serializeNBT

      public net.minecraft.nbt.CompoundTag serializeNBT()
      Specified by:
      serializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
    • deserializeNBT

      public void deserializeNBT(net.minecraft.nbt.CompoundTag nbt)
      Specified by:
      deserializeNBT in interface net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>