Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Sessional

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Sessional

  1. My JAVA_HOME is: C:\Program Files\Java\jdk1.8.0_25
  2. Your best off setting it, as many of the tools will use it. I wouldn't be surprised if Netbeans installer sets it, or if it just simulates it when you launch Netbeans. On the other hand, as much as I prefer Netbeans, it's much easier to do Forge in a different IDE. Were you hoping to get an answer as to how to set it or what to set it to?
  3. There is a method that specifies the bounds of the box. By changing that (just like cake does?) you'll be able to make the block appear to take up less space.
  4. Which method did you use to set up your crops? Using the block state method, you register a single block like normal and just let the game handle the rest.
  5. Minecraft understands the stage_0 variations because of the default block state. Your block state json file tells which model is used by each state. To enable the usage of this you need to make sure you use something like PropertyInteger and override the create default block state and the methods pertaining to the meta data. If you look inside any of the crop java files you will see this being done for each one.
  6. When you say your structure generation, does this include the cave generation and stuff generated inside the chunk provider at world generation? I've been looking in to it a bit and have a little bit of an understanding how some of it works. From what I've been doing, I would assume to add your own structure generation that you would have to make your own Chunk Provider and add them in there, I spent a few days perusing the internet and the best I could find was IWorldGenerators which will not work for things like nether fortresses. The structure start for a Mineshaft, if I remember correctly, are the big dirt based rooms that you encounter, and they generate say 7 paths off of themselves. These paths keep generating until they collide with another path or itself. During my perusal of the internet I happened across a technique called "perlin worms", and these seem very close to what is going on inside here. The conceptual block I've been having with this is if I pick a start point for my perlin worm, how would I know if it ended up inside another chunk, and how would I manage to hollow out the chunk next door without generating the chunk it started in? The villager center is the well structure, I think, I'm not sure if that ends up being a 16x16, but I would not be surprised if the start component was a full chunk, I believe that would make it easy to generate the structures than a smaller one, but once you figure out how to generate the structure, I doubt it matters as long as your method is designed to work in that manner. One thing to note, when it calls the method to begin generating your structure, like caves, the MapGenBase FORCES the random to be initialized with the worlds seed. With this you MUST generate a new seed for the random you pass to the actual method to generate the structure. The joy of this is as long as your method generates a consistent seed (which should be super easy seeing as the MapGenBase does it for you) you would be able to generate extremely consistent structures. Once again, how does one figure out when it pierces your chunk? Do you set a limit of say 6 chunk range (or 8 maybe if that's what that means?) and chunk all chunks and generate EVERY structure that exists to fully build it's components that may hit your chunk? Let me know if that was English. Sounded good while I typed it.
  7. Does this have to do with the reobfuscation process by any chance? I haven't worked with JNI and definitely don't have much experience with Forge or FML, but when you build your (at least Forge?) project it does some renaming to put all the methods and classes back in to different names that are normally found inside the minecraft jar file. There's an MCPBot link floating around somewhere that has the mappings if you want to give it a shot.
  8. The model for grass_normal allows you to implement a block with a different texture on each side, but I am unsure of what particle and overlay do. { "parent": "block/grass", "textures": { "particle": "blocks/dirt", "bottom": "blocks/dirt", "top": "blocks/grass_top", "side": "blocks/grass_side", "overlay": "blocks/grass_side_overlay" } }
  9. I'm not 100% sure but I'll throw out ideas to hopefully prompt some solution. Inside your OreGeneration pastie you have: if (biome instanceof BiomeGenOcean || biome instanceof BiomeGenRiver || biome instanceof BiomeGenBeach) I'm curious if you'd be better of comparing the biome there to be perfectly equal to a biome rather than an instance of it. I say this because I believe that world generation uses a single instance of each BiomeGenBase to generate the entire world. public static final BiomeGenBase ocean = (new BiomeGenOcean(0)).setColor(112).setBiomeName("Ocean").setHeight(height_Oceans); Maybe try to check if biome == BiomeGenBase.ocean?
  10. In theory the static field can be anywhere. Most often it serves organizational purposes to put them all in the same location. What you need to do is put that static field back in, it shouldn't matter where you put it, and just instantiate the variable. Inside your preInit, init, or postInit you need to make sure you set it to be an instance of itself. For example: ClassReference.staticVariable = new MinoriumOre() For example, I usually put all my static references in the root class for the mod, as it makes more sense for me to go Labyrinth.minoriumOre rather than MinoriumOre.minoriumOre.
  11. Found it. The exception is saying that you are attempting to do SOMETHING (this one was very vague...) on a null variable. public static final Block minoriumOre = null; To fix it you just need to make sure that this variable is initialized. For example: minoriumOre = new MinoriumOre(); Is this happening somewhere or is this variable remaining null?
  12. Solved it... The IWorldGenerators are all called during world generation with a Random that is initialized to the world seed. Therefore both blocks grabbing the same nextInt(15) repeatedly generates identical numbers. To fix this I just create a new random using random.nextInt() * some arbitrary constant number.
  13. Completely unrelated and just to get you in the boat with the rest of the Java world: class file names start with a capital letter. worldGen should become WorldGen and minoriumOre should become MinoriumOre. Can you show us the line where minoriumOre.minoriumOre is?
  14. I have two generators that run using identical code (aside from the set block state). The generator that runs first is working fine, however, the generator that runs second will not spawn the block ever, every block it tries to spawn in has already been populated by the previous generator. If I switch the order that these generators run in, the same thing happens but I will get the other block. Should I be using a different method to generate these randomly in chunks? @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { int numPerChunk = 4; for (int curSpawn = 0; curSpawn < numPerChunk; curSpawn++) { if (random.nextInt(15) != 0) { continue; } int xOffset = random.nextInt(15); int zOffset = random.nextInt(15); BlockPos topBlock = world.getTopSolidOrLiquidBlock(new BlockPos(chunkX * 16 + xOffset, 0, chunkZ * 16 + zOffset)); if (world.getBlockState(topBlock) == Blocks.air.getDefaultState() && world.getBlockState(topBlock.down()) == Blocks.grass.getDefaultState()) { world.setBlockState(topBlock, Homestead.blockTomatoCrop.getDefaultState()); } } }
  15. Often times instead of cloning the repository, the developers would want you to "fork" it. This button can be located on the github repo's home page in the top right corner. By forking it, you get your own working copy that you can make a change in, and then you can submit a pull request for a change set to be added in to the original repo.
  16. I haven't worked in 1.7.10 at all, but I will see if I can offer advice that works for 1.8. First: to pick which ocean is generated at which area you use the getBiomeGenAt method inside the ChunkManager. public BiomeGenBase getBiomeGenAt(int x, int z) { return this.biomeCache.getBiomeGenAt(x, z); } The provideChunk method in 1.8 is what is used to generate the chunk. For my purposes I did not have to implement the "load chunk" method at all, and let the provide chunk method do it. This method in 1.8 makes the proper calls to fully generate a 16x16 segment of the terrain - but to do this it calls into BiomeGenBase classes to generate each vertical segment of the chunk. The provide chunk method should probably involve populating a chunk fully up to your desired height while staying below sea level. Everything between sea level and the height you stopped at should be set to water blocks, and after that you would have a simple ocean world.
  17. //Appears to be x coordinate (offset by +- I'd assume from the middle of the chunk int i1 = p_76484_3_ + p_76484_2_.nextInt( - p_76484_2_.nextInt(; //y +- 4 (probably from top block at center of chunk int j1 = p_76484_4_ + p_76484_2_.nextInt(4) - p_76484_2_.nextInt(4); //z coordinate of the chunk +- 8 (once again, probably from center) int k1 = p_76484_5_ + p_76484_2_.nextInt( - p_76484_2_.nextInt(; //If the the block at given location is air and the block below it is grass (And as a final check, can we really put it there) spawn the block! if (p_76484_1_.isAirBlock(i1, j1, k1) && p_76484_1_.getBlock(i1, j1 - 1, k1) == Blocks.grass && Blocks.pumpkin.canPlaceBlockAt(p_76484_1_, i1, j1, k1)) { I have no idea what p_76484_2_.nextInt(4), inside the set block is.
  18. I'm not sure about which one you messed up, but naming something EventHandler, when you need to import an EventHandler class will really screw with the compiler unless you specify with the fully qualified name for the class you are wanting to use. For example: com.yourname.class.EventHandler would be a fully qualified name to determine which event handler class it should be using.
  19. If you want the world to skip out on generate chunks, in your WorldChunkManage or your WorldType (no idea which one it is off the top of my head) you should try to return false for a chunkExists method. I have no idea if this will achieve the desired effect, but I would assume it would stop a chunk from generating until that condition is true.
  20. When overriding a method, the signatures must match.
  21. java.lang.NullPointerException: Initializing game at cpw.mods.fml.common.network.NetworkRegistry.registerGuiHandler(NetworkRegistry.java:217) at com.phantasyrealms.main.MainRegistry.load(MainRegistry.java:100) A shot in the dark: the variable you are using at line 100 in MainRegistry.load isn't being defined before attempting to register it as a Gui handler.
  22. As far as that goes. I think that points me in the right direction. That grey scale image is the biome map, not the height map. What I am using for a height map is some smooth noise that dictates the change from the biomes root height. What I will do is this: I will populate a height map for the chunk, I will then smooth the final height out by taking the distance (<= 6) from the nearest biome shift and normalizing the height in these areas to simulate the "edge biome". This should allow me to make 6 tiles into each biome as a transitional height period to smooth the height. (Hopefully...) If you have any insight on this method I'd be interested to hear it.
  23. What process would you suggest I use to blur something? Would this be a mix of multiplying two height map images together to help reduce the range of difference in it? Or would I be doing something more like just reducing the variation in acceptable noise output?
  24. I have managed to get terrain generation to work using a series of noise functions. I have an interest in applying a layering attitude for this to avoid rough terrain changes as following I'm under the impression that with layers you would start at the most basic layer, and apply more specific ones as you go. The problem I am struggling with is the grasping how this applies to the noise functions I've been using. For example: Using a Voronoi noise function as follows for the determination of a terrain biome. As a basic example each shade would come out to be a different biome. http://www.neilblevins.com/cg_education/procedural_noise/cellular_round_bercon_solid.jpg[/img] It is simple to map these shades into different biomes. But now, how would I go about taking into account that two adjacent shades may be very different heights? For example, the black ones might end up being 100 blocks high, whereas a lighter grey may end up being 60 blocks high. It would be nice to be able to apply a layer into that shade of grey to force it to transition from 60 blocks to 100 blocks in a smooth transition rather than a steep incline. If I knew the shape of the biome ahead of time, and what biomes it is adjacent to I would, in theory, be able to apply a blending function to the noise to force a smooth transition. However, I do not know these values all the time during terrain generation. Any suggestions for where to look?
×
×
  • Create New...

Important Information

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