Class PirateGroundRaidEvent
java.lang.Object
com.minecolonies.core.colony.events.raid.HordeRaidEvent
com.minecolonies.core.colony.events.raid.pirateEvent.PirateGroundRaidEvent
- All Implemented Interfaces:
IColonyCampFireRaidEvent,IColonyEntitySpawnEvent,IColonyEvent,IColonyRaidEvent,IColonySpawnEvent,net.neoforged.neoforge.common.util.INBTSerializable<net.minecraft.nbt.CompoundTag>
The Pirate raid event, spawns the worst pirates you've ever heard of.
-
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 PirateGroundRaidEventloadFromNBT(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.voidonStart()Actions which are done on the start of the event.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, 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
-
PIRATE_GROUND_RAID_EVENT_TYPE_ID
public static final net.minecraft.resources.ResourceLocation PIRATE_GROUND_RAID_EVENT_TYPE_IDThis raids event id, registry entries use res locations as ids.
-
-
Constructor Details
-
PirateGroundRaidEvent
-
-
Method Details
-
getEventTypeID
public net.minecraft.resources.ResourceLocation getEventTypeID()Description copied from interface:IColonyEventThe event type's id- Returns:
- the event type id.
-
onStart
public void onStart()Description copied from interface:IColonyEventActions which are done on the start of the event.- Specified by:
onStartin interfaceIColonyEvent- Overrides:
onStartin classHordeRaidEvent
-
updateRaidBar
protected void updateRaidBar()Description copied from class:HordeRaidEventUpdates the raid bar- Overrides:
updateRaidBarin classHordeRaidEvent
-
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
-
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 PirateGroundRaidEvent 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:
-