Class AmazonRaidEvent
java.lang.Object
com.minecolonies.core.colony.events.raid.HordeRaidEvent
com.minecolonies.core.colony.events.raid.amazonevent.AmazonRaidEvent
- All Implemented Interfaces:
IColonyCampFireRaidEvent,IColonyEntitySpawnEvent,IColonyEvent,IColonyRaidEvent,IColonySpawnEvent,net.minecraftforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Amazon raid event for the colony, triggers a horde of amazons that spawn and attack the colony.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationThis raids event id, registry entries use res locations as ids.Fields inherited from class com.minecolonies.core.colony.events.raid.HordeRaidEvent
archers, boss, horde, MAX_RESPAWN_DEVIATION, MAX_SPAWN_DEVIATION, MIN_CENTER_DISTANCE, normal, raidBar, status -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.entity.EntityType<?>Get the archer raider type.net.minecraft.world.entity.EntityType<?>Get the boss raider type.protected net.minecraft.network.chat.MutableComponentGets the raids display namenet.minecraft.resources.ResourceLocationThe event type's idnet.minecraft.world.entity.EntityType<?>Get the normal raider type.static AmazonRaidEventloadFromNBT(IColony colony, net.minecraft.nbt.CompoundTag compound) Loads the event from the nbt compound.voidonEntityDeath(net.minecraft.world.entity.LivingEntity entity) Trigger on entity death.voidonUpdate()Onupdate function, called every 25s / 500 ticks.voidregisterEntity(net.minecraft.world.entity.Entity entity) Called to register an entity with this eventprotected voidUpdates the raid barMethods inherited from class com.minecolonies.core.colony.events.raid.HordeRaidEvent
addSpawner, deserializeNBT, getColony, getEntities, getID, getRandomCampfire, getSpawnPos, getStatus, getWayPoints, onFinish, onNightFall, onStart, sendHordeMessage, serializeNBT, setCampFireTime, setColony, setHorde, setSpawnPath, setSpawnPoint, setStatus, spawnHorde, unregisterEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.api.colony.colonyEvents.IColonyEvent
onTileEntityBreakMethods inherited from interface com.minecolonies.api.colony.colonyEvents.IColonyRaidEvent
isRaidActive
-
Field Details
-
AMAZON_RAID_EVENT_TYPE_ID
public static final net.minecraft.resources.ResourceLocation AMAZON_RAID_EVENT_TYPE_IDThis raids event id, registry entries use res locations as ids.
-
-
Constructor Details
-
AmazonRaidEvent
-
-
Method Details
-
getEventTypeID
public net.minecraft.resources.ResourceLocation getEventTypeID()Description copied from interface:IColonyEventThe event type's id- Returns:
- the event type id.
-
registerEntity
public void registerEntity(net.minecraft.world.entity.Entity entity) Description copied from interface:IColonyEntitySpawnEventCalled to register an entity with this event- Parameters:
entity- the entity to register.
-
updateRaidBar
protected void updateRaidBar()Description copied from class:HordeRaidEventUpdates the raid bar- Overrides:
updateRaidBarin classHordeRaidEvent
-
getDisplayName
protected net.minecraft.network.chat.MutableComponent getDisplayName()Description copied from class:HordeRaidEventGets the raids display name- Specified by:
getDisplayNamein classHordeRaidEvent- Returns:
-
onUpdate
public void onUpdate()Description copied from interface:IColonyEventOnupdate function, called every 25s / 500 ticks. Comes from colony then goes to the eventmanager and then to the event.- Specified by:
onUpdatein interfaceIColonyEvent- Overrides:
onUpdatein classHordeRaidEvent
-
onEntityDeath
public void onEntityDeath(net.minecraft.world.entity.LivingEntity entity) Description copied from interface:IColonyEntitySpawnEventTrigger on entity death.- Specified by:
onEntityDeathin interfaceIColonyEntitySpawnEvent- Overrides:
onEntityDeathin classHordeRaidEvent- Parameters:
entity- the killed entity.
-
loadFromNBT
Loads the event from the nbt compound.- Parameters:
colony- colony to load intocompound- NBTcompound with saved values- Returns:
- the raid event.
-
getNormalRaiderType
public net.minecraft.world.entity.EntityType<?> getNormalRaiderType()Description copied from interface:IColonyRaidEventGet the normal raider type.- Returns:
- the normal type.
-
getArcherRaiderType
public net.minecraft.world.entity.EntityType<?> getArcherRaiderType()Description copied from interface:IColonyRaidEventGet the archer raider type.- Returns:
- the archer type.
-
getBossRaiderType
public net.minecraft.world.entity.EntityType<?> getBossRaiderType()Description copied from interface:IColonyRaidEventGet the boss raider type.- Returns:
- the boss type.
-