Jump to content

robustus

Members
  • Posts

    151
  • Joined

  • Last visited

Everything posted by robustus

  1. http://www.minecraftforge.net/forum/index.php/topic,17885.msg90964.html#msg90964
  2. A chunk is 16 x 16 and if you increase that number 16 it may try to generate outside of the current chunk into a chunk not loaded and it will cause the crash.
  3. http://www.minecraftforge.net/forum/index.php/topic,17885.msg90964.html#msg90964
  4. 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.
  5. 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 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.
  6. 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)
  7. 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.
  8. Very odd, I got it working, it just seems not to want to read the block on the first line of the file, so just added another block name and then that first line again and it worked
  9. 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
  10. The grass block is a special render block which you can look up how it's done in RenderBlocks.java In the vanilla it is hardcoded to check to see if you change the grass block ie: the dirt block under it. You need to do a custom render for it. It's not too hard if you are familiar with doing custom render blocks, if not you are going to have to read up on it.
  11. 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; } }
  12. Block IDs are going to be obsolete in the next Forge, you might as well just use extra blocks
  13. How many stages is your crop? If not more than 16 you probably don't need a tile entity. Each metadata can represent a stage of the crop
  14. Try if (par1World.getBlockId(par2, par3 + 1, par4) == 0 && par3 <= 255) { par1World.setBlock(par2, par3 + 1, par4, yourgasblock); par1World.setBlock(par2, par3, par4, 0); } par2, par3, par4 are x, y, z
  15. 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
  16. robustus

    Solved

    the block ID has to be below 256 to use it as a top or filler block. This may change in the next version I think without block IDs but for now that's your issue.
  17. 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; } } } } }
  18. 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.
  19. 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.
  20. in the digblock method you have this data[index] = 0; change to data[index] = (byte)0;
  21. Most likely removing a vanilla block will cause issues somewhere but you prob can give it a try. add this code to your main mod file Block.blocksList[x] = null; replace x with the blockID you want to remove.
  22. I think you probably need to make 4 versions of the model, 1 for each direction, assign a metdata value to each and call the different model versions based on the metadata state.
  23. 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.