Jump to content

Elix_x

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by Elix_x

  1. First of all, blocks are not generated in new Chunk , but in generateTerrain (may be called func_147424_a for you). There is asks WorldChunkManager for biomes, which asks GenLayers. There, in GenLayers, there's random determined per chunk. Try to find place where you can change it, or simply copy all GenLayer classes and changing random seed to what you want. Ores aren't generated, because in populateChunk , you are calling event with world dimension id != 0, while ores generate in dimId == 0. Last thing, just found that mod: Witchery, it has dream dimensions that generate exactly like overworld. I suggest looking at it's source code.
  2. Ok. If it is fixed, add [sOLVED] to the title after mc version. Like that, everybody knows that this problem is solved .
  3. Didn't i say that you run your loops before Chunk chunk = new Chunk ? Or was it on another thread about dimensions? Anyway, you must run your loops before creating new chunk.
  4. is first: http://lmgtfy.com/?q=java.util.Map Now, that you know what Map is, rewrite your helper code using maps instead of arrays. You will see, it will get a lot cleaner. Also, yes you can cast byte to int and backwards, but why?
  5. Yes, not 655536... But neither 16*16*128 (=32768) ... You want 16*16*256=65536... I figured ah well thanks anyways for the help, i just assume that I switch out the coords with the ints of my for loops so it runs through the entire chunk. Yup. But do you need to run through entire chunk? Or just through y=1? Don't do unnecessary operations. Null blocks in [] will be automatically read as air.
  6. First of all, there are 2 arrays in provideChunk : Block[] and byte . First one holds blocks and second one holds metadata. Second, do you know what java.util.Map<K, V> is? If not, you must. Go and read now. RIGHT NOW!
  7. Yes, not 655536... But neither 16*16*128 (=32768) ... You want 16*16*256=65536...
  8. Was typing reply to your previous comment and you posted this one... Ok, let's take a look... No, it will not work, but you are very close. Because stone, dirt, grass... are generated in func_147424_a , which is called after you iterate through blocks which are empty at this moment. Move your iteration (for loops) to following location: -In provideChunk method. [X] -After all blocks are generated (last generation code line: this.scatteredFeatureGenerator.func_151539_a(this, this.worldObj, p_73154_1_, p_73154_2_, ablock); ) [0] -Before new chunk is created ( Chunk chunk = new Chunk(this.worldObj, ablock, abyte, p_73154_1_, p_73154_2_); ). [X] [X] means that code is convenient for this condition. [0] means it's not. I really don't like to give answers directly, so please, try to understand...
  9. Ok, let's say that i want to set some blocks blocks at (x, y, z) to diamond blocks. In here, i'm putting diamond blocks at (0, 0, 0), (12, 128, 16) and (7, 245, 11): blocks[0<<11 | 0<< 7 | 0] = Blocks.diamondBlock; blocks[12<<11 | 16<< 7 | 128] = Blocks.diamondBlock; blocks[7<<11 | 11<< 7 | 245] = Blocks.diamondBlock;
  10. I could... And it is what i tried first... But exporting jar every time core mod is update... I'm too lazy for that ...
  11. No. You leave everything as it is and before Chunk chunk = new Chunk(this.worldObj, ablock, abyte, p_73154_1_, p_73154_2_); line, you add new code that iterates thorugh blocks and "mirrors" them. Pseudo example: for(int i = 0; i < blocks.length; i++){ if(blocks[i].canBeMirrored){ blocks[i] = blocks[i].mirror(); } }
  12. Nearly. Apply changes to blocks before Chunk chunk = new Chunk . Also, below i told you how to convert x, y and inside chunk to position in blocks ( x<<11 | z<< 7 | y ).
  13. Yes, this is correct part of the code. As you can see, there's Block[] there, which as you may guess holds blocks for new chunk. Iterate through it and when you encounter block hat can be mirrored, replace it with mirrored version. You have to do this before Chunk chunk = new Chunk and after last block generation code (in this case - this.scatteredFeatureGenerator.func_151539_a ).
  14. In your dimension's IChunkProvider in provideChunk method, create new Chunk with Block[] in arguments. Pas it as Block[] blocks where Block[] blocks = new Block[655536] . Before creating new Chunk , fill blocks with blocks you need, where you need, using this to set block: blocks[blockXPos <<11 | blockZPos << 7 | blockYPos] = blockYouWantThere .
  15. Then create new IChunkProvider and copy everything from ChunkProviderGenerate . Go to provideChunk method and before =new Chunk line loop through blocks in Block[] ablock and replace ones that you want to mirror with mirrored version. Also, don't forget to change metadata if needed ( byte[] abyte is metadata).
  16. Do you mean looks exactly the same with how it was generated? Or player built stuff must be mirrored too? First one is very easy - follow any dimension creation tutorial, to the point where you created world provider. Done. In short: do not override any world gen methods in your world provider. Second one - a bit harder, but possible.
  17. I succesfully did it! And it is pretty easy actually. Here's little tutorial of how to add eclipse's linked sources to gradle: -Now open build.gradle file of project. -In dependencies add compile files("linkedSourceClassFilesDir"){ builtBy 'compile' } and replace linkedSourceClassFilesDir with folder containing compiled class files of linked source. In case when linked source is another mod, they are in modDir/bin . In my case, it is C:/my/mcmodding/mods/excore/1.7.10/bin . -Somewhere else in build.gradle (in the end, or just below dependencies ) add this line: task compile {} . -How does this work? --In dependiencies you tell gradle, to take files in linkedSourceClassFilesDir and compile them by running task compile -- task compile line is compile task itself which is going to be run to compile files. --But because we take already compiled class files, there's no need of doing anything with them. That's why task compile is empty. -Here's example of what you should end up with: dependencies { compile files("C:/my/mcmodding/mods/excore/1.7.10/bin"){ builtBy 'compile' } } task compile {} Thanks for help everybody!
  18. First of all, coremod has classes, that my mods use to interact with each other in case they are installed. Second of all, coremod is a mod and not just common classes, as for their functionality it has to setup things at runtime. So i cannot use shading, because if i use it - minecraft will just crash, because new mod1.lib.CommonClass() is not new mod2.lib.CommonClass() . I'll try to google for other solutions myself, but anymore ideas?
  19. I understand that, but how can i say to gradle "grab more class files there"? Or i could use shaded jar method, but i don't know how to do this either.
  20. Now, i'm successfully overwriting heights and height variations. I also can, conrtol which biomes are generated at location, by groups (Ocean, Mushroom island, Hot, Warm, Cool, Cold). But that's not precisely enough for me. I'm guessing that lakes are generated in either BiomeGenBase.genTerrainBlocks or in IChunkProvider.populate. But still haven't found exactly... Also, i think that oceans are filled in BiomeGenBase.genTerrainBlocks. So there's no easy way to ovewrite that easily... Or is there? I'm still open to suggestions and help!
  21. Hello, today i met some problems with building my mod: My mod depends on core mod, which is developped in different workspace. For ease of changing core mods' code, i link core mods' src/main/java to project using linkied sources. When i try to build my mod, i get this in console: C:\my\mcmodding\mods\Colourful-Blocks>gradlew build **************************** Powered By MCP: http://modcoderpack.com/ Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs MCP Data version : unknown **************************** :compileApiJava UP-TO-DATE :processApiResources UP-TO-DATE :apiClasses UP-TO-DATE :sourceMainJava UP-TO-DATE :compileJava warning: [options] bootstrap class path not set in conjunction with -source 1.6 C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:37: error: cannot fin d symbol import code.elix_x.excore.utils.items.ItemStackStringTranslator; ^ symbol: class ItemStackStringTranslator location: package code.elix_x.excore.utils.items C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:39: error: package co de.elix_x.excore.utils.recipes does not exist import code.elix_x.excore.utils.recipes.RecipeStringTranslator; ^ C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\tool\ColoringToolsManager.java:17: error: package code.elix_ x.excore.utils.recipes does not exist import code.elix_x.excore.utils.recipes.RecipeStringTranslator; ^ C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\ColourfulBlocksBase.java:37: error: cannot find symbol @Mod(modid = ColourfulBlocksBase.MODID, name = ColourfulBlocksBase.NAME, version = ColourfulBlocksBase.VERSION, dependencies = "required-after:" + EXCore.DEPEND ENCY) ^ symbol: variable DEPENDENCY location: class EXCore C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\ColourfulBlocksManager.java:65: error: cannot find symbol return rgba.argb(); ^ symbol: method argb() location: variable rgba of type RGBA C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:101: error: cannot fi nd symbol brushesNew.materials.add(new GsonMateria lConversion(oldBrush.name, oldBrush.durability, oldBrush.buffer, oldBrush.color, RECIPENAMEVANILLA, new GsonConversionRecipeEntry(RECIPEENTRYMATERIAL, oldBrush. ingredient.replace("oredictionary:", ItemStackStringTranslator.OREDICT + ":")))) ; ^ symbol: variable ItemStackStringTranslator location: class ColoringMaterialsManager C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:238: error: method av erage in class AdvancedMathUtils cannot be applied to given types; int r = AdvancedMathUtils.average(red[0] , ArrayUtils.subarray(red, 1, red.length)); ^ required: double,double[] found: int,int[] reason: varargs mismatch; int[] cannot be converted to double C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:239: error: method av erage in class AdvancedMathUtils cannot be applied to given types; int g = AdvancedMathUtils.average(green[ 0], ArrayUtils.subarray(green, 1, green.length)); ^ required: double,double[] found: int,int[] reason: varargs mismatch; int[] cannot be converted to double C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:240: error: method av erage in class AdvancedMathUtils cannot be applied to given types; int b = AdvancedMathUtils.average(blue[0 ], ArrayUtils.subarray(blue, 1, blue.length)); ^ required: double,double[] found: int,int[] reason: varargs mismatch; int[] cannot be converted to double C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:241: error: no suitab le constructor found for RGBA(int,int,int) color = new RGBA(r, g, b); ^ constructor RGBA.RGBA() is not applicable (actual and formal argument lists differ in length) constructor RGBA.RGBA(int,int,int,int) is not applicable (actual and formal argument lists differ in length) C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:292: error: cannot fi nd symbol conversion.materials.add(new GsonMaterialConvers ion(mat.name(), mat.getMaxUses(), mat.getHarvestLevel(), FMLCommonHandler.instan ce().getSide() == Side.CLIENT ? recognizeColorToString(mat) : "0:0:0", RECIPENAM EVANILLA, new GsonConversionRecipeEntry(RECIPEENTRYMATERIAL, ItemStackStringTran slator.toString(recognizeRepairItem(mat))))); ^ symbol: variable ItemStackStringTranslator location: class ColoringMaterialsManager C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:320: error: cannot fi nd symbol new GsonRecipeConversion(RECIPET YPEBRUSH, RecipeStringTranslator.toString(map, " #", " % ", "$ ", '#', Blocks. wool, '%', RECIPEENTRYMATERIAL, '$', "stickWood")) ^ symbol: variable RecipeStringTranslator location: class ColoringMaterialsManager C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:415: error: cannot fi nd symbol if(ItemS tackStringTranslator.isValidItemstack(ing.value)){ ^ symbol: variable ItemStackStringTranslator location: class ColoringMaterialsManager C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:416: error: cannot fi nd symbol RGBA rgba = recognizeColorToRGBA(ItemStackStringTranslator.fromString(ing.value) ); ^ symbol: variable ItemStackStringTranslator location: class ColoringMaterialsManager C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:422: error: method av erage in class AdvancedMathUtils cannot be applied to given types; mat.color = Adva ncedMathUtils.average(r[0], ArrayUtils.subarray(r, 1, r.length)) + ":" + Advance dMathUtils.average(g[0], ArrayUtils.subarray(g, 1, g.length)) + ":" + AdvancedMa thUtils.average(b[0], ArrayUtils.subarray(b, 1, b.length)); ^ required: double,double[] found: int,int[] reason: varargs mismatch; int[] cannot be converted to double C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:422: error: method av erage in class AdvancedMathUtils cannot be applied to given types; mat.color = Adva ncedMathUtils.average(r[0], ArrayUtils.subarray(r, 1, r.length)) + ":" + Advance dMathUtils.average(g[0], ArrayUtils.subarray(g, 1, g.length)) + ":" + AdvancedMa thUtils.average(b[0], ArrayUtils.subarray(b, 1, b.length)); ^ required: double,double[] found: int,int[] reason: varargs mismatch; int[] cannot be converted to double C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:422: error: method av erage in class AdvancedMathUtils cannot be applied to given types; mat.color = Adva ncedMathUtils.average(r[0], ArrayUtils.subarray(r, 1, r.length)) + ":" + Advance dMathUtils.average(g[0], ArrayUtils.subarray(g, 1, g.length)) + ":" + AdvancedMa thUtils.average(b[0], ArrayUtils.subarray(b, 1, b.length)); ^ required: double,double[] found: int,int[] reason: varargs mismatch; int[] cannot be converted to double C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:463: error: no suitab le constructor found for RGBA(int,int,int) material = new C oloringToolMaterial(mat.name, mat.durability, new RGBA(Integer.parseInt(s[0]), I nteger.parseInt(s[1]), Integer.parseInt(s[2])), mat.bufferMultiplier); ^ constructor RGBA.RGBA() is not applicable (actual and formal argument lists differ in length) constructor RGBA.RGBA(int,int,int,int) is not applicable (actual and formal argument lists differ in length) C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringMaterialsManager.java:470: error: cannot fi nd symbol map.put(r.name, ItemStac kStringTranslator.fromStringAdvanced(r.value)); ^ symbol: variable ItemStackStringTranslator location: class ColoringMaterialsManager C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringToolMaterial.java:20: error: no suitable co nstructor found for RGBA(int) this(n, d, new RGBA(h), b); ^ constructor RGBA.RGBA() is not applicable (actual and formal argument lists differ in length) constructor RGBA.RGBA(int,int,int,int) is not applicable (actual and formal argument lists differ in length) C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\material\ColoringToolMaterial.java:24: error: cannot find sy mbol return rgba.argb(); ^ symbol: method argb() location: variable rgba of type RGBA C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\tool\ColoringTool.java:284: error: cannot find symbol return getCurrentRGBA(itemstack).argb(); ^ symbol: method argb() location: class RGBA C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\color\tool\ColoringToolsManager.java:51: error: cannot find symbol GameRegistry.addRecipe(R ecipeStringTranslator.fromString(new ItemStack(item), e.getValue().getValue(), C oloringMaterialsManager.getRecipe(e.getValue().getKey(), provider.getRecipeType( )))); ^ symbol: variable RecipeStringTranslator location: class ColoringToolsManager C:\my\mcmodding\mods\Colourful-Blocks\build\sources\java\code\elix_x\coremods\co lourfulblocks\gui\GuiSelectColor.java:137: error: no suitable constructor found for RGBA(int,int,int) ColourfulBlocksBase.net.sendToServer(new ColorChangeMess age(new RGBA(r, g, b))); ^ constructor RGBA.RGBA() is not applicable (actual and formal argument lists differ in length) constructor RGBA.RGBA(int,int,int,int) is not applicable (actual and formal argument lists differ in length) Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 24 errors 1 warning :compileJava FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 13.467 secs C:\my\mcmodding\mods\Colourful-Blocks> Apearently, gradle does not read linked classes? What can i do to avoid that? Because when developping several mods simulatenously, and applying changes to core (because there's common classes), it will become very problematic syncing core code in multiple places... Thanks for help! If you have any questions - just ask!
  22. I fixed it! Problem was that configuration gives me array that it will save (and not copy of it as i thought). So when my utils replaced '_' to ' ' in this array, array without '_' was saved... So you have to copy it before applying any modifications to it. Thanks to everybody who helped!
  23. Following biome root height call hierarchy, i found that it's used in initNoiseField in ChunkProvider. So i completely deobfuscated it. I'm close to overriding heights, if i will manage to code it correctly...
  24. I have done some progress: completely deobfuscated initNoiseField method. Also now all fields and method names are deobfuscated...
  25. Hello everybody! Today, i met some problems with world generation: For my custom world type, here's what i'm trying to do: -Remove default rivers gen. -Remove default lakes gen. -Make so that in chunk, only some biomes can generate (Ex: i want so in chunk (15, 2) only biomes {coldTaiga, desert} can generate. And leave choice of which one exactly and where to generator). -Control average height (and height variations) of chunk (Ex: making average height of chunk with plains of 90, will make plains that are on height 92 (instead of 62)) (-"Manually fill oceans". But if 2 above are possible, then what is left is in oceanic biomes replace all air blocks from surface up to 62 with water.) And here's what i could and could not do: -I managed to remove rivers with custom GenLayers generator by removing gen layers responsible for rivers. -I can't find where lakes are generated. -I know that GenLayerBiomes is responsible for biomes, but i can't get chuk position from there (checked with printing to console arguments of getInts method of custom GenLayerBiomes). -I also cannot find place where chunk height is calculated/generated. Here are my classes related to world gen (gist messed up their order): https://gist.github.com/elix-x/4d28c4813c4064f82e00 To do what i want to, should i try to do this with gen layers, or should i try to use something else? Thanks for help! If you have any questions - just ask!
×
×
  • Create New...

Important Information

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