Jump to content

Mitchellbrine

Forge Modder
  • Posts

    193
  • Joined

  • Last visited

Everything posted by Mitchellbrine

  1. Use the BiomeGenBase array that stores all the biomes. It's BiomeGenBase.biomeList, I believe. BUT BE CAREFUL! I'm pretty sure it's length is 256 and you know, most of the time, it's not taken up fully, so... Alternatively, you can iterate through that list, create an array list, add in the biomes that aren't null, and then convert that to an array and use it. - - - The reason this works is because the last parameter of the addSpawn is a BiomeGenBase array (or "BiomeGenBase...", which at the end of the parameters means an array), so you can use any array of biomes you want. - - - At least, I'm pretty sure that's correct. I hope that helped!
  2. Sorry, just a little side note, but here, we can't help you if you don't describe the issue or problem to us. And a worse case of that, as you put it: ^^^ That my friend is not telling us anything. We need a detailed description on the issue or at least a little more explanation or we can't do anything. On the other hand, Thank you for posting your code. That was wise of you. You don't know how many times people don't and it really is a struggle.
  3. 3. What's the question? What do you need help with?
  4. Okay: 1. Why do you need this? We need background, context. 2. This is basic java. Learn Java!
  5. I'd say look at the ender pearl entity code and see how it's thrown and do something similar.
  6. To this, my good sir, I say: Learn Java!
  7. I honestly can't tell you how many things are wrong with that code, but I'll help with your error. You need to be registering your tile entity. GameRegistry.registerTileEntity(<tileEntityClass>,<tileEntityName>);
  8. *cracks hands* Well, let's see what's wrong, shall we? 1. You're registering your items in YOUR CONSTRUCTOR! 2. You need to be constructing your items in the pre-init. 3. You need to register your items in the pre-init. Well, that might not fix your issue, but that would be correct by a mod stand-point.
  9. please use a proper mod lifecycle event. Pre-initialization is where you should be constructing your block/item and after that, you should register them. If not, you get all sorts of errors. Your items are null, your blocks are null and you're field is not being changed, like disesieben07 was saying. That's why you're getting a NPE. As a side note (nothing to do with the issue, but it's a bad practice), stop being lazy and don't use LanguageRegistry anymore. Use the en_US.lang (or whatever lang file you use).
  10. Wait, what do you mean by "world.func_147480_a(x, y,z, true); but still not work " I've used that code many times in 1.7.10, so I don't know how it isn't working. Please explain.
  11. Safely cast it. If you want to get the capabilities, then use player.capabilities. That literally is the capabilities of the player. Also, please explain what you're trying to do.
  12. Okay, so I see that your issue is in the update method. Try either updating the block or using using the schedule. Don't use both. See if that works. (If it does, then the schedule might be un-updating it after it updating. If not, let's see what happens.)
  13. Set an integer in the player's data for the score per-player. NBT stands for Named Binary Tag. It's very useful for per-player integers/boolean/strings/etc.
  14. Correct me if I'm wrong, but I'm pretty sure you don't have to do that on server side only.
  15. Your harvest level -1. The string "Class" is null. That or the stack is null. That might be the issue with the pickaxe harvest level. (That or I'm misunderstanding the issue.)
  16. You should be rendering it more than just EQUIPPED. The render type you want probably isn't being called.
  17. You should really look into the world class a bit more. world.func_147480_a(x,y,z,dropItems); ^^^ That is the code for breaking blocks. (It was deobfusicated in 1.6)
  18. Also: at com.SirRoyGbiv.magicores.block.MagicOresBlock.getUnlocalizedName(MagicOresBlock.java:25) at com.SirRoyGbiv.magicores.block.MagicOresBlock.registerBlockIcons(MagicOresBlock.java:32) What are those lines of code
  19. java.util.UnknownFormatConversionException: Conversion = '%' ^^^ Hmmm, seems like an exception, doesn't it?
  20. The class is only accessed by the client. Put your id in, say the GuiHandler class so it's accessible on both client and server.
  21. *sigh* *facepalm* if (!world.isRemote) ^^^ That makes it server-only.
  22. It's because you're not rendering anything. You're just printing it in the console. It's working. You're just not doing anything.
  23. Opening on client won't let you move your inventory around. It's just plain buggy. Opening on the server fixes it.
×
×
  • Create New...

Important Information

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