GenreShinobi Posted September 22, 2019 Posted September 22, 2019 (edited) I'd like to spawn an entity in a village, but I'm not sure how. I'm able to spawn the entity in biomes, but making it specific to villages is proving much harder. Any advice? My current general biome spawning: public static void setupEntitySpawning() { EntityClassification kitsuneClassification = EntityClassification.MISC; for(BiomeManager.BiomeType btype : BiomeManager.BiomeType.values()) { for (BiomeManager.BiomeEntry biomeEntry : BiomeManager.getBiomes(btype)) { biomeEntry.biome.getSpawns(kitsuneClassification).add(new Biome.SpawnListEntry(ModEntity.KITSUNE, 10, 1,1)); } } } pre widget Edited September 23, 2019 by GenreShinobi Quote
GenreShinobi Posted October 9, 2019 Author Posted October 9, 2019 Bump, anyone have an idea on how to get them to spawn in villages? Quote
Animefan8888 Posted October 9, 2019 Posted October 9, 2019 13 minutes ago, GenreShinobi said: Bump, anyone have an idea on how to get them to spawn in villages? Are we talking a limited number of times. Like on generation? OR are we talking continuous spawns, but only ever in a village? Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
GenreShinobi Posted October 9, 2019 Author Posted October 9, 2019 A limited number of times on generation. Quote
Animefan8888 Posted October 9, 2019 Posted October 9, 2019 1 minute ago, GenreShinobi said: A limited number of times on generation. From a brief look it seems that it might be possible with reflection. I'll point you in the appropriate direction. Each Biome a village spawns in has it's own area. For the Plains biome it's PlainsVillagePools In there is a static {} and an init, but init does nothing except make sure the static{} gets called.I've notified that all the parts including the part where entities spawning in structures is handled by the JigsawManager REGISTRY. It loads up nbt files from the data directory, use an NBT explorer to figure out the structure so you can create one for your Entity and then you'll have to somehow put it in the JigsawManager's registry entry. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
GenreShinobi Posted October 9, 2019 Author Posted October 9, 2019 I appreciate the help! I think I'm pointed in the right direction. Its not quite working, but I think I'm closer. Closer than I was anyway! Lol I'll post once ive figured it out. Quote
GenreShinobi Posted October 14, 2019 Author Posted October 14, 2019 Unfortunately it doesn't seem like I'm figuring this out >,< Currently I have a class called EntitySpawning public class EntitySpawning { public static void init() { } static { JigsawManager.REGISTRY.register(new JigsawPattern(new ResourceLocation("minecraft", "village/common/kitsune_entity"), new ResourceLocation("empty"), ImmutableList.of(new Pair<>(new SingleJigsawPiece("village/common/kitsune_entity"), 1)), JigsawPattern.PlacementBehaviour.RIGID)); } } And during setup I have this: // Setup private void setup(final FMLCommonSetupEvent event) { // Ore Generation OreGeneration.setupOreGeneration(); // Entity Spawning EntitySpawning.init(); // Initializations proxy.init(); } I have an nbt in data > minecraft > structures > village > common > kitsune_entity.nbt kitsune_entity.nbt Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.