Magic

Magic

190k Downloads

Enabling of the block populator?

mr3n opened this issue · 13 comments

commented

I installed both Magic and the MagicWorlds plugins, but wands aren't appearing in the naturally spawned chests anywhere. I usually just find iron ingots/diamonds/etc. but not wands, or anything of the sort. Is it in the config, or am I missing something?

commented

Thanks! One more question, though: How do I make it so that other magic items show up in chests, not just SP?

commented

The configs are pretty straightforward, just take a look:

https://github.com/elBukkit/MagicWorlds/blob/master/src/main/resources/examples/mixins/chest_populators.yml

          base_probability:
            0: 100
            1: 80
          item_probability:
            sp|100: 1
            sp|80: 2
            sp|70: 3
            sp|60: 4
            sp|50: 5

base probability is the chance of adding items to chests, in this case there is an 80% chance that something will be added. You can add chances for multiple items to get added if you want.

item probability is the chance of specific items being added. So 80 SP is twice as likely to appear as 100 SP, and so on. High numbers mean a higher chance.

commented

In the console it says that MagicWorlds "added items to chest:" and then the item name and the coordinates of the chest, but when I open the chests at the mentioned coordinates the items specified by the console don't show up.

commented

Hm, well that sounds suspicious. I'll double-check it for myself when I get a chance.

commented

After a good bit of testing I think this is due to a Spigot bug or change. I've opened a PR that has a fix, hopefully I will hear back and they'll either accept the fix or let me know what I need to change to make my populator work again.

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/427/overview

My code is working as near as I can tell, but changes I make to chest inventories are getting lost.

commented

The same console messages are being generated, but the items still don't seem to be there:
[21:44:29 INFO]: [MagicWorlds] Added items to chest: *cloak|1 at world,135.0,31.0,-212.0

However, I sometimes find the purplish black block in chests, and I don't know why that is, either.
Found one teleporting to the cords specified here:
[21:44:29 INFO]: [MagicWorlds] Added items to chest: fireball|1 at world,-160.0,36.0,-213.0

commented

Get rid of the |1’s those were just for SP items to set SP amount.

If you see a * on the item names in the log message that means it couldn’t create that item, normally because of an unknown item name.

commented

Are the item names that are supposed to be used identical to the names that you use for /mgive?

commented

Yes

commented

As it turns out there was a breaking API change, I've modified MagicWorlds accordingly and it seems to work now. Please grab the latest build here, it should be fixed:

http://jenkins.elmakers.com/job/MagicWorlds/263/com.elmakers.mine.bukkit.plugins$MagicWorlds/

commented

Can I have some clarification as to what the 'chunk_generate' at the top of the file means? It seems pretty self-explanatory, I know, but I just want to make sure

commented

It means "this is stuff the plugin should do on chunk generation"

as opposed to entity spawn, the only other event this plugin responds to.