Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in block-data using vault #396

Open
Vinrey123 opened this issue Aug 9, 2024 · 4 comments
Open

bug in block-data using vault #396

Vinrey123 opened this issue Aug 9, 2024 · 4 comments
Assignees
Labels
Status: In progress Working on the issue. Type: Bug Something isn't working under investigation this is being checked out

Comments

@Vinrey123
Copy link

Vinrey123 commented Aug 9, 2024

Expected behavior

I would like to use the ominous storage on oneblock

Observed/Actual behavior

I wanted to create an ominous storage using a data block, but for some reason it doesn't work, although if I use the same command in minecraft, then it works.
updated: by the way, as I noticed, blockdata does not work at all with the new 1.21 tags

Steps/models to reproduce

https://github.com/user-attachments/assets/38be1388-636f-4599-bdc9-5887082dac94
https://github.com/user-attachments/assets/c841677c-cdb0-40b7-a4a1-f0c75ee7fb72

BentoBox version

BentoBox 2.4.2
Paper 1.21
AOneBlock 1.17.0

Plugin list

No response

Other

No response

@tastybento tastybento self-assigned this Aug 9, 2024
@tastybento tastybento added under investigation this is being checked out Type: Bug Something isn't working labels Aug 9, 2024
@tastybento
Copy link
Member

I haven't been able to try your strings (would be good if you pasted them rather than used a screenshot), but are you sure they are correct? Do they work in the command line with /setblock? The code just passes the string to the server with no change, so we're not really doing much with it.

I used https://mcstacker.net/ to make something similar and it looks different to your command:

minecraft:vault[ominous=true]{config:{loot_table:"minecraft:chests/trial_chambers/reward_ominous",key_item:{id:"minecraft:ominous_trial_key"}},shared_data:{loot_table:"minecraft:chests/trial_chambers/reward_ominous"}}

@Vinrey123
Copy link
Author

Vinrey123 commented Aug 9, 2024

here is the command I use:
minecraft:vault[ominous=true]{config:{key_item:{id:"minecraft:ominous_trial_key"},loot_table:"minecraft:chests/trial_chambers/reward_ominous"}}

I am completely sure that this command works in regular minecraft using the /setblock command. I've also tried using /give, but that doesn't work either. I also tried your command, but nothing works.

I also tried to create a suspicious sand with a date, but that doesn't work either. The only thing that works is an example command in phases.

minecraft:suspicious_sand[dusted=3]
minecraft:vault[ominous=true]

that is, as I understand it, the plugin does not see what is in curly brackets, but only in square ones.

tastybento pushed a commit that referenced this issue Aug 10, 2024
@tastybento
Copy link
Member

Hmm, well, it looks like the API call to set the block state with the curly brackets is not supported. There's discussion here:
https://www.spigotmc.org/threads/bukkit-createblockdata-with-curly-braces.611823/

The PR the guy mentions at the end almost made it but was rejected, but I don't think it was going to handle the curly braces anyway and was more for the sherds.

So, I'm afraid this won't work.

So, let's see if we can trick it to do it by running the setblock command instead. Please try out the 1.17.1-SNAPSHOT and let me know if that works.

@Vinrey123
Copy link
Author

Vinrey123 commented Aug 10, 2024

After checking version 1.17.1-SNAPSHOT, everything worked fine. Thanks for the help, I really wanted it.

But could you add the shutdown /setblock function to the console? It's just that when a lot of people dig one block, the console will spam /setblock

That's what it says:
[06:19:54 INFO]: Changed the block at 0, 80, 600
[06:19:59 INFO]: Changed the block at 0, 80, 600
[06:21:38 INFO]: Changed the block at 0, 80, 600
https://github.com/user-attachments/assets/e83ce8de-4e15-4736-94c3-18c0871e9e87

@tastybento tastybento added the Status: In progress Working on the issue. label Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: In progress Working on the issue. Type: Bug Something isn't working under investigation this is being checked out
Projects
None yet
Development

No branches or pull requests

2 participants