java.lang.Object
com.minecolonies.core.colony.events.raid.barbarianEvent.Horde

public class Horde extends Object
Class representing a horde of attackers (barbarians or egyptians).
  • Field Details

    • TAG_NUMBEROFRAIDERS

      public static final String TAG_NUMBEROFRAIDERS
      NBT Tags
      See Also:
    • TAG_NUMBEROFARCHERS

      public static final String TAG_NUMBEROFARCHERS
      See Also:
    • TAG_NUMBEROFBOSSES

      public static final String TAG_NUMBEROFBOSSES
      See Also:
    • TAG_HORDEINITSIZE

      public static final String TAG_HORDEINITSIZE
      See Also:
    • numberOfRaiders

      public int numberOfRaiders
      Amount of melee barbarians
    • numberOfArchers

      public int numberOfArchers
      Amount of archer barbarians
    • numberOfBosses

      public int numberOfBosses
      Amount of boss barbarians
    • hordeSize

      public int hordeSize
      The total amount of raiders
    • initialSize

      public final int initialSize
      The initial amount of raiders the horde had
  • Constructor Details

    • Horde

      public Horde(int hordeSize)
      Create a new horde.
      Parameters:
      hordeSize - total amount of raiders.
  • Method Details

    • getMessageID

      public int getMessageID()
      Gets the barbarian message id
      Returns:
      the id of the message.
    • writeToNbt

      public void writeToNbt(net.minecraft.nbt.CompoundTag compound)
      Write the horde to the given nbt compound
      Parameters:
      compound - the compound to write it to.
    • loadFromNbt

      public static Horde loadFromNbt(net.minecraft.nbt.CompoundTag compound)
      Create a new horde from the nbt compound
      Parameters:
      compound - the compound to load it from.
      Returns:
      the loaded horde.