Jump to content

OLEGSHA

Members
  • Posts

    10
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    I am new!

OLEGSHA's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. In an attempt to hyper-optimize worldgen I need to run a certain function (foo(x, z) in this SSCCE) for every chunk as soon as it is completely populated. By "completely populated" I mean "will never be affected by population of neighbour chunks ever again". What I try to do is listen for net.minecraftforge.event.terraingen.PopulateChunkEvent.Post events and check all nearby chunks to see if any of them satisfy the condition that their -X, -Z and -XZ neighbours have been the subject of this event previously. The spoiler explains why this makes sense: This is an SSCCE that replicates my current code: @SubscribeEvent (priority = EventPriority.LOWEST) public void onChunkFinishedPopulating(PopulateChunkEvent.Post event) { int x = event.chunkX, z = event.chunkZ; // For every upper neighbour for (int dx = 0; dx <= 1; ++dx) { for (int dz = 0; dz <= 1; ++dz) { if (isChunkReady(event.world, x + dx, z + dz)) { foo(x + dx, z + dz); } } } } private static boolean isChunkReady(World world, int x, int z) { IChunkProvider provider = world.getChunkProvider(); // For every lower neighbour for (int dx = -1; dx <= 0; ++dx) { for (int dz = -1; dz <= 0; ++dz) { if (!provider.chunkExists(x + dx, z + dz)) { return false; } if (!provider.provideChunk(x + dx, z + dz).isTerrainPopulated) { return false; } } } return true; } However, sometimes chunks that have never been supplied to foo(x, z) appear on the map. For example, this image generated during one of the tests displays chunks that have been supplied in green and chunks that have been the subject of the aforementioned event in white. The three white spots should not have appeared. I ran many tests with a utility that emulates Minecraft generating and populating random chunks and then runs this algorithm to find completely populated chunks. It has never failed so far, including random tests, manual tests and tests with chunk generation sequence copied from actual gameplay (the code commented out). Any idea what might be causing this?
  2. Interestingly enough, 1.12 still worked fine. Oh well, I guess I have to quit being a dinosaur one day. Thanks for clearing that out.
  3. Does that mean the Forge dropped support for the old launcher? That is not mentioned anywhere, even in the EAQ.
  4. After installing Forge 1.13.2 - 25.0.191 using the official launcher from the official website (http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.13.2.html), which is the latest version as of writing this, my official Minecraft launcher fails to load the version info. Why I think there is a problem: The version 1.13.2-forge-25.0.191 is not visible in the launcher version selection dialogue after doing the same steps as with all other versions of Forge. What I have done: Using the "old" (1.6.89-j) official Minecraft launcher with an account I legitimately own I downloaded and installed release 1.13.2. It works fine. After that, I downloaded in the manner described above the official installer of Forge 1.13.2 - 25.0.191 and installed Forge. The installer reported that the installation went successfully. I re-launched the launcher several times making sure that no other launchers are open, and I could not find the version in the version selection dialogue (found in the "Edit Profile" menu) after a thorough search (having previously installed Forge I know to check the entire list). I also searched the list with "snapshots", "beta" and "alpha" versions enabled. I checked the JSON file the installer must have generated to see what the version name was and I cannot see any problems with it. I posted it just in case. After that, I checked my launcher's log. This is what I saw. I believe that it might be a problem with the JSON file and not the official launcher I am using. The research I have done: I duckduckgo'ed the problem and the only two related posts were on this forum, none of which received a reply because the posters were banned. I just wonder why the questions could not be answered still. I shall therefore include this: debug.log: not applicable installer logs: initial install (unfortunately lost), re-installation attempt. I will provide any other useful info on demand.
  5. Thank you so much. I'll try to do that, see what happens.
  6. Thank you so much. I'll try to do that, see what happens.
  7. I'm trying to create a mod that would create a texture for some of its blocks by recoloring a colorless base file. After some research on the problem I found out that it is impossible to do it at any moment, but it maybe could be done while reloading textures (loading the game / changing resource pack)? E.g. a "generic dust" block. The mod would scan for all registered items for dust items (e.g. gold dust from IC2) and register a corresponding dust block. Later, when textures are loaded, this block would take some base grayscale texture, get the average color of dust's current texture, recolor the base texture (in RAM) and set the result as its texture. Can that be done as explained, or should I use renderers (client lag++)? Thanks in advance.
  8. I'm trying to create a mod that would create a texture for some of its blocks by recoloring a colorless base file. After some research on the problem I found out that it is impossible to do it at any moment, but it maybe could be done while reloading textures (loading the game / changing resource pack)? E.g. a "generic dust" block. The mod would scan for all registered items for dust items (e.g. gold dust from IC2) and register a corresponding dust block. Later, when textures are loaded, this block would take some base grayscale texture, get the average color of dust's current texture, recolor the base texture (in RAM) and set the result as its texture. Can that be done as explained, or should I use renderers (client lag++)? Thanks in advance.
  9. So does that mean that I cannot edit obfuscated files because no IDE is able to bind to those packages?
  10. Hello, I was trying to make a slight change to an obfuscated mod code but my IDE (Eclipse) wouldn't compile without the obfuscated version of the API. I guess I will have to make changes in the deobfuscated src of mod and reobfuscate it but I got curious: when an obfuscated mod addresses stuff like net.minecraft.util.ResourceLocation, where is the corresponding class file located? I searched through .minecraft with forge installed but I could not find any jars that contain net.minecraft package; those classes seem to be named aaa.class, aab.class and so on. So where is the jar with net.minecraft packages located?
×
×
  • Create New...

Important Information

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