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 had this working in 1.7.2, but can't figure out what is going on in 1.8. 

 

For a custom dimension, I'm only allowing some custom creepers to spawn in it.  Rather than generate the list in biomes since i'm using the default biomes, I just did it in the custom chunkprovider.

 

I tested it and it is getting called and returning the list.  However, nothing ever spawns.  The world is set to eternal night and I've confirmed the light level is always nighttime to make sure something wierd isn't going on there.  The entities spawn just fine in other worlds so they are functional.

 

Here is the call

 

 

@Override
    public List func_177458_a(EnumCreatureType creatureType, BlockPos pos) {


        if (creatureType.equals(EnumCreatureType.MONSTER)) {
        	//System.out.println("  - creatureType : " + creatureType);
        	//System.out.println("  - monster");
        	
            List spawnableMonsterList = new ArrayList();
            
            // odds min max
            int multiplyer = 10;  // 6 worked as good balance, but wanted more
            
            // Generate the spawnlist
            //spawnableMonsterList.add(new SpawnListEntry(EntityCreeper.class, 25, 1, 5));
            spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(Creeper_Charged.class, 25, 4 * multiplyer, 8 * multiplyer));
            spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(Creeper_Red.class, 25, 10 * multiplyer, 12 * multiplyer));
            spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(Creeper_Breeder.class, 5, 1 * multiplyer, 4 * multiplyer));
            spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(Creeper_Blue.class, 5, 1 * multiplyer, 4 * multiplyer));
            spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(Creeper_Fire.class, 5, 1 * multiplyer, 4 * multiplyer));
            spawnableMonsterList.add(new BiomeGenBase.SpawnListEntry(MyEntityHumanoid.class, 5, 1 * multiplyer, 4 * multiplyer));
            
            // Return the result
            return spawnableMonsterList;
            
        } else {
        	
            return null;
            
        }

    }


 

 

Long time Bukkit & Forge Programmer

Happy to try and help

  • Author

Ok, just did that.

 

Struggling with what is failing thought.

 

It derails here.

    public boolean func_175732_a(EnumCreatureType p_175732_1_, BiomeGenBase.SpawnListEntry p_175732_2_, BlockPos p_175732_3_)
    {
        List list = this.getChunkProvider().func_177458_a(p_175732_1_, p_175732_3_);
        return list != null && !list.isEmpty() ? list.contains(p_175732_2_) : false;
    }

 

One iteration:

-List contains all my entities as it should.  Expanded it in Watch to verify that it has Creeper Red and it does.

-p_175732_2_ is Creeper red

- the function 'list.contains(p_175732_2_)' is returning false though.

 

Grabbed the valves from below the variables when hovering over them.  first is list, 2nd is p_175732_2_

[Creeper_Charged*(40-80):25, Creeper_Red*(100-120):25, Creeper_Breeder*(10-40):5, Creeper_Blue*(10-40):5, Creeper_Fire*(10-40):5, MyEntityHumanoid*(10-40):5]

Creeper_Red*(100-120):25

 

 

I don't see why its false.  Its probably obvious and I'm just missing it.  Hope you see something.

Long time Bukkit & Forge Programmer

Happy to try and help

  • Author

Slaps hand to forehead.

 

 

Thanks.  I'll change it.

Long time Bukkit & Forge Programmer

Happy to try and help

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.