Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Abdymazhit

Members
  • Joined

  • Last visited

Everything posted by Abdymazhit

  1. Hello! I need to save the building and the coordinates of the required blocks. For example, this is how the building looks like. And the block coordinate that I need to save looks like this. I use this code to get building blocks. The first and second blocks are redstone blocks that are located at the edges of the building. int maxY = firstBlockXYZ[1]; int firstBlockX = firstBlockXYZ[0]; int firstBlockZ = firstBlockXYZ[2]; int secondBlockX = secondBlockXYZ[0]; int secondBlockZ = secondBlockXYZ[2]; List<String> blocks = new ArrayList<>(); for(int x=firstBlockX; x>=secondBlockX; x--) { for(int z=firstBlockZ; z>=secondBlockZ; z--) { BlockPos blockPos = new BlockPos(x, maxY, z); Block block = world.getBlockState(blockPos).getBlock(); blocks.add(String.valueOf(block)); } } Further, to get the coordinates of the necessary blocks, I manually take the coordinates of the necessary blocks and subtract these coordinates from the first redstone block. Finally, I save the list of blocks and the required coordinates to a json file. { "name": "building", "blocks": [ "Block{minecraft:redstone_block}", "Block{minecraft:stone}", ... ], "coordinates": [ "-11 -7 -6", "XXX", "XXX" ] } This works great for one degree. If need to rotate the building, it won't work. I somehow need to change the block indices in the json file and, accordingly, change the coordinates of the necessary blocks. Maybe I should change the format for saving blocks and necessary blocks from a json file to a schematic file? But, I have never used the schematic and do not understand it.
  2. Hello everyone! I solved the problem by creating a new mod folder in the folder that stores all the config files. And now I use resources from there.
  3. I tried this method as well before posting this thread. But, the error was the same. (java.io.FileNotFoundException: skyblock:rooms/storage.json) new ResourceLocation("skyblock", "rooms/storage.json")
  4. Hello! I am getting error 'java.io.FileNotFoundException: skyblock:rooms/storage.json' even though the specified file is present in my resource directory. Below I have provided my code and a screenshot showing that the required file exists. public static void getStorage() { try(BufferedReader reader = new BufferedReader(new InputStreamReader(Minecraft.getInstance().getResourceManager().getResource( new ResourceLocation("skyblock:rooms/storage.json")).getInputStream(), StandardCharsets.UTF_8))) { JsonObject json = Skyblock.gson.fromJson(reader, JsonObject.class); } catch(Exception ignored) { } }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.