Class NorsemenRaidEvent
java.lang.Object
com.minecolonies.core.colony.events.raid.HordeRaidEvent
com.minecolonies.core.colony.events.raid.norsemenevent.NorsemenRaidEvent
- All Implemented Interfaces:
IColonyCampFireRaidEvent,IColonyEntitySpawnEvent,IColonyEvent,IColonyRaidEvent,IColonySpawnEvent,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
Norsemen raid event for the colony, triggers a horde of vikings which 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 NorsemenRaidEventloadFromNBT(IColony colony, net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider) Loads the event from the nbt compound.voidonEntityDeath(net.minecraft.world.entity.LivingEntity entity) Trigger on entity death.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, onUpdate, 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
-
NORSEMEN_RAID_EVENT_TYPE_ID
public static final net.minecraft.resources.ResourceLocation NORSEMEN_RAID_EVENT_TYPE_IDThis raids event id, registry entries use res locations as ids.
-
-
Constructor Details
-
NorsemenRaidEvent
-
-
Method Details
-
getEventTypeID
public net.minecraft.resources.ResourceLocation getEventTypeID()Description copied from interface:IColonyEventThe event type's id- Returns:
- the event type id.
-
updateRaidBar
protected void updateRaidBar()Description copied from class:HordeRaidEventUpdates the raid bar- Overrides:
updateRaidBarin classHordeRaidEvent
-
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.
-
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
public static NorsemenRaidEvent loadFromNBT(IColony colony, net.minecraft.nbt.CompoundTag compound, @NotNull net.minecraft.core.HolderLookup.Provider provider) 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.
-
getDisplayName
protected net.minecraft.network.chat.MutableComponent getDisplayName()Description copied from class:HordeRaidEventGets the raids display name- Specified by:
getDisplayNamein classHordeRaidEvent- Returns:
-