Jump to content

robustus

Members
  • Posts

    151
  • Joined

  • Last visited

Posts posted by robustus

  1. It's not exactly the easiest thing to do, depends on how far into modding you've gone, but the vanilla grass block has hard coded checks to make sure that the default named textures are the ones being used, so if you try to create a new grass block and try to specify your own textures, it won't render the same way as the grass block.  You need to make your new grass be rendered by custom rendering class.  So basically I went into the RenderBlocks class, copied all the code relevant to rendering the grass block, put them into my own custom rendering class and removed the vanilla checks that look for the default textures.

     

    It depends how far along and how much you know, when I first wanted to do this I was too much of a newb but after modding for awhile I figured it out.  If you need help let me know.

  2. Well they are changing biome generation to be smarter so the code that draws the biomes out will surely be a bit different.  They are also getting rid of blockID's so it will be interesting to see how that effects terrain generation. You usually were only able to use blocks less than 256 ID's for terrain generation, I assume that might change, for the better anyway.

  3. Anyone know how much of an overhaul this new update is going to cause us modders?  Seems like they have revamped a lot of stuff and look to release Friday if all goes well.  Anyone have any insights onto how much of a pain this is going to be to upgrade to?  I'm personally wondering what they have done to the terrain gen and such if its going to be a complete overhaul of the old system.

  4. This is because the grass block is a specially rendered block because of the overlay textures.  If you look in the RenderBlocks minecraft class you can see how its done.  They however do a check to make sure its a vanilla grass block before they render the side texture properly.  You can copy most of the code they use to do the grass block and do your own custom render.  It depends how far down the modding rabbit hole you want to go really.

  5. It's not that hard to overwrite a vanilla block, here is how it is done...

     

    I needed to overwrite the regular water blocks to get my own custom texture in there for various reasons so you set in your mod file the block that needs to be overwritten and remove it from the blocklist. The waterstill block is #9 so I did this

     

    Block.blocksList[9] = null;

     

    Then I made a new class that extended the block class of the vanilla block, and overwrote the texture classes in that file and re-added the water block like this

     

    Block waterStill = (new BlockStationaryFiesta(9, Material.water)).setHardness(100.0F).setLightOpacity(3).setUnlocalizedName("water").func_111022_d("water_still");
    

  6. So after months of tinkering around and learning java and forge I am finally ready to reveal what I've been working on.  Here is a video

    . Just want to thank people for helping with questions on this board and also the Forge team who have done an amazing job and just have enabled so much creation and tons of content to the Minecraft community. 
  7. 2013-08-28 22:07:16 [iNFO] [sTDERR] java.lang.IllegalArgumentException: n must be positive
    2013-08-28 22:07:16 [iNFO] [sTDERR] 	at java.util.Random.nextInt(Random.java:300)

     

    Looks like you're trying to get a random number based on a negative integer on line 57 in Events Manager

     

    2013-08-28 22:07:16 [iNFO] [sTDERR] 	at tutorial.EventManager.addOreSpawn(EventManager.java:57)

  8. Can someone tell me what is wrong?

     

         if (par2 < 7)
            {
                if (par2 == 6)
                {
                    par2 = 5;
                }

     

    Do you see what is wrong with this code here?  par2 is the metadata which means everytime the crop gets to the stage that represents metadata 6, you've set it so anytime the crop gets to that stage is is automatically set to metadata 5 the previous crop state.

  9. guessing custom world gen with the exception of new ores, biomes, and dimensions isn't supported at all then?

     

    No you can dig deep and dirty into the world gen.  make a class WorldTypeCustom or what have you and extend the original class

     

    WorldType YOURCUSTOMNAME = new WorldTypeCustom(4, "Custom");

     

    place that code in your main mod file

     

    integer is the world type number, default is zero i believe and large biomes is 1, you can even override those using this.  I've been able to modify just about everything relating to world gen without using any reflection methods if you need help understanding any of it let me know.

    • Like 1
  10. Try this code instead

     

          for (int g1 = 0; g1 < 40; g1++)
                {
                	l1 = k + this.soulRNG.nextInt(16) + 8;
                	i2 = this.soulRNG.nextInt(128);
                	j2 = l + this.soulRNG.nextInt(16) + 8;
                    WorldGenSoulGrass worldgenerator1 = new WorldGenSoulGrass(this.soulRNG, 2);
                    worldgenerator1.generate(this.worldObj, this.soulRNG, l1, i2, j2);
                }

  11. There's no way to change it after?

     

    That would only make it be a specific biome per definition (things that only spawn in that biome can spawn there etc.) but the terrain is already generated so it won't look like the other biome.

     

    If I change Ocean biome to desert, it will still be deep sea water every where and little to no sand and no cacti :P But the F3 screen will correctly display current biome as "desert"

     

    Right, that's why I suggested spawning the biome in a similar way that the ravines and caves are generated.  Say he wants to spawn his oasis in the desert, he created a MapGenOasis file that would generate say a circularish area with grass and trees or what have you, and in that method set that areas biome name

  12. just a thought, not sure if its possible.  What if you generate your oasis like a structure would spawn or a ravine.  The only question then is it possible to set the x/z coordinates biome id/name in this process.  I've read over the generation and chunk provider code a million times still trying to figure it out and learn what it all does, but i could be wrong but i could have sworn I saw a way to set the biome id to the specified coordinates..

×
×
  • Create New...

Important Information

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