Scaffolding icon indicating copy to clipboard operation
Scaffolding copied to clipboard

Null response without an error

Open GoldenGamerLP opened this issue 3 years ago • 20 comments

Describe the bug So when you trying to load up a schematic via Scaffolding.fromFile or via the FileInputStream the response is always null. There is no exception too which would be thrown. BTW my entire completeable future is beeing closed but i have no idea what why and whats caused it...

To Reproduce Steps to reproduce the behavior:

  1. Load up a schematic
  2. look via if(schematic != null) if its null
  3. Use it in a CompleteableFuture
  4. See null response with no error (Schematics are tested and worked fine)

Expected behavior It should throw an error and should load when the schematics are right, load them up.

Screenshots 1. image 2. (Debug) image (- Please ask for a full code snippet)

Desktop (please complete the following information):

  • Latest Scaffolding version
  • Latest Minestom verison (Not 1.18 branch)
  • Java 17

GoldenGamerLP avatar Jan 07 '22 22:01 GoldenGamerLP

What kind of schematic are you using? MCEdit or Sponge?

LooFifteen avatar Jan 07 '22 23:01 LooFifteen

I tried both types and also renamed them both to .schematic

GoldenGamerLP avatar Jan 07 '22 23:01 GoldenGamerLP

Are you able to send a screenshot of the schematic open in NBTExplorer?

LooFifteen avatar Jan 07 '22 23:01 LooFifteen

  1. Schematic: image
  2. Schematic: image
  • Not NBT explorer sorry, i cant install it rn

GoldenGamerLP avatar Jan 07 '22 23:01 GoldenGamerLP

Schematic 1 is a Sponge schematic, try loading it using new SpongeSchematic()#read. I don't recognise the second one, are you able to send the file for me to check out tomorrow?

LooFifteen avatar Jan 07 '22 23:01 LooFifteen

Yes the first one is Sponge, the second one had a .nbt thing at the end. Ill try the new SpongeSchematic()#read later. Thanks

GoldenGamerLP avatar Jan 07 '22 23:01 GoldenGamerLP

So i created the Schematic by myself but it didnt work either

image

GoldenGamerLP avatar Jan 07 '22 23:01 GoldenGamerLP

How exactly did you know it didn't work?

LooFifteen avatar Jan 08 '22 08:01 LooFifteen

How exactly did you know it didn't work?

When I read the nbt via fileinputstream, it caused my whole completable future to exit und stop working, even my debug messages after the loop wouldn't print out.

GoldenGamerLP avatar Jan 08 '22 09:01 GoldenGamerLP

I will need the schematics to reproduce this.

LooFifteen avatar Jan 08 '22 23:01 LooFifteen

Yes, i downloaded a random schematic, here it is: https://workupload.com/file/RNfUqkkMXZc

GoldenGamerLP avatar Jan 08 '22 23:01 GoldenGamerLP

So i tried reading the NBT data myself and this error occoured with this code: Error:

image

Code to reproduce:

image

GoldenGamerLP avatar Jan 09 '22 00:01 GoldenGamerLP

Okay, I'll look into this sometime tomorrow.

LooFifteen avatar Jan 09 '22 00:01 LooFifteen

Thanks ^^

GoldenGamerLP avatar Jan 09 '22 00:01 GoldenGamerLP

The schematic you provided has loaded on my machine, but the block palette is slightly off.

LooFifteen avatar Jan 09 '22 10:01 LooFifteen

Ah okay, I have no more ideas why it isn't loading and exiting my whole completable furutre. Do you maybe have an idea where the error which I send you is coming from?

GoldenGamerLP avatar Jan 09 '22 10:01 GoldenGamerLP

It may be caused by the fact you are not on the 1.18 branch of Minestom.

LooFifteen avatar Jan 09 '22 20:01 LooFifteen

That could be true, I'm using the latest version of the main branch (-SNAPSHOT)

GoldenGamerLP avatar Jan 09 '22 21:01 GoldenGamerLP

Any news on the bug?

GoldenGamerLP avatar Jan 12 '22 16:01 GoldenGamerLP

I'm not sure, I was able to read and build the schematic perfectly fine. I did discover a different bug but it was unrelated to your issue.

LooFifteen avatar Jan 12 '22 16:01 LooFifteen