Jump to content

Need Help Changing Chunk Size


MadCat

Recommended Posts

I am trying to make the entire world only one block wide, and I think i found how to do it. the chunk generation is located in a class named Chunk under net.minecraft.world.chunk, and the snipet i think i need to change looks like this:

 

public Chunk(World worldIn, ChunkPrimer primer, int x, int z)
    {
        this(worldIn, x, z);
        int i = 256;
        boolean flag = worldIn.provider.hasSkyLight();

        for (int j = 0; j < 16; ++j)
        {
            for (int k = 0; k < 16; ++k)
            {
                for (int l = 0; l < 256; ++l)
                {
                    IBlockState iblockstate = primer.getBlockState(j, l, k);

                    if (iblockstate.getMaterial() != Material.AIR)
                    {
                        int i1 = l >> 4;

                        if (this.storageArrays[i1] == NULL_BLOCK_STORAGE)
                        {
                            this.storageArrays[i1] = new ExtendedBlockStorage(i1 << 4, flag);
                        }

                        this.storageArrays[i1].set(j, l & 15, k, iblockstate);
                    }
                }
            }
        }
    }

that is the original, and i think that by changing either the j or k limit on their respective for loop will make chunks only load 1 block wide in that direction, which is my goal. so, something like this:

public Chunk(World worldIn, ChunkPrimer primer, int x, int z)
    {
        this(worldIn, x, z);
        int i = 256;
        boolean flag = worldIn.provider.hasSkyLight();

        for (int j = 0; j < 1; ++j)
        {
            for (int k = 0; k < 16; ++k)
            {
                for (int l = 0; l < 256; ++l)
                {
                    IBlockState iblockstate = primer.getBlockState(j, l, k);

                    if (iblockstate.getMaterial() != Material.AIR)
                    {
                        int i1 = l >> 4;

                        if (this.storageArrays[i1] == NULL_BLOCK_STORAGE)
                        {
                            this.storageArrays[i1] = new ExtendedBlockStorage(i1 << 4, flag);
                        }

                        this.storageArrays[i1].set(j, l & 15, k, iblockstate);
                    }
                }
            }
        }
    }

however, it will not let me directly edit the class, and i am having trouble figuring out how i could change this value. any help? (using forge 1.12.2)

Link to comment
Share on other sites

1.12 is no longer supported on this forum.

Please update to a modern version of Minecraft to receive support.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • KLIK DISINI UNTUK DAFTAR       WsoSlot88 Situs Bandar Togel Terpercaya dengan Hadiah 4D Tertinggi yaitu 10 juta WsoSlot88 adalah BO Agen Togel Terpercaya yang sudah berdiri sejak tahun 2016 yang terkenal dengan proses transaksi deposit dan withdraw yang super cepat serta jaminan pembayaran untuk berapa pun kemenangan yang didapat oleh para member nya. Jadi anda para pecinta game Togel Online dan Slot Gacor tidak perlu takut atau ragu bermain di BO WsoSlot88, karena jika anda Jackpot Paus berapapun, pasti akan dibayar lunas oleh WsoSlot88.   67 Pasaran Togel yang paling dicari oleh para pecinta Togel Online yaitu : - Pasaran Togel Hongkong (HK) - Pasaran Togel Sydney (SDY) - Pasaran Togel Singapore (SGP) - Pasaran Togel Cambodia (CM) - Pasaran Togel Taiwan (TW) - Pasaran Togel Jepang (JPN) - Pasaran Togel China (CN) - Pasaran Togel Chicago - Pasaran Togel Malaysia - Pasaran Togel Vegas - Pasaran Togel Miami - Pasaran Togel Vietnam - Pasaran Togel Carolina - Pasaran Togel Bullseye - Dan masih banyak pasaran togel terkenal lainnya
    • I can play my server & others can connect to it but it cannot load certain chunks & times out because it's bottlenecked by the default 4GB. I know this to be the case because when copy+pastaing the exact server world into curseforge singleplayer with 8G+, all the heavy chunks load in fine.  I have JavaSDK 17.0.9 x64-bit & reinstalled twice already as well as trying with Java 8 also installed & without.  I tried using: java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.2.0/win_args.txt %* pause but all that gives me is: Error: Could not find or load main class java Caused by: java.lang.ClassNotFoundException: java  Any ideas or help would be appreciate. 
    • KLIK DISINI UNTUK DAFTAR     Situs Slot Thailand Terpercaya adalah situs yang menyediakan permainan slot online dengan tema dan layanan yang sesuai dengan kebutuhan dan preferensi pemain asal Thailand. Situs-situs ini biasanya menawarkan permainan slot dengan server khusus yang berasal dari Thailand, yang diklaim memiliki tingkat kemenangan yang tinggi dan mudah mendapatkan jackpot. Beberapa situs juga menyediakan permainan slot dengan server dari negara lain, seperti Rusia dan Singapura, yang juga populer di kalangan pemain Thailand.  
    • I was trying to use viaforge (latest version) on forge 1.20.2 and then it crashed showing exit code 1 heres the log : 04Dec2023 11:40:52.058] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, Goldenretriver, --version, 1.16.5-forge-36.2.34, --gameDir, C:\Users\rashr\AppData\Roaming\.minecraft, --assetsDir, C:\Users\rashr\AppData\Roaming\.minecraft\assets, --assetIndex, 1.16, --uuid, a688ba406e4f4635a428d7555a467474, --accessToken, ????????, --userType, msa, --versionType, release, --launchTarget, fmlclient, --fml.forgeVersion, 36.2.34, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210115.111550] [04Dec2023 11:40:52.061] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 8.1.3+8.1.3+main-8.1.x.c94d18ec starting: java version 1.8.0_51 by Oracle Corporation [04Dec2023 11:40:52.071] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [minecraft,testharness,fmlclient,fmlserver] [04Dec2023 11:40:52.075] [main/WARN] [cpw.mods.modlauncher.SecureJarHandler/]: LEGACY JDK DETECTED, SECURED JAR HANDLING DISABLED [04Dec2023 11:40:52.082] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [] [04Dec2023 11:40:52.118] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [mixin,eventbus,object_holder_definalize,runtime_enum_extender,accesstransformer,capability_inject_definalize,runtimedistcleaner] [04Dec2023 11:40:52.125] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services [04Dec2023 11:40:52.132] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Found additional transformation services from discovery services: [C:\Users\rashr\AppData\Roaming\.minecraft\mods\viaforge-1.12.2-3.4.3.jar]
  • Topics

×
×
  • Create New...

Important Information

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