Class NoTeam

java.lang.Object
com.petrolpark.core.team.NoTeam
All Implemented Interfaces:
ITeam, ITeam.Provider, net.minecraft.core.component.DataComponentHolder, net.neoforged.neoforge.common.extensions.IDataComponentHolderExtension, net.neoforged.neoforge.common.MutableDataComponentHolder

public final class NoTeam extends Object implements ITeam, ITeam.Provider
  • Field Details

    • INSTANCE

      public static final NoTeam INSTANCE
  • Constructor Details

    • NoTeam

      public NoTeam()
  • Method Details

    • getProvider

      public ITeam.Provider getProvider()
      Specified by:
      getProvider in interface ITeam
    • getProviderType

      public ITeam.ProviderType getProviderType()
      Specified by:
      getProviderType in interface ITeam.Provider
    • provideTeam

      public ITeam provideTeam(net.minecraft.world.level.Level level)
      Specified by:
      provideTeam in interface ITeam.Provider
    • isNone

      public boolean isNone()
      Specified by:
      isNone in interface ITeam
    • isMember

      public boolean isMember(net.minecraft.world.entity.player.Player player)
      Specified by:
      isMember in interface ITeam
    • memberCount

      public int memberCount()
      Specified by:
      memberCount in interface ITeam
    • streamMemberUsernames

      public Stream<String> streamMemberUsernames()
      Specified by:
      streamMemberUsernames in interface ITeam
    • streamMembers

      public Stream<net.minecraft.world.entity.player.Player> streamMembers()
      Description copied from interface: ITeam
      Use ITeam.streamMemberUsernames() unless having the Player itself is vital.
      Specified by:
      streamMembers in interface ITeam
      Returns:
      Stream of Players in this Team.
    • 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
      Parameters:
      player -
      Returns:
      Whether this Player can manage this Team
    • getName

      public net.minecraft.network.chat.Component getName()
      Specified by:
      getName in interface ITeam
    • 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
      Parameters:
      graphics -
    • getRenderedMemberList

      public net.minecraft.network.chat.Component getRenderedMemberList(int maxTextWidth)
      Specified by:
      getRenderedMemberList in interface ITeam
    • set

      @Nullable public <T> T set(@Nonnull net.minecraft.core.component.DataComponentType<? super T> componentType, @Nonnull T value)
      Specified by:
      set in interface net.neoforged.neoforge.common.MutableDataComponentHolder
    • remove

      @Nullable public <T> T remove(@Nonnull net.minecraft.core.component.DataComponentType<? extends T> componentType)
      Specified by:
      remove in interface net.neoforged.neoforge.common.MutableDataComponentHolder
    • applyComponents

      public void applyComponents(@Nonnull net.minecraft.core.component.DataComponentPatch patch)
      Specified by:
      applyComponents in interface net.neoforged.neoforge.common.MutableDataComponentHolder
    • applyComponents

      public void applyComponents(@Nonnull net.minecraft.core.component.DataComponentMap components)
      Specified by:
      applyComponents in interface net.neoforged.neoforge.common.MutableDataComponentHolder
    • getComponents

      public net.minecraft.core.component.DataComponentMap getComponents()
      Specified by:
      getComponents in interface net.minecraft.core.component.DataComponentHolder