Th3Shadowbroker / OuroborosMines

A plugin for pre-designed mines.
https://www.spigotmc.org/resources/ouroboros-mines.72325/
MIT License
3 stars 0 forks source link

Adding support for ItemsAdder #68

Closed DisPie closed 2 years ago

DisPie commented 3 years ago

i would like to have the ability to add custom ores and custom drops using nbt tags. i am using itemsadder by lonedev and would like to be able to place in the blocks ive added into my server to mine in the mines warp. if thats possible that would be great.

Th3Shadowbroker commented 3 years ago

Hi @DisPie, sounds like a great idea! I'll have a look at its documentation to find the best way to support it. As this will require some major changes to the way Ouroboros recognizes mining blocks, I'll add this to the 2.0.0 milestone for the moment, eventually moving it to 2.1.0 depending on the complexity and time it take to implement.

Th3Shadowbroker commented 3 years ago

@DisPie Short status update: The preparations for 1.10.0 are nearly finished. Once everything's done, NBT-Support will be one of the next features. I hope to be able to start the development shortly 👍🏼

DisPie commented 3 years ago

cant wait. thats amazing <3

Th3Shadowbroker commented 3 years ago

@DisPie I'm currenctly implementing this feature, however ItemsAdder is a closed source project, so I can't find out anything about the way it saves the NBT data. Would you mind providing me with the data structure of one of these custom blocks? I could also implement direct support for ItemsAdder as an alternative, which I wouldn't be able to test locally, as I haven't purchased the plugin, which means there would be a lot of user testing involved.

Th3Shadowbroker commented 3 years ago

Good news! I had a conversation with LoneDev and I got a version of ItemsAdder I can use for testing 😃

Th3Shadowbroker commented 3 years ago

I'm currently trying to figure out some weird behaviour caused by custom blocks. Fsr. the drop group isn't working correctly, altough the block is detected, as being a custom block 🤔

Th3Shadowbroker commented 3 years ago

Hey @DisPie, I were able to implement experimental ItemsAdder support. However, this system still needs some improvements, but I got a test-build ready in case you already want to test it.

Note on the required configuration cahnges: At the moment, the material name is parsed and used as the primary key to identify and differenciate between materials. However, this doesn't work with custom blocks, as they're quite hacky. This is where properties come into play. Materials with properties will be passed to thirdparty plugins for validation. In case of ItemsAdder you have to add the ItemsAdder property (case sensitive) with the custom block's namespaced id in the format shown below. It's important, that the material name is unique within the config, so I recommend using a block you don't plan to use, as properties are checked before the material, but the material name still has to be valid atm.

stone:
    replacements:
    - cobblestone
    cooldown: 20
    properties:
        ItemsAdder: 'itemsadder:amethyst_block'
DisPie commented 3 years ago

dude thats amazing!! lovely. cant wait to see what amazing things you can bring with that

On Mon, 12 Apr 2021, 20:46 Jens Fischer, @.***> wrote:

I'm currently trying to figure out some weird behaviour caused by custom blocks. Fsr. the drop group isn't working correctly, altough