Class GameStageHandler

java.lang.Object
de.luckymcdev.foundryengine.common.game.stage.GameStageHandler

public class GameStageHandler extends Object
Handles the Attachment and All Game Stages for all Players.
  • Field Details

    • ATTACHMENT

      public final Supplier<net.neoforged.neoforge.attachment.AttachmentType<Set<String>>> ATTACHMENT
  • Constructor Details

    • GameStageHandler

      public GameStageHandler()
  • Method Details

    • register

      public void register(net.neoforged.bus.api.IEventBus modEventbus)
    • addStage

      public boolean addStage(net.minecraft.world.entity.player.Player player, String stage)
      Adds a stage to the player.
      Returns:
      true if the stage was added, false if they already had it.
    • removeStage

      public boolean removeStage(net.minecraft.world.entity.player.Player player, String stage)
      Removes a stage from the player.
      Returns:
      true if the stage was removed, false if they didn't have it.
    • clearStages

      public void clearStages(net.minecraft.world.entity.player.Player player)
      Clears all Stages from the Player
    • hasStage

      public boolean hasStage(net.minecraft.world.entity.player.Player player, String stage)
    • getStages

      public Set<String> getStages(net.minecraft.world.entity.player.Player player)
    • addStageIf

      public void addStageIf(StageAdditionCondition condition, String stage)
    • onPlayerTick

      public void onPlayerTick(net.neoforged.neoforge.event.tick.ServerTickEvent.Post event)
    • dimensions

      public DimensionStages dimensions()
    • item

      public ItemStages item()
    • loot

      @Experimental public LootStages loot()
    • mobs

      public MobStages mobs()
    • recipes

      @Experimental public RecipeStages recipes()