Jump to content

Anarchysage

Members
  • Posts

    29
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Anarchysage's Achievements

Tree Puncher

Tree Puncher (2/8)

-1

Reputation

  1. True but regardless i do this for fun, not money otherwise i would learn full java List, thanks ill look into that
  2. Probbally but i have no interest in java outside of mc modding. Ok then explain better, i understand the first point, its just resetting over it, so how do i fix it, give each block its own generate block?
  3. Learning, two, i need to split the files up dont i then, its gonna use the same varible of WorldGenMineable cause thats a base mc class no?
  4. so what? each one should have its own class to generate from? oh god, i get it, its from me using WorldGenMinable repeated over and over
  5. So i have made marble generate in the world, which does fine. I wanted to add granite, andesite and diorite to 1.7.10, but its not behaving right... My marble generates in stone, and when i had these set to stone only, they didnt spawn much(compared to marble) package com.vanityblocks.WorldGen; import java.util.Random; import net.minecraft.init.Blocks; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import com.vanityblocks.Storageprops; import com.vanityblocks.Registrations.VanityBlocksRegistration; import cpw.mods.fml.common.IWorldGenerator; public class GADWorldGen implements IWorldGenerator { public GADWorldGen(int par1) { Granite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldGraniteblock, 0, (Storageprops.gadvein), Blocks.stone); Granite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldGraniteblock, 0, (Storageprops.gadvein), Blocks.dirt); Granite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldGraniteblock, 0, (Storageprops.gadvein), Blocks.gravel); Diorite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldDioriteblock, 0, (Storageprops.gadvein), Blocks.stone); Diorite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldDioriteblock, 0, (Storageprops.gadvein), Blocks.dirt); Diorite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldDioriteblock, 0, (Storageprops.gadvein), Blocks.sand); Andesite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldAndesiteblock, 0, (Storageprops.gadvein), Blocks.stone); Andesite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldAndesiteblock, 0, (Storageprops.gadvein), Blocks.dirt); Andesite = new WorldGenMinable( VanityBlocksRegistration.VanityWorldAndesiteblock, 0, (Storageprops.gadvein), Blocks.gravel); } public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { if (Storageprops.enablediorite) { if (world.provider.dimensionId == 0) generateGraniteSurface(random, chunkX * 16, chunkZ * 16, world); generateDioriteSurface(random, chunkX * 16, chunkZ * 16, world); generateAndesiteSurface(random, chunkX * 16, chunkZ * 16, world); } } void generateGraniteSurface(Random random, int xChunk, int zChunk, World world) { int heightBand; int xPos, yPos, zPos; if (Storageprops.enablediorite) { for (int q = 0; q < (Storageprops.gadrarity); q++) { xPos = xChunk + random.nextInt(16); yPos = (Storageprops.gadheight) + random.nextInt(Storageprops.gadrange); zPos = zChunk + random.nextInt(16); Granite.generate(world, random, xPos, yPos, zPos); } } } void generateDioriteSurface(Random random, int xChunk, int zChunk, World world) { int heightBand; int xPos, yPos, zPos; if (Storageprops.enablediorite) { for (int q = 0; q < (Storageprops.gadrarity); q++) { xPos = xChunk + random.nextInt(16); yPos = (Storageprops.gadheight) + random.nextInt(Storageprops.gadrange); zPos = zChunk + random.nextInt(16); Diorite.generate(world, random, xPos, yPos, zPos); } } } void generateAndesiteSurface(Random random, int xChunk, int zChunk, World world) { int heightBand; int xPos, yPos, zPos; if (Storageprops.enablediorite) { for (int q = 0; q < (Storageprops.gadrarity); q++) { xPos = xChunk + random.nextInt(16); yPos = (Storageprops.gadheight) + random.nextInt(Storageprops.gadrange); zPos = zChunk + random.nextInt(16); Andesite.generate(world, random, xPos, yPos, zPos); } } } WorldGenMinable Granite; WorldGenMinable Diorite; WorldGenMinable Andesite; } // } So i thought to make them spawn in the other blocks(sand, stone, gravel, dirt). Is there something im doing wrong with it, cause they dont spawn much
  6. Thanks, that worked, thanks for not being rude and helping, #minecraftforge tends to be rude package com.vanityblocks.Registrations; import com.vanityblocks.Storageprops; import com.vanityblocks.Items.oredictionarybook; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import cpw.mods.fml.common.registry.GameRegistry; public class OreDictionaryBypass { public static Item oredictionarybook; public static void bypassrecipes() { // Registers the Item itself and recipe for item oredictionarybook = new oredictionarybook(Storageprops.oredictionarybook - 256); GameRegistry.registerItem(oredictionarybook, "oredictionarybook"); GameRegistry.addRecipe(new ItemStack(oredictionarybook, 1), "xyx", "yzy", "xyx", 'x', Items.iron_ingot, 'y', Items.emerald, 'z', Items.book); //Attempt to fix this..... // testing purposes //OreDictionary.registerOre("ingotTin", new ItemStack( // Items.paper)); if (!OreDictionary.getOres("ingotTin").isEmpty()) { ItemStack tiningot; tiningot = OreDictionary.getOres("ingotTin").get(0); ItemStack result = tiningot.copy(); result.stackSize = 1; //GameRegistry.addRecipe(new ShapedOreRecipe(result, " x ", "xyx", " x ", 'x', // "ingotTin", 'y', oredictionarybook )); GameRegistry.addRecipe(new ShapelessOreRecipe(result, "ingotTin", oredictionarybook )); } } } So for anyone who needs it, theres the code, it uses "result" to define itemstack count, and shapeless and shaped recipe
  7. think i may have got it, gonna build it and see, off topic question, is it possible to have another prebuilt mod in my dev enviroment so i can test this without building?
  8. if (!OreDictionary.getOres("ingotTin").isEmpty()) { // testing purposes OreDictionary.registerOre("ingotTin", new ItemStack( Items.paper)); ItemStack tiningot; tiningot = OreDictionary.getOres("ingotTin").get(0); ItemStack result = tiningot.copy(); result.stackSize = 1; GameRegistry.addRecipe(new ShapedOreRecipe(tiningot)); GameRegistry.addShapedRecipe(tiningot, " x ", "xyx", " x ", 'x', "ingotTin", 'y', oredictionarybook ); } Thats what i did, no errors but doesnt work so i changed to this if (!OreDictionary.getOres("ingotTin").isEmpty()) { // testing purposes OreDictionary.registerOre("ingotTin", new ItemStack( Items.paper)); ItemStack tiningot; tiningot = OreDictionary.getOres("ingotTin").get(0); ItemStack result = tiningot.copy(); result.stackSize = 1; //GameRegistry.addRecipe(new ShapedOreRecipe(tiningot)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(tiningot)," x ", "xyx", " x ", 'x', "ingotTin", 'y', oredictionarybook )); GameRegistry.addRecipe(new ShapedOreRecipe(tiningot)); //GameRegistry.addShapedRecipe(tiningot, " x ", "xyx", " x ", 'x', // "ingotTin", 'y', oredictionarybook ); } and i get this error Description Resource Path Location Type The constructor ItemStack(ItemStack) is undefined OreDictionaryBypass.java /Minecraft/src/main/java/com/vanityblocks/Registrations line 33 Java Problem
  9. Thanks for the answer, but do you mind showing me an example, i tend to learn easier when i can read it and see how it works
  10. So way back in the days of 1.4.X, freind helped me with this code, however i need to alter it and i cant get it to work. So basically making an item when crafting with a "ingotTin"(intend to do this code for all the ingots(modpack i use and know alot of people use, spawns different ingots in dungeons)), and it wont resolve and im not a perfect modder but im trying. Anyways, its 1.7.10(yes i know old, dont care, not updating till all favorite mods come out, plus, slowly converting blocks to 1.9 in different dev). This is the original code that allows any ingotTin to craft into my blockTin and back into first registered ingotTin if (Storageprops.enabletin) { if (!OreDictionary.getOres("ingotTin").isEmpty()) { GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack( StorageBlockMod, 1, 0), "xxx", "xxx", "xxx", 'x', "ingotTin")); ItemStack tiningot; tiningot = OreDictionary.getOres("ingotTin").get(0); ItemStack result = tiningot.copy(); result.stackSize = 9; GameRegistry.addShapelessRecipe(result, new ItemStack( StorageBlockMod, 1, 0)); if (Storageprops.gregtechcompat) { OreDictionary.registerOre("blockTin", new ItemStack( StorageBlockMod, 1, 0)); } } } This is the one im trying to make work. public static void bypassrecipes() { // Registers the Item itself and recipe for item oredictionarybook = new oredictionarybook(Storageprops.oredictionarybook - 256); GameRegistry.registerItem(oredictionarybook, "oredictionarybook"); GameRegistry.addRecipe(new ItemStack(oredictionarybook, 1), "xxx", "xyx", "xxx", 'x', Items.iron_ingot, 'y', Items.emerald); //Attempt to fix this..... if (!OreDictionary.getOres("ingotTin").isEmpty()) { //GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack( // StorageBlockMod, 1, 0), "xxx", "xxx", "xxx", 'x', // "ingotTin")); ItemStack tiningot; tiningot = OreDictionary.getOres("ingotTin").get(0); ItemStack result = tiningot.copy(); result.stackSize = 1; GameRegistry.addRecipe(new ShapedOreRecipe(result), " x ", "xyx", " x ", 'x', "ingotTin", 'y', oredictionarybook ); //GameRegistry.addShapelessRecipe(result, new ItemStack( // StorageBlockMod, 1, 0)); //GameRegistry.addShapelessRecipe(new ShapedOreRecipe(result), // new ItemStack(result), new ItemStack(oredictionarybook, 1, // OreDictionary.WILDCARD_VALUE)); } } And it gives me this error Description Resource Path Location Type The method addRecipe(ItemStack, Object...) in the type GameRegistry is not applicable for the arguments (ShapedOreRecipe, String, String, String, char, String, char, Item) OreDictionaryBypass.java /Minecraft/src/main/java/com/vanityblocks/Registrations line 32 Java Problem I, cant figure it out for the life of me.
  11. Oh i can garrentee its a mod doing it, it doesnt happen in my dev or non forge vannila, which log would you like?
  12. so, im having an error sometimes when i maximise my window on mc. And when this happens, it spams the crap out of the console, and the client wont respond, any help is appreciated. Thanks
×
×
  • Create New...

Important Information

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