Class NorsemenShipRaidEvent
java.lang.Object
com.minecolonies.core.colony.events.raid.AbstractShipRaidEvent
com.minecolonies.core.colony.events.raid.norsemenevent.NorsemenShipRaidEvent
- All Implemented Interfaces:
IColonyEntitySpawnEvent,IColonyEvent,IColonyRaidEvent,IColonySpawnEvent,IColonyStructureSpawnEvent,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
The Norsemen raid event, spawns a ship with Norsemen spawners onboard.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationThis raids event id, registry entries use res locations as ids.static final StringShip descriptionFields inherited from class com.minecolonies.core.colony.events.raid.AbstractShipRaidEvent
colony, maxRaiderCount, raidBar, raiders, shipRotationMirror, shipSize, spawnerThresholdKillTracker, spawnPathResult, spawnPoint, status, TAG_DAYS_LEFT, TAG_MAX_RAIDER_COUNT, TAG_POS, TAG_RAIDER_THRESHOLD_TRACKER, TAG_SHIP_ROTMIR, TAG_SHIPSIZE, TAG_SPAWNER_COUNT, TAG_SPAWNERS, WAYPOINT_SPACING, wayPoints -
Constructor Summary
ConstructorsConstructorDescriptionNorsemenShipRaidEvent(@NotNull IColony colony) Create a new Norsemen raid event. -
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.Get the ship description for the schematicstatic IColonyEventloadFromNBT(@NotNull IColony colony, @NotNull net.minecraft.nbt.CompoundTag compound, net.minecraft.core.HolderLookup.Provider provider) Loads the raid event from the given nbt.protected voidUpdates the raid barMethods inherited from class com.minecolonies.core.colony.events.raid.AbstractShipRaidEvent
addSpawner, deserializeNBT, getEntities, getID, getSchematicSpawns, getSpawnPos, getStatus, getWayPoints, isRaidActive, isUnderWater, onEntityDeath, onFinish, onNightFall, onStart, onTileEntityBreak, onUpdate, registerEntity, serializeNBT, setColony, setMaxRaiderCount, setShipRotation, setShipSize, setSpawnPath, setSpawnPoint, setStatus, unregisterEntity
-
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. -
SHIP_NAME
Ship description- See Also:
-
-
Constructor Details
-
NorsemenShipRaidEvent
Create a new Norsemen raid event.- Parameters:
colony- the colony.
-
-
Method Details
-
getShipDesc
Description copied from interface:IColonyStructureSpawnEventGet the ship description for the schematic -
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:AbstractShipRaidEventUpdates the raid bar- Overrides:
updateRaidBarin classAbstractShipRaidEvent
-
loadFromNBT
public static IColonyEvent loadFromNBT(@NotNull @NotNull IColony colony, @NotNull @NotNull net.minecraft.nbt.CompoundTag compound, @NotNull net.minecraft.core.HolderLookup.Provider provider) Loads the raid event from the given nbt.- Parameters:
colony- the events colonycompound- the NBT compound- Returns:
- the colony to load.
-
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:AbstractShipRaidEventGets the raids display name- Specified by:
getDisplayNamein classAbstractShipRaidEvent- Returns:
-