Jump to content

Recommended Posts

Posted

SOLVED

----------

Problem: I had a block where when you bump into it, it takes you inside of it, I added a new dimension for this but couldn't figure out how to generate the interior only once in the dimension.

 

Solution: In whatever your teleporting method is, either an item, colliding with block, etc... whereever you change the player's dimension is where you need to do the generation. Just use entity.getEntityWorld() to get the world, AFTER you change dimensions, then you will have the "dimension's world". Then use that world to do all of the structure creation.

 

Posted

I'm not sure if worlds have nbt but you could generate the structure once with an IWorldGenerator and then create a tag that says the structure has been built so it doesn't keep rebuilding it. Then again I've never really messed around with a chunk provider so I have no idea if this is possible.

The proud(ish) developer of Ancients

Posted

Don't think it would work. I added a dummy variable to hold whether or not it's been built and based on that add the block.

 

private boolean built = false;

 

if(built == false)

{

  addblockstuffhere

  built = true;

}

Posted

Oh, yes, sorry. Forgot to include that in last post ??? It doesn't work, it just doesn't add anything, but... I did another test, I had a counter variable, that increased every time that method was called and was printed out. When I first entered my dimension it was being increased without stopping until a certain point.. then it only increased as a moved towards un-generates terrain.

Posted

If it's easier, I could also just have it generate a cube of air and then build the structure inside. But I also couldn't get that working, as I keep getting index out of bound errors.

Posted
  On 5/28/2015 at 11:34 AM, Born2Code said:

If it's easier, I could also just have it generate a cube of air and then build the structure inside. But I also couldn't get that working, as I keep getting index out of bound errors.

Post your current code.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Here..

 

    public void func_180520_a(int p_180520_1_, int p_180520_2_, ChunkPrimer primer)

    {

        for(int x = 0; x < 100; x++)

        {

            for(int z = 0; z < 100; z++)

            {

                primer.setBlockState(x, 100, z, Blocks.air.getDefaultState());

            }

        }

 

        primer.setBlockState(0, 100, 0, Blocks.end_stone.getDefaultState());

    }

 

Posted
  On 5/28/2015 at 11:59 AM, Born2Code said:

Here..

 

    public void func_180520_a(int p_180520_1_, int p_180520_2_, ChunkPrimer primer)

    {

        for(int x = 0; x < 100; x++)

        {

            for(int z = 0; z < 100; z++)

            {

                primer.setBlockState(x, 100, z, Blocks.air.getDefaultState());

            }

        }

 

        primer.setBlockState(0, 100, 0, Blocks.end_stone.getDefaultState());

    }

1. You should post the full code, not just a method.

2. Post the crash report together.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Generating a cube of air and my structure inside forever was just a quick though, I would prefer the OP answered instead.

 

ChunkProvider

 

  Reveal hidden contents

 

Posted

1. First remove this line:

private static final String __OBFID = "CL_00000397";

It is minecraft deobfuscation id, which is totally useless and unrelated with modding.

(+ Do not copy-paste code if you cant fully understand the code..)

2. Please rephrase your issue, I cant understand what is your problem.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted
  On 5/28/2015 at 12:11 PM, Abastro said:

  Quote

Here..

 

    public void func_180520_a(int p_180520_1_, int p_180520_2_, ChunkPrimer primer)

    {

        for(int x = 0; x < 100; x++)

        {

            for(int z = 0; z < 100; z++)

            {

                primer.setBlockState(x, 100, z, Blocks.air.getDefaultState());

            }

        }

 

        primer.setBlockState(0, 100, 0, Blocks.end_stone.getDefaultState());

    }

1. You should post the full code, not just a method.

2. Post the crash report together.

 

 

All I need, is an empty dimension, with one structure generated inside, that way when teleported there (working), I am teleported into that structure.

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I can't figure out if you're looking for help trying to steal someone elses work, or cheat at the game....
    • Title: Why Is It So Hard to Rename and Restructure Mods Like Xray or AntiXray? 🤔 Post text: Hey everyone! I’ve been digging into Minecraft modding for a while and have one big question that I can’t figure out on my own. Maybe someone with more experience could help or give me some advice. Here’s the issue: When I take a “normal” Minecraft mod — for example, one that just adds some blocks or new items — I can easily change its structure, package names, or even rebrand it entirely. It’s straightforward. But as soon as I try this with cheat-type mods like XrayMod or AntiXray, everything falls apart. Even if I just rename the classes, refactor the packages, or hide its identity somehow, the mod either breaks or stops working properly. XrayMod in particular is proving to be a nightmare to modify without losing its core function. So my question is — why is this so much harder with cheat mods like Xray? Is there something fundamentally different about how they’re coded, loaded, or protected that prevents simple renaming or restructuring? And if so, how can I actually learn to understand someone else’s cheat mod enough to safely refactor it without breaking the core features? I’ve already been spending over two months trying to figure this out and haven’t gotten anywhere. It feels like there must be some trick or knowledge I’m missing. Would really appreciate any thoughts, tips, or references — maybe there are guides or techniques for understanding cheat-mod internals? Or if you’ve successfully “disguised” a cheat mod like Xray before, I’d love to hear how you did it. Thanks in advance for any help or discussion. ✌️
    • just started making cinamatic contect check it out on my channel or check out my facebook page    Humbug City Minecraft Youtube https://www.youtube.com/watch?v=v2N6OveKwno https://www.facebook.com/profile.php?id=61575866982337  
    • Where did you get the schematic? Source/Link? And do use an own modpack or a pre-configured from curseforge? If yes, which one On a later time, I can make some tests on my own - but I need the schematic and the modpack name
  • Topics

×
×
  • Create New...

Important Information

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