BentoBox icon indicating copy to clipboard operation
BentoBox copied to clipboard

ItemsAdder support (for Blueprints)

Open konfix opened this issue 1 year ago • 13 comments

Is your feature request related to a problem?

Hello, it would be awesome if BentoBox could support ItemsAdder custom blocks in blueprints.

This would allow users to create a blueprint that will also save all custom blocks and then load them while pasting. ItemsAdder has a documented API, and it looks like it wouldn't be too hard to implement to BentoBox's blueprints code.

From what I've been able to see, there is already a method of removing custom blocks from the island, so the only thing thing that needs to be done is actually saving the blocks and pasting them.

(I think custom blocks would be enough, there are also entities/liquids but I doubt anyone would need/want this on their islands)

The option should be toggleable somewhere in the config to prevent unnecessary performance loss, or added as a flag when saving blueprints (just like ignore air and water currently is)

It would be a very nice addition and surely that would help server owners to get more creative when creating islands :)

Example on how custom blocks can be implemented using the API: IA-Edit - integrates IA custom blocks into FAWE (I know it's not related to blueprints but it could be useful)

Describe the solution you'd like.

/

Describe alternatives you've considered.

/

Agreements

  • [x] I have searched for and ensured there isn't already an open issue regarding this.
  • [x] I have ensured the feature I'm requesting isn't already in the latest supported BentoBox build or Addons.

Other

No response

konfix avatar Jan 22 '25 01:01 konfix

Hey, sorry, are there any news about this?

konfix avatar Feb 16 '25 20:02 konfix

Not yet. I've been working on some other things. It's in the queue though.

tastybento avatar Feb 16 '25 21:02 tastybento

Ah, I see it's a paid plugin. I'd appreciate a copy for development if you have one. It can be provided to tastybento @ bentobox.world. I only use it for development.

tastybento avatar Feb 17 '25 02:02 tastybento

Ah, I see it's a paid plugin. I'd appreciate a copy for development if you have one. It can be provided to tastybento @ bentobox.world. I only use it for development.

I’ve sent you a message on Discord, since I can’t attach it in mail for some reason. Check your dms

konfix avatar Feb 20 '25 13:02 konfix

I'm added CustomBlocks to Blueprints in the latest BentoBox snapshot (ci.bentobox.world). I'll look at custom items (for chest contents) next.

tastybento avatar Feb 24 '25 05:02 tastybento

Great, tysm! I'll test it and let you know if there are any issues

konfix avatar Feb 24 '25 12:02 konfix

Great, tysm! I'll test it and let you know if there are any issues

Some blocks do work but some just appear as note blocks/tripwires, idk why that happens

konfix avatar Feb 24 '25 13:02 konfix

Thanks for the feedback. Let me tweak it a bit. The real blocks may be overwriting the CustomBlocks.

tastybento avatar Feb 24 '25 15:02 tastybento

@konfix Please try the snapshot on ci.bentobox.world when you can (it's building now).

tastybento avatar Feb 24 '25 15:02 tastybento

@konfix Please try the snapshot on ci.bentobox.world when you can (it's building now).

It works now, but only visually. If you click the note block customblock or chorus plant/tripwire, etc., it just loses its texture and turns back to vanilla state. I think the issue here is that the blocks aren't saved in IA world files as real blocks (or synced with IA in any way), therefore the actions between the player and blocks are completely unrecognized.

The blocks look normal when you create an island, but you can't interact with them the way you should.

And on my second try to regenerate the island, not even the textures show up: Image (there are no errors)

konfix avatar Feb 24 '25 20:02 konfix

That's a bummer. For me, the normal UI doesn't work - no textures. I'm not sure if I haven't set it up right. For example, this is what I see for blocks:

Image

These are my plugins: BentoBox (3.2.4-SNAPSHOT-LOCAL), ItemsAdder (4.0.8), LoneLibs (1.0.65), LuckPerms (5.4.153), PlaceholderAPI (2.11.6), ProtocolLib (5.4.0-SNAPSHOT-741), Vault (1.7.3-b131)

Everything I paste looks like a noteblock. I downloaded the default blocks pack but it doesn't seem to work. Not sure why.

Anyway, I changed the code to paste the baseblock before placing the IA block and maybe this'll work better. Please try the BentoBox snapshot and let me know. I'm kind of stuck testing right now. I added debug to the console on pasting, it reads correctly, but maybe there's some trick I'm missing.

Let me know.

tastybento avatar Feb 25 '25 04:02 tastybento

That's a bummer. For me, the normal UI doesn't work - no textures. I'm not sure if I haven't set it up right. For example, this is what I see for blocks:

Image These are my plugins: `BentoBox (3.2.4-SNAPSHOT-LOCAL), ItemsAdder (4.0.8), LoneLibs (1.0.65), LuckPerms (5.4.153), PlaceholderAPI (2.11.6), ProtocolLib (5.4.0-SNAPSHOT-741), Vault (1.7.3-b131)`

Everything I paste looks like a noteblock. I downloaded the default blocks pack but it doesn't seem to work. Not sure why.

Anyway, I changed the code to paste the baseblock before placing the IA block and maybe this'll work better. Please try the BentoBox snapshot and let me know. I'm kind of stuck testing right now. I added debug to the console on pasting, it reads correctly, but maybe there's some trick I'm missing.

Let me know.

weird. I could provide you with a testing server on my panel and file access so you can test it there if you want. The texture pack wasn't loaded correctly for you for some reason. I'll send you a message on Discord

konfix avatar Feb 25 '25 21:02 konfix

This all seems to work now, but please test it yourself and let me know. https://ci.codemc.io/job/BentoBoxWorld/job/BentoBox/2833/

tastybento avatar Feb 26 '25 06:02 tastybento