Jump to content

Sessional

Members
  • Posts

    36
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

Sessional's Achievements

Tree Puncher

Tree Puncher (2/8)

4

Reputation

  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. Look into the VillagerRegistry.
  7. 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.
  8. 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.
  9. 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" } }
  10. 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?
  11. 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.
  12. 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?
  13. 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.
  14. 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?
  15. 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()); } } }
×
×
  • Create New...

Important Information

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