Search in sources :

Example 6 with ColonyEventDescriptionTypeRegistryEntry

use of com.minecolonies.api.colony.colonyEvents.registry.ColonyEventDescriptionTypeRegistryEntry in project minecolonies by Minecolonies.

the class ModColonyEventDescriptionTypeInitializer method init.

public static void init(final RegistryEvent.Register<ColonyEventDescriptionTypeRegistryEntry> event) {
    final IForgeRegistry<ColonyEventDescriptionTypeRegistryEntry> reg = event.getRegistry();
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(CitizenBornEvent::loadFromNBT, CitizenBornEvent::loadFromPacketBuffer, CitizenBornEvent.CITIZEN_BORN_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(CitizenSpawnedEvent::loadFromNBT, CitizenSpawnedEvent::loadFromPacketBuffer, CitizenSpawnedEvent.CITIZEN_SPAWNED_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(VisitorSpawnedEvent::loadFromNBT, VisitorSpawnedEvent::loadFromPacketBuffer, VisitorSpawnedEvent.VISITOR_SPAWNED_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(CitizenDiedEvent::loadFromNBT, CitizenDiedEvent::loadFromPacketBuffer, CitizenDiedEvent.CITIZEN_DIED_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(CitizenGrownUpEvent::loadFromNBT, CitizenGrownUpEvent::loadFromPacketBuffer, CitizenGrownUpEvent.CITIZEN_GROWN_UP_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(BuildingBuiltEvent::loadFromNBT, BuildingBuiltEvent::loadFromPacketBuffer, BuildingBuiltEvent.BUILDING_BUILT_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(BuildingUpgradedEvent::loadFromNBT, BuildingUpgradedEvent::loadFromPacketBuffer, BuildingUpgradedEvent.BUILDING_UPGRADED_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(BuildingRepairedEvent::loadFromNBT, BuildingRepairedEvent::loadFromPacketBuffer, BuildingRepairedEvent.BUILDING_REPAIRED_EVENT_ID));
    reg.register(new ColonyEventDescriptionTypeRegistryEntry(BuildingDeconstructedEvent::loadFromNBT, BuildingDeconstructedEvent::loadFromPacketBuffer, BuildingDeconstructedEvent.BUILDING_DECONSTRUCTED_EVENT_ID));
}
Also used : ColonyEventDescriptionTypeRegistryEntry(com.minecolonies.api.colony.colonyEvents.registry.ColonyEventDescriptionTypeRegistryEntry)

Aggregations

ColonyEventDescriptionTypeRegistryEntry (com.minecolonies.api.colony.colonyEvents.registry.ColonyEventDescriptionTypeRegistryEntry)6 ResourceLocation (net.minecraft.util.ResourceLocation)4 BuildingEntry (com.minecolonies.api.colony.buildings.registry.BuildingEntry)2 IColonyEventDescription (com.minecolonies.api.colony.colonyEvents.descriptions.IColonyEventDescription)2 ColonyEventTypeRegistryEntry (com.minecolonies.api.colony.colonyEvents.registry.ColonyEventTypeRegistryEntry)2 GuardType (com.minecolonies.api.colony.guardtype.GuardType)2 InteractionResponseHandlerEntry (com.minecolonies.api.colony.interactionhandling.registry.InteractionResponseHandlerEntry)2 JobEntry (com.minecolonies.api.colony.jobs.registry.JobEntry)2 RecipeTypeEntry (com.minecolonies.api.crafting.registry.RecipeTypeEntry)2 ResearchEffectEntry (com.minecolonies.api.research.effects.registry.ResearchEffectEntry)2 ResearchRequirementEntry (com.minecolonies.api.research.registry.ResearchRequirementEntry)2 CompoundNBT (net.minecraft.nbt.CompoundNBT)2 INBT (net.minecraft.nbt.INBT)2 ListNBT (net.minecraft.nbt.ListNBT)2 RegistryBuilder (net.minecraftforge.registries.RegistryBuilder)2 CraftingType (com.minecolonies.api.crafting.registry.CraftingType)1