Jump to content

robustus

Members
  • Posts

    151
  • Joined

  • Last visited

Posts posted by robustus

  1. You mean the grass and dirt are not spawning on top of it or the actual stone is only the top layer?  Personally I replace the stone in the new generate terrain function that you can override in your biome.  I think because the top and filler blocks only spawn on vanilla stone you have to do it that way.  Copy the genTerrainBlocks from the vanilla BiomeGenBase class, put it in your biome and change the vanilla stone to your stone in that as well.

  2. Ok this is how I do it.

     

    1) Create a new world type.  In 1.6 I overwrote the default world type, but haven't tried/accomplished that in 1.7 so I just created my own world type

     

     

    I put this in my post init config area

    WorldType CUSTOM = new WorldTypeCustom(3, "custom");

     

    Create a WorldTypeCustom class that extends WorldType and overwrite the class that specifies the GenLayer, so it would look like this

     

    public class WorldTypeCustom extends WorldType {
    
    public WorldTypeCustom(int par1, String name) {
    	super(name);
    	// TODO Auto-generated constructor stub
    }
    
       /**
         * Creates the GenLayerBiome used for generating the world
         * 
         * @param worldSeed The world seed
         * @param parentLayer The parent layer to feed into any layer you return
         * @return A GenLayer that will return ints representing the Biomes to be generated, see GenLayerBiome
         */
    @Override
      public GenLayer getBiomeLayer(long worldSeed, GenLayer parentLayer)
        {
            GenLayer ret = new CustomGenLayerBiome(200L, parentLayer, this);
            ret = GenLayerZoom.magnify(1000L, ret, 2);
            ret = new GenLayerBiomeEdge(1000L, ret);
            return ret;
        }
    }
    

     

    Copy the default GenLayerBiome file and rename it to your custom file that you override in your custom WorldType, and then add your biomes into the arrays at the top of the file.

     

    You can get into even crazier customization with the other GenLayer files which I can probably help with if you need it, but this is the way I use to add my biomes.

     

     

  3. I'll say it again: I can't guarantee you that this method works. For finding your Biome in-game: I don't think there is a better way than just flying around.

     

    You can generate a world and find which biome you are spawning in or next to, and then replace that biome temporarily with your custom biome in the biome arrays in the GenLayerBiome.  For instance to work on custom biomes I started a world that had a roofed forest right next to spawn, so I put my biome in the array in place of the roofed forest and the custom biome will generate in it's place if you recreate the world (ie: same seed)

  4. I personally use a custom WorldType where you can specify your own ChunkProvider etc.  You can then go in and make your own GenLayer files where the biome generation occurs.  It's pretty complicated for beginniners, took me almost a year of modding to get up to figuring out what everything does in terrain/biome generation, but I tell you it's well worth it.  Almost done updating my mod in progress to 1.7 and I have some really cool stuff going on, will share with you all eventually and maybe Ill do some tutorials.

  5. Maybe my brain is fried from so many hours of updating code, but I'm attempting to do the block and item names last.  From what I've read all you SHOULD need to do is create a folder called lang in the assets/modid/ folder which I have done, as well as created a file en_US.lang

     

    Created a block called DryMud used .setBlockName("DryMud")

     

    put in my lang file 

     

    tile.DryMud.name=Dry Mud

     

    however the name in world is still displaying as tile.DryMud.name

     

    I can't seem to figure out where I'm going wrong this seems pretty cut and dry.

     

    Also I should note, I don't know if this is normal but I went into the options to try and see if maybe I had to select English and there were no languages listed.

     

    Thanks

  6. you need to specify in the block file which render to use

     

      /**
         * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
         * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
         */
    
        public boolean isOpaqueCube()
        {
            return false;
        }
    
        /**
         * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
         */
      
        public boolean renderAsNormalBlock()
        {
            return false;
        }
    
    
    
        /**
         * The type of render function that is called for this block
         */
        @Override
        public int getRenderType()
        {
            return YourMod.yourRenderType;
        }
    
    
        
    }

  7. Try the onBlockPlacedBy method, when the gas block comes into the world have it check to see if the block above it is air, if its air set current block to air and set the block above it to the gas block and just make sure the block won't go higher than 255 or whatever you want it to sit at.  so if the block above it is air and not greater than 255 it will go up

  8. Ok so went to look at this again and was having the same issue you did so spent a few hours trying to figure this out, turns out answer is pretty easy.  I noticed the cave would generate in my replacement stone when it was also listed as the filler block in my biome, so went over the code trying different things trying to figure out why it wasn't digging the block.  Anyway it's such a stupid thing but at least I figured it out hopefully for people in the future.

     

    This code should work for you, I just changed everything to byte instead of integer.

     

       protected void digBlock(byte[] data, int index, int x, int y, int z, int chunkX, int chunkZ, boolean foundTop)
        {
            BiomeGenBase biome = worldObj.getBiomeGenForCoords(x + chunkX * 16, z + chunkZ * 16);
            byte top    = (isExceptionBiome(biome) ? (byte)Block.grass.blockID : biome.topBlock);
            byte filler = (isExceptionBiome(biome) ? (byte)Block.dirt.blockID  : biome.fillerBlock);
            byte block  = data[index];
    
            if (block == (byte)LegendofZelda.LoZRock.blockID || block == filler || block == top)
            {
                if (y < 10)
                {
                    data[index] = (byte)Block.lavaMoving.blockID;
                }
                else
                {
                    data[index] = 0;
    
                    if (foundTop && data[index - 1] == filler)
                    {
                        data[index - 1] = (byte)top;
                    }
                }
            }
        }
    }

     

    NSeUglf.png

  9. If you remove the block like I showed then re-add your own block in its place, vanilla will refer to your new block Im pretty sure, but be aware the next version of Forge for the latest minecraft is getting rid of block ID's so this probably won't work the same way in the next version.

  10. I'll take a better look later when I get off work, but I'm pretty sure it's something in your digblock method logic that just may be throwing it off.    I have a version at home I used to do something similar to what you are doing Ill get back to you later.

  11. Cave code is set so it only generates cave in stone and the biomes top and filler blocks.  Copy the MapGenCaves file into a new file, look in the code for where it checks for stone etc and adjust it so check includes your custom blocks, then in your ChunkProvider change the MapGenCaves relevant code to your custom cave code.

×
×
  • Create New...

Important Information

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