• 0

    posted a message on Any idea how to add music to the music sound pool?
    Just want to add some background music that will play randomly along with the regular music. Any thoughts?
    Posted in: Modification Development
  • 0

    posted a message on Mod Dungeon (Modding Team) RECRUITING NEW MEMBERS
    Quote from Wilf

    Oops i forgot to add that, are you interested in a role?

    Thanks for pointing that out, i added Sound Designers to the roles


    Sure :D I could use the experience, I'm 18, I know Ableton Live inside and out, I'm attending Full Sail University online for a Bachelors of Science in Music Production, and my skype is noobfly76. Also, if you would like to listen to some stuff I've messed around with, I've got two soundclouds. Number one: https://soundcloud.com/all-shall-obey and I'll send you the second one in a message, I'm keeping it a secret for personal reasons.
    Posted in: Mods Discussion
  • 0

    posted a message on Mod Dungeon (Modding Team) RECRUITING NEW MEMBERS
    What about music and/or sound effects? :D
    Posted in: Mods Discussion
  • 0

    posted a message on Height specific mob spawning? What do?
    Quote from StormTiberius

    // This makes bat to spawn only below sea level.
    @ForgeSubscribe
    public void mobypos(CheckSpawn event)
    {
    if (event.entityLiving.getEntityName().equals("Bat") && event.entityLiving.posY > 63)
    {
    event.setResult(Event.Result.DENY);
    }
    }


    ... and dont forget to register the event...

    MinecraftForge.EVENT_BUS.register(new YourJavaFile());



    Sweet thanks :D Could I do something similar to this to check the block it's spawning on? So it would only spawn on a certain block?
    Posted in: Modification Development
  • 0

    posted a message on Height specific mob spawning? What do?
    So basically what I would like to do is check the Y value of the world, and then add a mob to a spawn list. I've already tried this a few ways, it'd be great to get some ideas that I haven't tried yet. Hopefully one will work. :D
    Posted in: Modification Development
  • 0

    posted a message on Odd generation behavior... anyone else experiencing this?
    Quote from TheRedHun1

    That is your problem, you defined at the top of the class before the function. Meaning that it runs it once and it only uses those single generated coordinates meaning the function uses the same coordinates over and over again.

    Putting it in the function generates new coordinates each and every time it is run meaning different location each time.


    OH I SEE! I just used the random.nextInt as the coordinate instead of doing the whole variable thing to make things less complicated. It works flawlessly. Thanks!
    Posted in: Modification Development
  • 0

    posted a message on Odd generation behavior... anyone else experiencing this?
    Quote from TheRedHun1

    Your issue from what I can see is the way your obtaining your coordinates:

    if (world.getBiomeGenForCoords(xPos, zPos) == mod_Nether.blazingwoodlands)
    {
    for (int i = 0; i < 10; i++)
    {
    (new WorldGenNetherTrees(false, 8, 0, 0)).generate(world, random, xPos, yPos, zPos);
    }
    }


    Your saying here to basically get x, y coordinates check if they work then spawn them 10 times at those coordinates, put in a 3 lines of code that get the random xPos1 yPos1 and zPos1 that get the random coordinate and change (world, random, xPos, yPos, zPos) to
    (world, random, xPos1, yPos1, zPos1) so your code should now look something like this.

    if (world.getBiomeGenForCoords(xPos, zPos) == mod_Nether.blazingwoodlands)
    {
    for (int i = 0; i < 10; i++)
    {
    int xPos1 = generateSomeRandomNumber;
    int yPos1 = generateSomeRandomNumber;
    int zPos1 = generateSomeRandomNumber;
    (new WorldGenNetherTrees(false, 8, 0, 0)).generate(world, random, xPos1, yPos1, zPos1);
    }


    This way, each time it runs the for loop it gets new coordinates.


    I've already defined the variables this way. That bits at the top of the class. :/

      int xPos = chunkX + random.nextInt(16);
      int yPos = random.nextInt(128);
      int zPos = chunkZ + random.nextInt(16);
    Quote from Johnmschneider

    Yeah, the exact same thing is happening to me. I posted another topic recently about this. I'm trying to make a tree, but only one really dense cluster of them will generate, all in the same chunk.


    In the same chunk or in the same coordinate? Like, when a tree generates for me, it's one coordinate, and generates 10 trees, so it ends up just being a cube of leaves on top of a wooden stick. I know this because if I change it to 1 instead of 10, it looks like a normal tree.
    Posted in: Modification Development
  • 0

    posted a message on Dyes real names
    Quote from Thunder_Strike

    I need to know what the real names for the dyes in the game are because im trying to create a game using the plugin magic spells, but I cant figure out how to call items with damage values.


    ItemDye or Item.dyePowder or ID 95. All the dyes are in one class, and are metadatas of ItemDye. What exactly are you trying to do again?
    Posted in: Modification Development
  • 0

    posted a message on Sound Error "Exception in thread 'Thread- 10'"
    So guys, have you tried installing the sound? :P

    public class SoundManager {
    
    @SideOnly(Side.CLIENT)
    
    @PreInit
    public void PreInit(FMLPreInitializationEvent event) {
    
    //Registers the sound manager!
    MinecraftForge.EVENT_BUS.register(new SoundManager());
    
    //Installs the sound!
    Minecraft mc = ModLoader.getMinecraftInstance();
    
    mc.installResource("your/file/address.ogg",
    new File(mc.mcDataDir, "resources/your/file/address.ogg"));
    }
    }


    This class is completely independent, don't need no registering in the main mod file!

    Works in 1.5.2, should still work. Just copy/paste the mc.installResource method each time you want to add another sound.
    Posted in: Modification Development
  • 0

    posted a message on How do I go about putting recipes in a separate class? [FORGE]
    Quote from Azhdev

    you can do
    public static void loadRecipes(){
    GameRegistry.addRecipe(new itemStack(ëxample, 1), new Object[]{"ggg", "ggg", "ggg", 'g', Item.wheat.itemID});
    }

    and then in your main class
    @EventHandler
    public void Init(FMLInitializationEvent event) {
    	 items.loadRecipes();
    
    	
    }

    the first code must be in items in this case but you can change that


    What he said. I did mine this way, it works.
    Posted in: Modification Development
  • 0

    posted a message on Map takes too long to generate?
    ChunkProviders are a pain. I've been putting together a nether-styled one with biomes and top/filler blocks and features and all that. It just takes time and dedication. Lots and lots of dedication. ._. And help.
    Posted in: Modification Development
  • 0

    posted a message on Probably a noobish question...
    Poke around in the bed's files. Like TileEntityBed and what not. There's bound to be something in there.
    Posted in: Modification Development
  • 0

    posted a message on Odd generation behavior... anyone else experiencing this?
    So I have this world generator class.

    package teamoverhaul.netheroverhaul.world;
    import java.util.Random;
    import teamoverhaul.netheroverhaul.mod_Nether;
    import net.minecraft.block.Block;
    import net.minecraft.world.World;
    import net.minecraft.world.chunk.IChunkProvider;
    import net.minecraft.world.gen.feature.WorldGenFlowers;
    import net.minecraft.world.gen.feature.WorldGenMinable;
    import cpw.mods.fml.common.IWorldGenerator;
    public class WorldGeneratorNether implements IWorldGenerator
    {
    public World world;
    
    @Override
    public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
    {
      if (world.provider.dimensionId == -1)
      {
       generateNether(world, random, chunkX * 16, chunkZ * 16, chunkProvider, chunkX, chunkZ);
      }
    }
    
    public void generateNether(World world, Random random, int chunkX, int chunkZ, IChunkProvider par1IChunkProvider, int par2, int par3)
    {
      int xPos = chunkX + random.nextInt(16);
      int yPos = random.nextInt(128);
      int zPos = chunkZ + random.nextInt(16);
     
      for (int i = 0; i < 1; i++)
      {
      
       //Global generation (not biome specific)
      
       //Features
    		    (new WorldGenNetherLava(Block.lavaMoving.blockID, false)).generate(world, random, xPos, yPos, zPos);
    		 (new WorldGenNetherLakes(Block.lavaStill.blockID)).generate(world, random, xPos, yPos, zPos);
    		    (new WorldGenSoot()).generate(world, random, xPos, yPos, zPos);
    		    (new WorldGenGlowStone()).generate(world, random, xPos, yPos, zPos);
      }
    	   
      //Ore
      for (int i = 0; i < 4; i++)
      {
    		 (new WorldGenMinable(mod_Nether.oreNetherrack.blockID, 14, mod_Nether.hellStone.blockID)).generate(world, random, xPos, yPos, zPos);
      }
     
    	 for (int i = 0; i < 4; i++)
    	 {
    		 (new WorldGenMinable(mod_Nether.oreQuartz.blockID, 10, mod_Nether.hellStone.blockID)).generate(world, random, xPos, yPos, zPos);
    	 }
    	
      for (int i = 0; i < 4; i++)
      {
    		 (new WorldGenMinable(mod_Nether.oreDarkQuartz.blockID, 10, mod_Nether.hellStone.blockID)).generate(world, random, xPos, yPos, zPos);
      }
     
      for (int i = 0; i < 6; i++)
      {
    		 (new WorldGenMinable(mod_Nether.oreBrimstone.blockID, 7, mod_Nether.hellStone.blockID)).generate(world, random, xPos, random.nextInt(64), zPos);
      }
     
      for (int i = 0; i < 6; i++)
      {
    		 (new WorldGenMinable(mod_Nether.oreGarnet.blockID, 6, mod_Nether.hellStone.blockID)).generate(world, random, xPos, random.nextInt(40), zPos);
      }
     
      for (int i = 0; i < 8; i++)
      {
    		 (new WorldGenMinable(mod_Nether.oreGraphite.blockID, 3, mod_Nether.hellStone.blockID)).generate(world, random, xPos, random.nextInt(30), zPos);
      }
    		   
    	    //Biome specific generation
    	    //Blazing Woodlands
      if (world.getBiomeGenForCoords(xPos, zPos) == mod_Nether.blazingwoodlands)
      {
       for (int i = 0; i < 10; i++)
       {
        (new WorldGenNetherTrees(false, 8, 0, 0)).generate(world, random, xPos, yPos, zPos);
       }
      }
      
      //Shroomlands
      if (world.getBiomeGenForCoords(xPos, zPos) == mod_Nether.shroomlands)
      {
       for (int i = 0; i < 30; i++)
       {
        (new WorldGenGlowshroom()).generate(world, random, xPos, yPos, zPos);
       }
      
       for (int i = 0; i < 15; i++)
       {
        (new WorldGenFlowers(mod_Nether.glowShroom1.blockID)).generate(world, random, xPos, yPos, zPos);
       }
    		
       for (int i = 0; i < 15; i++)
       {
        (new WorldGenFlowers(mod_Nether.glowShroom2.blockID)).generate(world, random, xPos, yPos, zPos);
       }
      }
      
      //Wastelands
      if (world.getBiomeGenForCoords(xPos, zPos) == mod_Nether.wastelands)
      {
       for (int i = 0; i < 10; i++)
       {
        (new WorldGenMinable(Block.slowSand.blockID, 60, mod_Nether.soot.blockID)).generate(world, random, xPos, yPos, zPos);
        (new WorldGenMinable(Block.slowSand.blockID, 60, mod_Nether.hellSoil.blockID)).generate(world, random, xPos, yPos, zPos);
       }
      }
    }
    }


    Everything works, but for some reason it's getting one x, y coordinate each time it generates the number I've told it to generate, and generates multiples of whatever feature it's generating right over the top of the others. So like, if I have this:

       for (int i = 0; i < 10; i++)


    10 should be the number it tries to generate per chunk, right? Nope.

    Instead it gets a specific coordinate and generates 10 features in that coordinate. The result is very rare and ugly features. Anybody else have this problem? And if not, what am I doing wrong?
    Posted in: Modification Development
  • 0

    posted a message on How to use the tryToCreatePortal method?
    So basically I would like to check if the tryToCreatePortal method returns true, and then add spawns to the world. How would I do this?

    This is what I have, how would I check x y and z? I obviously want to return the portal's coords.

    public void addGhoulSpawnOnPortalActivate()
    {
      if (this.tryToCreatePortal(world, x?, y?, z?) == true);
      {
       EntityRegistry.addSpawn(teamoverhaul.netheroverhaul.entity.EntityGhoul.class, 50, 3, 8, EnumCreatureType.monster, BiomeGenBase.forest, BiomeGenBase.jungle, BiomeGenBase.forestHills, BiomeGenBase.jungleHills, BiomeGenBase.taiga, BiomeGenBase.taigaHills);
      }
    }
    Posted in: Modification Development
  • To post a comment, please or register a new account.