generated from GenerationsMod/GenerationsModuleTemplateOld
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Forge can now generate structures in villages
- Loading branch information
Showing
5 changed files
with
57 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
common/src/main/resources/generations_structures.accesswidener
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
accessWidener v2 named | ||
accessWidener v2 named | ||
|
||
accessible field net/minecraft/data/worldgen/ProcessorLists EMPTY Lnet/minecraft/resources/ResourceKey; | ||
accessible field net/minecraft/data/worldgen/ProcessorLists EMPTY Lnet/minecraft/resources/ResourceKey; | ||
accessible field net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool templates Lit/unimi/dsi/fastutil/objects/ObjectArrayList; | ||
mutable field net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool rawTemplates Ljava/util/List; | ||
accessible field net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool rawTemplates Ljava/util/List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rations/gg/generations/structures/generationsstructures/forge/events/LifeCycleEvents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package generations.gg.generations.structures.generationsstructures.forge.events; | ||
|
||
import generations.gg.generations.structures.generationsstructures.GenerationsStructures; | ||
import generations.gg.generations.structures.generationsstructures.village.PlaceInVillage; | ||
import net.minecraftforge.event.server.ServerAboutToStartEvent; | ||
import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
|
||
@Mod.EventBusSubscriber(modid = GenerationsStructures.MOD_ID) | ||
public class LifeCycleEvents { | ||
/** | ||
* Adds all custom structures to villages. | ||
*/ | ||
@SubscribeEvent | ||
public static void aboutToStartEvent(final ServerAboutToStartEvent event) { | ||
PlaceInVillage.addStructuresToVillages(event.getServer()); | ||
} | ||
} |