Posted August 14, 201510 yr I am trying to spawn a berry bush above ground level,which is I think 64 Y. but I dont know how any help?.
August 15, 201510 yr Use IWorldGenerator and GameRegistry.registerWorldGenerator to generate something in the world. You can use World#getTopSolidOrLiquidBlock to get the y coordinate of the highest solid block (excluding leaves) at the specified x and z coordinates (which is usually the ground). Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 15, 201510 yr Author I have attempted it a few times with no success. I know the basic of how it works I am having problem in creating the CLASS which the GameRegistry References in the Main class of the mod. Of course i am using IWorldGeneration as extending. But the code that i am writing inside is not correct doesn't matter how hard i think plus World getTopSolidOrLiquidBlock cannot be an int You'll understand if i post the code.
August 15, 201510 yr Author GameRegistry.registerWorldGenerator(new HarshNatureRegen()); I have error in this I've written this in Normal initilization. And this is the code of the Class itself. https://gist.github.com/anonymous/6122189b9ecd22efd6f5 Now I know there is a way of doing this in another way but I dont know if I should this is the other way using Case https://gist.github.com/anonymous/ea5442d9d65e72a7b8ff
August 15, 201510 yr Author From the Start to the red brackets The constructor WorldGenMinable(Block, int) is undefined (new WorldGenMinable(HarshNatureBlocks.BerryBush, 5)).generate(world, random, blockX, blockY, blockZ); for "Generate" The method generate(World, Random, BlockPos) in the type WorldGenMinable is not applicable for the arguments (World, Random, int, int, int)
August 15, 201510 yr From the Start to the red brackets The constructor WorldGenMinable(Block, int) is undefined (new WorldGenMinable(HarshNatureBlocks.BerryBush, 5)).generate(world, random, blockX, blockY, blockZ); for "Generate" The method generate(World, Random, BlockPos) in the type WorldGenMinable is not applicable for the arguments (World, Random, int, int, int) You're using the 1.7.10 method signatures, but they were changed in 1.8. If you look at the WorldGenMinable class, you'll see the new signatures for the constructor and the generate method. In 1.8, most Block and metadata method parameters were replaced with an IBlockState parameter and individual coordinate parameters were replaced with a BlockPos parameter. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 15, 201510 yr Author https://gist.github.com/anonymous/de993d247807b28b17b4 Got the regeneration to work,but one problem it seems I can't manage to make us so it will spawn above ground,Not at the sky... On ground
August 16, 201510 yr https://gist.github.com/anonymous/de993d247807b28b17b4 Got the regeneration to work,but one problem it seems I can't manage to make us so it will spawn above ground,Not at the sky... On ground WorldGenMinable is designed for replacing a terrain block (e.g. stone) with another block (e.g. ore), but your bushes are supposed to generate on top of the ground rather than in it or in the air. I'd recommend looking at WorldGenTallGrass to see how it determines where the ground level is and then generates on top of it. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 16, 201510 yr Author Now I've checked WorldGenTallGrass and I know i'm suppose to pass an EnumType. But i am not sure what to write inside...You'll understand in line 48 https://gist.github.com/anonymous/ec147ae3650d84d95800
August 16, 201510 yr WorldGenTallGrass only works with Blocks.tall_grass . I meant for you to look at the class to see how it chooses the generation position rather than use the class itself. In future, please give your Gist files the appropriate file extension (.java for Java code) so syntax highlighting works. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 16, 201510 yr Author We'll I've tried a few things... 1.Line 48 https://gist.github.com/anonymous/fdc3d4a47dd6535b2e69 In a world that I have already opened there are chunks not being loaded(a giant hole in earth) When i open a new world i get his error https://gist.github.com/anonymous/67abb6ba4c186036b6d9 Block.tallgrass does not work at all,give me the error which the constructor is undefined. Now the boolean of the generate in the WorldGenTallGrass uses the same of World random Blockpos. But I've understood how it generates,its a boolean returning true or false.. It looks for the block pos if its not in air and does not have leaves it breaks the method. I know how it generates but Still no clue what to pass in,What to write,I know this is not a tutorial of some sort but explain to me slowly what to do
August 17, 201510 yr Author Then what should I do?. My berry bush is a block,if WorldGenTallGrass wont generate it then what should I use... I though of WorldGenFlowers but my block needs to be a flower type....
August 17, 201510 yr Then what should I do?. My berry bush is a block,if WorldGenTallGrass wont generate it then what should I use... I though of WorldGenFlowers but my block needs to be a flower type.... Use the same logic as WorldGenTallGrass does for finding the ground level, then generate your block instead of tall grass. WorldGenTallGrass#generate is called from BiomeDecorator#genDecorations , you can trace the call locations from there to see how the initial position is determined. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 17, 201510 yr Author Everything went smootly except one thing https://gist.github.com/anonymous/abdfd33a08c3774ddc37 I dont know what to pass in the new WorldGenTallGrass() Everything i try gives off an error,I went to the class WorldGenTallGrass and it tells me to fill in BlockTallGrass.EnumType
August 17, 201510 yr Everything went smootly except one thing https://gist.github.com/anonymous/abdfd33a08c3774ddc37 I dont know what to pass in the new WorldGenTallGrass() Everything i try gives off an error,I went to the class WorldGenTallGrass and it tells me to fill in BlockTallGrass.EnumType Like I've tried to tell you several times: don't use the WorldGenTallGrass class (because it can't be used to generate your block), adapt the logic from its generate method into your own class. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
August 17, 201510 yr Author I understood what Im suppose to do but I dont know what to write..go step by step and let me understand whats going on now dont give me the "Learn Java" shit,I dont know what you think but its not a day proccess. And I started the other day and i'm not going to freeze my mod untill I know Java fully...
August 17, 201510 yr Author I did not ask for a copy paste,I asked to help me understand is that too hard for you darling?
August 17, 201510 yr Author We'll now I do. Here is what I made so far https://gist.github.com/anonymous/2e52e08c2813d84f5e46 I am attempting to make a berry bush spawn on ground biome doesn't matter
August 17, 201510 yr Author We're you reffering the first or the second https://gist.github.com/anonymous/d91cd976fe264a8d49a6
August 17, 201510 yr Author When you says the vanilla uses in that class, what part did you mean the first or the seocnd?
August 18, 201510 yr Author Ey ey Fuck you too. Do you think that I'll be lazy with a problem that I am stuck with 72 hours?... Yes I did try looked every where can't find 1 block who uses the WorldGenTallGrass.. Even looked at fucking Tall Grass..
August 18, 201510 yr Ey ey Fuck you too. Do you think that I'll be lazy with a problem that I am stuck with 72 hours?... Yes I did try looked every where can't find 1 block who uses the WorldGenTallGrass.. Even looked at fucking Tall Grass.. 1.7.10 is no longer supported by forge, you are on your own.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.