Jump to content

Dronus86

Members
  • Posts

    10
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Dronus86's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thanks! I'll browse your tutorials before I ask more questions, but it seems like you may have confirmed that I should be using events. Unfortunately, I don't actually fall into any of those categories - It's going to be based off of NBT in the ItemStack rather than whether or not the subject/object is vanilla or from a mod. And the goal is to be able to add this NBT to a variety of things, including vanilla objects and (hopefully) other mods objects. If any of that sounds crazy impossible, I'd be happy to hear why before I delve much deeper into this abyss.
  2. Dronus86

    Events

    I'm a little shaky on the events. I understand the concept well enough, but I don't know a lot of the specifics or standards. Is it possible to listen for 'any' in-game event, and then parse the events to only use what you need? I'm aware this isn't standard, but if it is possible, is it a Really Bad Idea? If so, why? Is there significant overhead when doing this? Thanks!
  3. Hello again! I'm hoping this is a simple question, and I'm just overlooking or misunderstanding or not thinking of something simple. It seems to be that to make a new enchantment, you have to give that enchantment an ID (below is the Enchantment.class code I'm talking about): protected Enchantment(int p_i1926_1_, int p_i1926_2_, EnumEnchantmentType p_i1926_3_) { this.effectId = p_i1926_1_; this.weight = p_i1926_2_; this.type = p_i1926_3_; if (enchantmentsList[p_i1926_1_] != null) { throw new IllegalArgumentException("Duplicate enchantment id! " + this.getClass() + " and " + enchantmentsList[p_i1926_1_].getClass() + " Enchantment ID:" + p_i1926_1_); } else { enchantmentsList[p_i1926_1_] = this; } } The list seems to be capped at 256, and while that's plenty, it's not quite large enough to be 99% sure your mod's enchantment ID won't conflict with anothers enchantment ID. Is there a .getNextID() I'm missing, or some way to determine a safe ID to use? Or do I need to browse around and hope my ID doesn't clash with another? Thanks!
  4. I ended up resolving it, I was trying to over-complicate my registration. It's good to know there is still a limit - that was something I was curious about regardless.
  5. Thanks. I think I was just getting frustrated with a problem and was looking for an easy out! That does clarify some things though.
  6. Some time ago (1.4.5?), I considered trying out modding and didn't follow through. My research gave me an understanding of metadata and item ids, and how there are a somewhat limited number of ids available, and metadata was useful in reducing the number of ids you used in addition to a variety other things. I just started to mess around with modding again in the past week, and I've been reviewing a variety of tutorials and guides as I've moved along. In addition, I've been browsing any open source mods I can, to get ideas about proper implementation (such as using metadata for items that are variations of a similar thing, like recoloring). This has got me wondering: Is there still an achievable limit on the number of items or blocks Minecraft can register? Since item IDs and block IDs no longer exist, is there any benefit to using item/block metadata to create multiple items/blocks, aside from lower line count and reduced code repetition? What if the items you want to create each interact significantly differently, even if they appear very similar? Would it be more intelligent to simple extend and expand on base class instead of trying to force these different items into one class? Thanks!
  7. LexManos, I am indeed a newbie to FML and somewhat to java/OOP, but I have non-java coding experience (mostly C), so I feel pretty good. Thanks for the heads up, I'll definitely look into that! And yeah, GeoffNukem, that is what I was talking about, but thanks for the suggestion anyway!
  8. I'm wondering if there's a way to override/remove parts of vanilla minecraft using forge. For a more poignant example, how would I halve the amount of gold ore that spawns? Or make gold ore only spawn ABOVE y=32? Or similar things? The only thing I can think of is to overwrite all the existing ore in each chunk and re-spawn it all according to my rules, but that seems clumsy and messy.
  9. Damn, thanks. I knew it'd be something simple and dumb like that. Seems to have done the trick.
  10. I've tried several different things to get this to work, but I must be missing something incredibly simple because it just plain doesn't work. Basically, I want to control whether or not an ore spawns in a specific biome. I've gotten the ore to spawn how I like it in every other way (height max, height min, vein size, etc) but whenever I try and base my spawning off of a biome it seems to just.. crap itself. Here's what I have so far. BiomeGenBase b = world.getBiomeGenForCoords(chunkX, chunkZ); ... if(b.biomeName=="Plains") { System.out.println(b.biomeName); (new WorldGenMinable(Drore.oreCopper.blockID, 100)).generate(world, random, Xcoord, Ycoord, Zcoord); } It seems to partially work. If I change the if to 'true', it works fine. If I remove the if and System.out entirely, it works fine. If I remove the if statement but leave the System.out it will print a lot of different biome names as it loads different chunks from different biomes. If I run it with that code above, it appears to work. It will print out "Plains" a shitload (and no other biomes) whenever I encounter a Plains biome, but the ores will not generate. It seems like it enters the if statement, but fails to execute the generation regardless. I have also tried b.biomeName.equals("Plains") as well, to no avail. tl;dr Someone explain how to generate ores differently based on biome because I clearly don't get it.
×
×
  • Create New...

Important Information

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