Class Horde
java.lang.Object
com.minecolonies.core.colony.events.raid.barbarianEvent.Horde
Class representing a horde of attackers (barbarians or egyptians).
-
Field Summary
FieldsModifier and TypeFieldDescriptionintThe total amount of raidersfinal intThe initial amount of raiders the horde hadintAmount of archer barbariansintAmount of boss barbariansintAmount of melee barbariansstatic final Stringstatic final Stringstatic final Stringstatic final StringNBT Tags -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the barbarian message idstatic HordeloadFromNbt(net.minecraft.nbt.CompoundTag compound) Create a new horde from the nbt compoundvoidwriteToNbt(net.minecraft.nbt.CompoundTag compound) Write the horde to the given nbt compound
-
Field Details
-
TAG_NUMBEROFRAIDERS
NBT Tags- See Also:
-
TAG_NUMBEROFARCHERS
- See Also:
-
TAG_NUMBEROFBOSSES
- See Also:
-
TAG_HORDEINITSIZE
- See Also:
-
numberOfRaiders
public int numberOfRaidersAmount of melee barbarians -
numberOfArchers
public int numberOfArchersAmount of archer barbarians -
numberOfBosses
public int numberOfBossesAmount of boss barbarians -
hordeSize
public int hordeSizeThe total amount of raiders -
initialSize
public final int initialSizeThe 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
Create a new horde from the nbt compound- Parameters:
compound- the compound to load it from.- Returns:
- the loaded horde.
-