Jump to content

winnetrie

Members
  • Posts

    408
  • Joined

  • Last visited

Everything posted by winnetrie

  1. There are mods that needs specific items and/or blocks from minecraft in their recipes. For example buildcraft requires a crafting table in a recipe for a certain block. How would i do it that it accepts my crafting tables too? I know i can make recipes for all combinations, but when we need to do this for all mods, that would be too much work? Can this be done using the oredictionary?
  2. buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } i guess i have to place something here, but i do not know what to write there. EDIT:nvm that was the wrong section, it works now
  3. I wanted to compile a new version of my mod and it fails to compile. In my modding environment everything works fine and eclipse isn't showing any errors, still it fails compiling. here is a picture: It says that it cant find symbol. The symbol is BOPCBlocks. This is a class in the API package from biomesoplenty!
  4. I did indeed created my own miner's delight and during the world generation where my blocks generates i replace all bop miner's delight with my own miner's delight. They look like the real 1, they do the same thing, only difference is that i can now place them on all my blocks. You can't find any original in the game anymore, except in chests, so i need to replace that too. After that you would only be able to get them via creative mode (the original) So using an event to intercept this all would be unnessecary. Just removing them from the game (world) is also an option. They aren't that important anyway. They are only needed to make 1 potion(Ambrosia)
  5. I do not understand what you are trying to tell me or perhaps you were talking to Elix ? Where you get that number 35 from? 65 + 100 = 165 i think I don't want to make mountains bigger (not at all), nor do i want to go above the 256 blocks. If you know the mod "terrafirmacraft", that's a good example. But nevermind, i think it would be a bad idea anyway.
  6. What i want to achieve is to raise the terrain generation level for about 100 blocks, so i have a deeper world instead of the 65 blocks now. I also don't want to change much, existing terrain gens from minecraft and other mods should just continue to do what they are meant to do, with the difference that there is like 100 blocks more underneath it. The reason why is. I want to create layers of stone (3-4) and a height of 65 isn't satisfying enough.
  7. There is a method called quantityDropped. You need to Override it with your own value for example: @Override public int quantityDropped(Random rand){ return 2 + rand.nextInt(2); }
  8. I have found a solution for this. in the worldgeneration i replace all those blocks with my blocks. I think this is the closest solution i can get. Any recipe containing those blocks/items has to be changed too EDIT: Or i can just simply not change the stone block under the minersdelight
  9. what about addSubstitutionAlias? Is that not an option?
  10. Ok, now i'm really confused... When i say "nothing i can do then" you say "this is not true" But when i ask how to change/replace it , you say "you can't" Asking the modowner for more support is just the same as "nothing i can do" , because like you said, it's unlikely they do that for an outdated version! Image you would do this for your mod. How would you solve this? There have to be something else !
  11. Alright i have tried this now: GameRegistry.registerBlock(BOPCBlocks.flowers2 = new BlockBOPFlower2Override().setBlockName("flowers2"),ItemBlockBOPFlower2Override.class, "flowers2"); This works all fine. It does what it needs to do, it's just a copy of the original and i can place the minersdelight on my stones! But it adds it to the game and not replacing it. So how do i replace it now?
  12. Ok thnx for the tip My native language is not English, but i guess you already know this. About that API thing, the mod i use with my mod is Biomes O' Plenty and i see there is a package called API. Is this what i need? If so how do i use it?
  13. Ok i guess , nothing i can do then. Too bad! If it was "return block instanceof BlockStone" instead of "return block= Blocks.stone" it would be compatible with my stone. I don't think the mod owner is going to change this. Why would he/she? So the only thing i can think now is to replace all miner's delight with airblocks, or just let them be for what it is now and maybe a player can still find them before they despawn.
  14. srry but i have no idea what that means. Can you explain it more please? I have found something about reflection "ReflectionHelper.findMethod()". If i understand it right i can use this to find a specific method and pass it to a variable. But i have no idea how to use it or how to replace it with my own method. It would be much better if everyone would start using "instanceof"
  15. I want to override a method from a class from an other mod. Or with better words: i want to replace that method with mine: this: @Override public boolean isValidPosition(World world, int x, int y, int z, int metadata) { Block block = world.getBlock(x, y - 1, z); switch (metadata) { case 2: // Burning Blossom return block == Blocks.netherrack || block == BOPCBlocks.overgrownNetherrack; case 6: // Miner's Delight return block == Blocks.stone case 8: // Rose return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block == BOPCBlocks.longGrass || block == BOPCBlocks.overgrownNetherrack || block == BOPCBlocks.originGrass || block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this); default: return block == Blocks.grass || block == Blocks.dirt || block == Blocks.farmland || block == BOPCBlocks.longGrass || block == BOPCBlocks.overgrownNetherrack || block.canSustainPlant(world, x, y - 1, z, ForgeDirection.UP, this); } } the miners delight can only stay on stone blocks and i want to change that so it can also stay on my blocks. The reason why is those plants do not stay on my blocks (they pop off) and eventually they will despawn So maybe i can override that method with mine (same method only with more options) I do not know where to start and if it's possble either.
  16. AAAH yes now i understand it. So i can only remove from that list while iterating but not adding. To add something to the drop i now have this: public class TemDrops { @SubscribeEvent public void Temloot(HarvestDropsEvent event) { Block block = event.block; if (block instanceof BlockLeaves){ event.drops.add(new ItemStack(Items.potato)); } } } I didn't had a need to remove something but i was wondering how to. It is ennoying not to know. And yes i really need to study more java, i know!
  17. I have this now: public class TemDrops { @SubscribeEvent public void Temloot(HarvestDropsEvent event) { System.out.println("TEST TEST TESTertje"); Iterator<ItemStack> Leash = event.drops.iterator(); while (Leash.hasNext()) { Block block= event.block; ItemStack is = Leash.next(); if (block != Blocks.leaves) { System.out.println("nothing"); } else{ System.out.println("leaves!!"); event.drops.add(new ItemStack(Items.potato)); } } } } But this isn't working at all and it makes minecraft crash if the 'else' statement triggers.
  18. Could i have some help plz, how to do it right?
  19. I have it working now. I tried something else: public class TemDrops { @SubscribeEvent public void Temloot(BlockEvent.BreakEvent e) { Block block =e.block; if ( block instanceof BlockLeaves) { Random r = new Random(); if ( r.nextFloat() < 0.2F){ EntityItem i = new EntityItem(e.world, e.x, e.y, e.z, new ItemStack(Items.stick)); System.out.println("TEST TEST TESTertje"); e.world.spawnEntityInWorld(i); } } } } I have seen a page "jabelar's minecraft forge tutorials"(lot's of information there!! ). There the autor says on his page to use breakevent instead of harvestevent to get a drop from blocks like leaves. So the registering was done but my method wasn't right. I now have made a better 1 with some help ofc. While this method adds a drop, i was wondering how i would remove a drop. I also made it check an instance of BlockLeaves. EDIT: Oh btw leaves DO drop the sticks in creative mode, but only the sticks. Maybe i need to make a check if the player is in creative mode or not. Does it matter anyway?
  20. It seems (for me) the registering isn't done. I placed on multiple line in my TemDrops.class the system.out.println("TEST TEST TEST"); and none of these are showing up. I'm aware of the creative mode thing.
  21. Yeah that was the first thing i tried, but it didn't do anything i registered it in my CommonProxy class like this: public void init(FMLInitializationEvent event) { TemRecipes.init(); if(Loader.isModLoaded("BiomesOPlenty")){ BOPAddonRecipes.init(); } MinecraftForge.EVENT_BUS.register(new TemDrops()); // GameRegistry.registerWorldGenerator(new TemChunkGenerator(), 1); GameRegistry.registerWorldGenerator(new ChalkStoneGenerator(), 10); } So i guess there is something wrong with the TemDrops.class itself
  22. I'm looking for something i can remove/add drop(s) of an existing block. I found some information on forums but nothing like that was working, so i tried something myself: I made a new class for this and i do not even know if this is right. If it is right, how do i register this? public class TemDrops { @SubscribeEvent public void Temloot(BlockEvent.HarvestDropsEvent event) { List<ItemStack> loot = event.drops; Iterator<ItemStack> Leash = loot.iterator(); while (Leash.hasNext()) { ItemStack is = Leash.next(); if (is != null && is.getItem() == Item.getItemFromBlock(Blocks.leaves)) { ((List<ItemStack>) Leash).add(new ItemStack(Items.potato)); } } } }
  23. I'm not sure is this is the right place to write this, if not my apologies. There are many mods that adds alot of stuff to minecraft. Alot of those added things are very useless in my opinion. For example ORES! I also want to add some extra ores, not too many, just a few (2-4) to add more fun, but they have to be usefull. Let's say i add copper and tin and bronze. Where copper and tin are equal to eachother, bronze a bit better then those and iron better then bronze. The chance a player will craft copper/tin or bronze will be less likely because there is enough iron and iron is better. The question is, how do i make it usefull? How would i force the player to ise copper and bronze?
  24. I tried that too (before posting), still the same And You are wrong anyway the tooltip says this: Parameters: generator the generator modGenerationWeight a weight to assign to this generator. Heavy weights tend to sink to the bottom of list of world generators (i.e. they run later) EDIT: It doesn't matter how many weight i give to both, ChalkStoneGenerator ALWAYS happen first. I don't understand why. EDIT2: I made a check in my oregenerator in the chalkstonegenerator.class: public void generateOre(Block block, World world, Random random, int meta, int chunkX, int chunkZ, int minVienSize, int maxVienSize, int chance, int minY, int maxY, Block generateIn){ int vienSize = minVienSize + random.nextInt(maxVienSize - minVienSize); int heightRange = maxY - minY + 1; WorldGenMinable gen = new WorldGenMinable(block, meta, vienSize, generateIn); for(int i =0; i < chance; i++){ int xRand = chunkX * 16 + random.nextInt(16); int yRand = random.nextInt(heightRange) + minY; int zRand = chunkZ * 16 + random.nextInt(16); Block testblock = world.getBlock(xRand, yRand, zRand); if (testblock==Blocks.stone){ gen.generate(world, random , xRand, yRand, zRand); } } } So now i check for the targetblock (where the "ore" should spawn) if it is a stone block. If so then generate the "ore". So while this seems to "fix" it, i think it is still weird because it already checks for stone blocks with the var generateIn. Why making another check makes it working?
  25. Ok I did what you said( i think) and gave the chalkstone gen heavy weight ( 1000), but it still spawns before the other gen public void init(FMLInitializationEvent event) { TemRecipes.init(); if(Loader.isModLoaded("BiomesOPlenty")){ BOPAddonRecipes.init(); } //MinecraftForge.EVENT_BUS.register(new TemChunkOverider()); GameRegistry.registerWorldGenerator(new TemChunkGenerator(), 1); GameRegistry.registerWorldGenerator(new ChalkStoneGenerator(), 1000); }
×
×
  • Create New...

Important Information

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