Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. ModLoader.registerEntityID(MobTest.class, "TestMob", 50); ModLoader.addSpawn("TestMob", 15, -5, 1, EnumCreatureType.creature); ModLoader.addLocalization("enity.TestMob.name", "Test Mob"); Any reason you're not using the native Forge calls?
  2. This sounds like a total mess.
  3. Your issues is within this line, lets see if you can find it. I have a working mcmod.info file open in front of me, just to compare, because I couldn't see an issue with that line. And I still can't. "authors": [ "XCompWiz" ],
  4. Thread title needs to be more informative.
  5. Just as a warning: Make sure this plays nice with Mystcraft. Mystcraft and Secret Rooms had a conflict for a while, because Secret Rooms used a FakeWorld object and there were some things assumed about it (by one mod or the other) that were untrue and caused null pointer exceptions. (I think Mystcraft kept trying to cause lightning in the fakeworld because it was unable to tell that it was fake, but the fakeworld had no lightning functions, but I could be wrong)
  6. The problem is that it gets messy when you start trying to handle multiplayer. How do you insure that every client has their mods load in the same order so that IDs (behind the "Forge-wall") match up?
  7. *Opens Block.java* *Hits ctr-F* *Types in "strong"* *Hits enter* /** * Returns true if the block is emitting direct/strong redstone power on the specified side. Args: World, X, Y, Z, * side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block. */ public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { return 0; }
  8. I don't post code that works because 99% of the time I'm not opening Eclipse and nabbing exact function names. I do, however, post code that tells people where to look. Forums are an asynchronous method of communication. Therefor you can afford the time to spellcheck and make sure you've got things write.* About a third of my own questions are solved before I even make my opening post because in the process of copy-pasting and explaining what's going on I realize my error. Which is impossible to know from this end, therefor it is acceptable to point out these errors. This post is not a criticism, it is for future reference. *Even go back and make edits. This word should be "right" but I have a bad habit of typing the wrong thing and will frequently alter my posts when I notice errors just after clicking submit.
  9. Use: @Override public boolean isItemvalid(ItemStack par1ItemStack) { if(par1ItemStack !=null) { if(par1ItemStack.getItem() instanceof Block) { return true; } } return false; }
  10. If Block.blocksList[stack.getItem().itemID] is returning null, that means that the item is not a block, ergo if its not null it must be a block. Ergo allow it (return true). Actually, I feel like this would give array out of bounds errors if you were looking at an item. The blocksList array only has 4096 spaces and item id's go far higher than that, so wouldn't that end up giving you out of bound errors if it isn't a block? Probably, but you could check for it. (i.e. && getItem().itemID < 4096...)
  11. If Block.blocksList[stack.getItem().itemID] is returning null, that means that the item is not a block, ergo if its not null it must be a block. Ergo allow it (return true).
  12. Yes, its the decimal representation of a hexadecimal RRGGBB value. par1/2/3 are the x/y/z coords of the specific block And yes, you can use this function on any block you create (or base class edit existing blocks).
  13. Generally where you do your other GameRegistry, LanguageRegistry, and EntityRegistry stuff.
  14. Not to mention that his code should have been throwing errors...
  15. EntityRegistry.registerModEntity(EntityTractor.class,"entityTractor",0,this,256,1,true); and RenderingRegistry.registerEntityRenderingHandler(EntityTractor.class,new RenderTractor());
  16. public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { return 16777215; //change this }
  17. Define "not working."
  18. This is wrong: "dependencies": [Minecraft forge 1.5.2-7.8.0.725 +] Needs to be: "dependencies": ["Forge"] Two things: 1) You didn't put quotes around it (see the Authors tag) 2) I don't think the MCmod.info file handles version of dependencies, especially not minimums, assuming that it uses what's there at all.
  19. field_94394_cP is just a not-deobfuscated class variable. In this case it is an array index. If you're looking at leaves, I believe that field holds a reference to whether or not Minecraft is in fancy rendering (transparent leaves) or fast rendering (opaque leaves).
  20. You actually can't be that dangerous with Java. MySQL on the other hand...
  21. What does this mean?
  22. You need to figure out when you need to reference this data value and figure out where you can get a reference to the player. Forge Events are probably the best solution.
  23. Or @Override public boolean isItemvalid(ItemStack par1ItemStack) { if(par1ItemStack !=null) { if(par1ItemStack.getItem() instanceof Block) { return true; } return false; } }
  24. I'm pretty sure this would crash,since you are referencing to a non instanciated object... Obviously. I was merely declaring the object so that the OP knew what type it was. The proper way would be: [code] EntityPlayer player = Minecraft.getMinecraft().thePlayer; NBTTagCompound nbt = player.getEntityData(); Also,@OP: I think you misunderstood the use of NBT Data.This simply returns a list of informations stored in nbt.You have to use nbt.setInteger/setByte/etc... to save them. That won't work for SMP.
×
×
  • Create New...

Important Information

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