💎 MightyLoot [v2.1][API 5] - TreasureHunt-like plugin

MightyLoot Release v1.2

Targets SpongeAPI v4.0.3

Changelog

  • Fixed chest not disappearing
  • Tried to fix problem of loots spawning away from where it was meant to
  • Changed loot spawn area system in config, introducing cylinder areas (see below)

:warning: Break in backward compatibility of config file. Here is an example

worlds {
    world {
        frequency=3600
        lootTypes {
            food=15
            goldish=25
            material=15
            mine=15
            mobs=15
            nether=15
        }
        maxX=5000
        maxY=50
        maxZ=5000
        minX=-5000
        minY=10
        minZ=-5000
    }
}

should be changed to

worlds {
    world {
        area {
            maxX=5000
            maxY=50
            maxZ=5000
            minX=-5000
            minY=10
            minZ=-5000
            type=rect
        }
        frequency=3600
        lootTypes {
            food=15
            goldish=25
            material=15
            mine=15
            mobs=15
            nether=15
        }
    }
}

or, with a cylinder area

worlds {
    world {
        area {
            centerX=0
            centerZ=0
            maxY=50
            minY=10
            radius=5000
            type=cyl
        }
        frequency=3600
        lootTypes {
            food=15
            goldish=25
            material=15
            mine=15
            mobs=15
            nether=15
        }
    }
}

I was waiting for this! Another request: can you add translation support? For example as is done in JobsLite, and other plugins?

I’ve guessed it would have to be done sooner or later. Now officially planned as of this issue.

MightyLoot Release v1.3

Targets SpongeAPI v4.2.0

Changelog

  • Added translation support, get translations here
  • Added english translation
  • Added french translation

With new translation support, some texts may be not where they were meant to be. Please report any text that looks like it was exchanged with another one.

I don’t think it works with mod items… When I changed default items to mod items it just gave me error about those modded items :c

What is the error ? Since chest inventory manipulation is still impossible using the API, my answer from that time is still valid.

Do the chests (or loots) have to be invisible. I just want chests to randomly spawn with predetermined items. I want players to collect these chests.

What do you mean by invisible ?

Nevermind, I read the plugin information wrong. But I do have another question. How can I make it so that the chest will spawn on ground level. (My players cant mine blocks)

Hmm for now, the spawning algorithm simply picks a random location in a defined area and check if it can spawn a chest there (and eventually continue the operation until the chest can finally spawn). If it can, it’ll try to put down the chest on the ground so there are no flying chests. The said area can be either a cuboid described by x, y et z min/max values, or a cylinder described by a center (x and z), radius and y min/max.

To quick fix your problem you could put minY and maxY values to 254. When chests will spawn, the location will be picked up in the air, and then put down to the ground. By doing so, the chests should only spawn on the ground (note that they can eventually spawn on top of roofs if there are houses in the spawn area).

Wont Work

Summary

[10:15:22] [Server thread/INFO] [com.arckenver.mightyloot]: After trying 200 times, we could not find any good spawn location for the loot

worlds {
New World {
    # represents the area where the loot can spawn
    # for 'type', accepted values are 'rect' and 'cyl'
    # if using 'rect', specify 'minX', 'maxX', 'minY', 'maxY', 'minZ', 'maxZ'
    # if using 'cyl', specify 'minY', 'maxY', 'centerX', 'centerZ', 'radius'
    area {
        maxX=100
        maxY=254
        maxZ=100
        minX=-100
        minY=254
        minZ=-100
        type=rect
    }
    frequency=3600
    lootTypes {
        food=15
        goldish=25
        material=15
        mine=15
        mobs=15
        nether=15
    }
}

}

Oh yeah try maybe 253 instead of 254.

Same Error, when using 253.

Then you’ll probably have to set the minY value to approximately where the ground is. It should work fine with that.

It will still spawn in the sky. Not on the ground level.

I do not know if this is possible, but you should add a feature to this mod which is a config option, such as AlwaysOnGround, and then make it so that it will place the chest on any block that does noes not have air below it.

Yeah ! That would be better. I thought it would work so there must be some more work to do on the spawning process. I’ll work on that as soon as possible :slight_smile:

You Plan to work on this?

Yes, I thought about having a list of mobs that spawns on top of the loot. I’m opening an issue here so you can now when it’s implemented.

Also, I add another issue for the AlwaysOnGround thing we discussed with @CodingLegend.

Don’t hesitate to open issue on github for features/bugs if you are sure the feature is worth implementing/bug comes from MightyLoot. That helps me keep a sort of roadmap.

5.0.0??? <3 :smiley: