Jump to content

Certain ores won't generate?


Eria8

Recommended Posts

Certain ores just won't generate. All oreBlock classes and where they're registered in the main class are just copied and pasted from on another, and just renamed and have their harvest level changed.

 

They show up perfectly fine in creative tabs and act normally when placed, but they won't generate.

Even when they're in the same generation section they won't spawn.

 

For example,

	for(int i = 0; i < 6 /* <- Rarity per chunk */; i++)
	{
		int chunkX = x + random.nextInt(16);
		int chunkY = random.nextInt(30); //Max height to generate
		int chunkZ = z + random.nextInt(16);

		(new WorldGenMinable(Main.oreCoinSilver, 3)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.oreCoinGold, 1)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.oreStar, 1)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.oreComet, 1)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.eridiumOre, 3)).generate(world, random, chunkX, chunkY, chunkZ);
	}
	for(int i = 0; i < 3 /* <- Rarity per chunk */; i++)
	{
		int chunkX = x + random.nextInt(16);
		int chunkY = random.nextInt(20); //Max height to generate
		int chunkZ = z + random.nextInt(16);

		(new WorldGenMinable(Main.oreBand, 1)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.oreCrown, 1)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.unobtainiumOre, 4)).generate(world, random, chunkX, chunkY, chunkZ);
	}
	for(int i = 0; i < 2 /* <- Rarity per chunk */; i++)
	{
		int chunkX = x + random.nextInt(16);
		int chunkY = random.nextInt(12); //Max height to generate
		int chunkZ = z + random.nextInt(16);

		(new WorldGenMinable(Main.oreStatue, 1)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.oreVase, 1)).generate(world, random, chunkX, chunkY, chunkZ);
		(new WorldGenMinable(Main.adamantiumOre, 5)).generate(world, random, chunkX, chunkY, chunkZ);
	}
	for(int i = 0; i < 1 /* <- Rarity per chunk */; i++)
	{
		int chunkX = x + random.nextInt(16);
		int chunkY = random.nextInt(3); //Max height to generate
		int chunkZ = z + random.nextInt(16);

		(new WorldGenMinable(Main.GoddessOre, 1)).generate(world, random, chunkX, chunkY, chunkZ);
	}

 

GoddessOre, oreBand, oreCrown, oreStar and oreComet won't spawn, but all the others DO.

 

Using WorldEdit I took out a 128x128 area of land and removed every block except ores, and not one of those ore had generated there. I also used the "//replace [ore] 0" command to see if they'd be in a 256x256 area of land, but "0 blocks were replaced."

They don't generate.

 

How can they not generate when other blocks with the same rarity that were copy/pasted from them do?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • How to fix file server-1.20.1-20230612.114412-srg.jar  
    • Just a few months ago I was creating my own plugin for Minecraft 1.20.2 spigot that did the same thing, but the skins were not saved, if you can understand this code that I made a long time ago it may help you.   //This is a class method private static String APIRequest(String value, String url, String toSearch) { try { URL api = new URL(url + value); HttpURLConnection connection = (HttpURLConnection) api.openConnection(); connection.setRequestMethod("GET"); int responseCode = connection.getResponseCode(); if (responseCode == HttpURLConnection.HTTP_OK) { BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); StringBuilder response = new StringBuilder(); for (String responseChar; (responseChar = reader.readLine()) != null; ) response.append(responseChar); reader.close(); JSONObject responseObject = new JSONObject(response.toString()); if (!toSearch.equals("id")) return responseObject .getJSONArray("properties") .getJSONObject(0) .getString("value"); else return responseObject.getString("id"); } else { AntiGianka.ConsoleMessage(ChatColor.RED, String.format( "Could not get %s. Response code: %s", ((toSearch.equals("id")) ? "UUID" : "texture"), responseCode )); } } catch (MalformedURLException error) { AntiGianka.ConsoleMessage(ChatColor.RED, "An error occurred while trying to access the URL. Error: " + error); } catch (IOException error) { AntiGianka.ConsoleMessage(ChatColor.RED, "An error occurred while attempting to connect to the URL. Error: " + error); } return ""; } //other class method private void SkinGetter() { String uuid; String textureCoded; if ((uuid = APIRequest(args[0], "https://api.mojang.com/users/profiles/minecraft/", "id")).isEmpty() || (textureCoded = APIRequest(uuid, "https://sessionserver.mojang.com/session/minecraft/profile/", "value")).isEmpty() ) sender.sendMessage(ChatColor.RED + String.format( "An error has occurred while trying to obtain the %s player skin, please check if the name %s is spelled correctly or try again later.", args[0], args[0] ) ); else SkinSetter(textureCoded); } //other more private void SkinSetter(String textureCoded) { JSONObject profile = new JSONObject(new String(Base64.getDecoder().decode(textureCoded))); try { URL textureUrl = new URL(profile.getJSONObject("textures"). getJSONObject("SKIN"). getString("url")); if (sender instanceof Player && args.length == 1) { PlayerTextures playerTextures = ((Player) sender).getPlayerProfile().getTextures(); playerTextures.setSkin(textureUrl); ((Player) sender).getPlayerProfile().setTextures(playerTextures); if (((Player) sender).getPlayerProfile().getTextures().getSkin() != null) sender.sendMessage(((Player) sender).getPlayerProfile().getTextures().getSkin().toString()); else sender.sendMessage("Null"); sender.sendMessage("Skin changed successfully.a"); } else { } AntiGianka.ConsoleMessage(ChatColor.GREEN, "Skin command executed successfully."); } catch (MalformedURLException error) { sender.sendMessage(ChatColor.RED + String.format( "An error has occurred while trying to obtain the %s player skin, please check if the name %s is spelled correctly or try again later.", args[0], args[0] ) ); AntiGianka.ConsoleMessage(ChatColor.RED, "An error occurred while trying to access the URL. Error: " + error); } }  
    • Use /locate structure The chat should show all available structures as suggestion For the Ancient City it is /locate structure ancient_city
    • So does it work without this mod? Did you test it with other builds?
  • Topics

×
×
  • Create New...

Important Information

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