Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. That's because Minecraft forces all item IDs to be 256 ahead of their config ID. This is automatic.
  2. Take a look at BlockLog.java....
  3. It's automatic. You don't have to do anything.
  4. Then I cannot help you. What the fuck is a variable and how do I use it? Java basics.
  5. Zip root |_yourMod |_yourModMain.class |_mods |_yourMod |_textures |_blocks |_yourBlock.png
  6. Answer the question. What is the value of a?
  7. Adding to worldgen requires extending IWorldGenerator and then registering it with GameRegistry.registerWorldGenerator(...) As for generating the tree shapes, take a look at net.minecraft.world.feature.WorldGenTrees.java That class is pretty much everything you'd need, you just have to tweak the blockID and metadata values to that of your own blocks. (Note: there should be a way to register a new wood type, but I don't know how. Haven't gotten that far! ^..^; )
  8. Are you having trouble adding your custom tree to world gen? Are you having trouble getting textures to work? Are you having...some other trouble? What, specifically, is your problem?
  9. Try reading my last post.
  10. If I wanted to do a core mod, I'd simply fix the existing EntityLiving class so that it checks for material properties rather than seeing if the material is water (same thing with item frames using "is the item in my inventory exactly equal to Item.map" instead of "is the item in my inventory isMap?".[1] Explain better. But if it has to be a base edit or core mod, see above.
  11. No, because it's update function will still revert the breath bar to full.
  12. I don't know what's going on, but it is not doing what you say it's doing. "490" + String(n) can never equal "4095." Also, 490 + 61 is not 561. Your maximum value should be 551. In order to solve this, we need the class that is the variable 'id'.
  13. WATER AS A MATERIAL IS NOT RESPONSIBLE FOR THE DESIRED BEHAVIOR. How many times do I have to say that? EntityLiving is responsible for the desired behavior: if (this.isEntityAlive() && this.isInsideOfMaterial(Material.water) && !this.canBreatheUnderwater() && !this.activePotionsMap.containsKey(Integer.valueOf(Potion.waterBreathing.id)) && !flag) { this.setAir(this.decreaseAirSupply(this.getAir())); Note how it references Material.water.
  14. Won't work. Drowning is entirely tied to Material.water. That is exactly what resulted in flinging me to Y=10,000,000
  15. I'm trying to create a block that causes the player to suffocate (with a breath meter) but which doesn't allow the player to swim "up" in it. Currently both of these functions are handled exclusively by the block's material type. //EntityLiving.java If(Material == Material.water) { breath goes down } else { reset to full } If(Material == Material.water) { allow swimming } So while my block can get and set the player's air value, because my block's material is-not-water, the EntityPlayer just resets it to 300 anyway. But if I use Material.water as my block's material, the player is allowed to swim in it (various forms of negating the swimming have been tried, to much amusement). Suggestions?
  16. int a; a = 5; a = 10; What is the value of a? (Hint: you need two variables)
  17. Use a second icon? Look at TNT or pumpkins.
  18. Well. What you're doing is if the side == 1 (the top face) you return the texture. But if it isn't 1, you then call that function again passing the same side value, causing an infinite recursion loop (if side isn't top, repeat). If you look at the regular grass, you'll see that it returns a top face, a side face, or it references BlockDirt for the last (bottom) face.
  19. And for the tenth time...
  20. Nope. Open up your reobf folder and look at the file names. Reobf only changes the references to vanilla classes and functions back to their obfuscated state (field_53829_b, func_23878_c, etc) so that the mod will actually work when added to the Minecraft jar.
  21. It means you're passing a TileEntity to a function that is expecting a GuiScreen.
  22. Yup, which is why I couldn't use it. Just pointing out alternatives, because apparently people can't go look at existing blocks to figure out how to do things. ("How do I use multiple textures like a pumpkin?" Me: "Go look at the pumpkin code")
  23. There's also the onHarvest method, which provides access to a large number of things. I use it in one of my blocks to figure out how many items to drop, based on metadata. (The block has 8 thickness states, like snow, and each 1/8th drops an item, which is good for making a 1/8th of a block, so using 8 should give you 8 back).
  24. Look up the function inside the Block class called... idDropped, if I recall correctly. BlockRedstoneOre uses it.
×
×
  • Create New...

Important Information

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