Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by GenreShinobi

  • 3 weeks later...
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?

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.

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.

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.

  • Author

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.

  • Author

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.