Jump to content

SuperKael

Forge Modder
  • Posts

    66
  • Joined

  • Last visited

Everything posted by SuperKael

  1. Ah, ok! Thanks! I know how to use Reflection and whatnot, but I didn't want to use it for every invocation. Didn't think of this!
  2. I've got the same problem - then what should I use? I want to add an optional dependency for another mod of mine's API. How would I go about doing this? Please don't say reflection...
  3. Haha, how fun. I just managed to stumble across my own thread in a google search. Congrats on figuring out what you were doing, but man, but own code now disgusts me. I was wrapping divisions in try/catch to deal with divide by zeros... blegh. I sure have come a long way in the past few years :D. Oh, and sorry for the bit of thread necromancy, this thread just brought back a lot of memories.
  4. Hm, that works, in fact that was my original plan, but I didn't want to have to put the slot in a different container, like baubles does. I thought I read that it was possible to add the slot to the already-existing inventory container, but I suppose that's not worth the trouble. Whatever. Thanks very much for your time and help! I guess you saved me from a lot more headache.
  5. I guess what I'm asking is, if not what I'm doing, how am I supposed to add a new slot to an existing container/gui (that player's inventory), using a capability? I have read that it's possible, but I don't understand how.
  6. I was afraid of something like that. Capabilities are so confusing... Frankly, I came to this process by patching together a bunch of different tutorials .-. What should I be doing? I have read a ton about capabilities, but I still don't understand them completely.
  7. Well yeah. I didn't notice that the log was there, but my point still stands. That error can be caused be either no json, or a bad one.
  8. Check the console, it should mention a problem regarding the model json. All blocks and items need to have a json file which describes the item/block model(s), and points to the location of the texture for the item/block. When it looks like that, that means it failed to locate the json, or there is something fundamentally wrong with it.
  9. I am trying to use Capabilities to add another slot to the Player's inventory. To do so, I am using an AttachCapabilitiesEvent<Entity> event. After checking that event.getObject() is an instance of EntityPlayer, I am attempting to retrieve EntityPlayer.inventory, and pass it to the constructor for my capability, which is using it to construct a Slot. The problem is, a NPE exception is thrown while constructing the slot, because EntityPlayer.inventory is null. Why?? Am I missing something major here, or is this some sort of bug...
  10. omg thank you it worked! no more twisted convoluted dependency management!
  11. I put the decompiled jars into the libs folder. it's as if I hadn't put them in there, gradle ignores them.
  12. Ok, so I have my mod called BottleOBlood. now, it's dependant on CoFHCore and Enviromine. I have always had so much trouble with dependencies, my current method is a great big hack job, and now it suddenly stopped working. I just want to know, what is the simplest way to add dependencies for my mod in the form of decompiled jars.
  13. Try this Arrays.sort(arrayOfItems, new Comparator<ItemStack>() { public int compare(ItemStack item1, ItemStack item2) { return item1.getName().compareTo(item2.getName()); } }); P.S: this is pretty much just java code. it really isn't that hard.
  14. in your writeNBT and readNBT, your are given an NBT compound object, simply write/read into the NBT object all your variables, and then minecraft will call the writeNBT and readNBT for you when loading/saving the world. the NBT compound it gives you is saved in the world file, so when you load back up the world your variables are restored.
  15. make sure your tile entity has public fields, or getter/setter methods, and then edit those fields instead of accessing the NBT
  16. I don't work with entities much myself, but it seems to me that the simplest solution would be to calculate a series of coordinates 16 blocks apart, and have it move from one set of coordinates to the next. although, the standard minecraft method of doing it seems pretty good, because you have to be careful to make sure there are no obstructions
  17. I used your sudgestion code, and it worked! although I want to see if there is anyway I can bypass the extra paramater to the command
  18. Your problem, is that the gravity system in EntityThrowable behaves like that naturally, in order to get your rockets to behave in the manner you speak of, you will need to create a custom entity that implements IProjectile. (At least I think, if someone more experienced says otherwise, than ignore what I am saying, I don't do much with entities )
  19. I added what you suggested to the build file, did nothing.
  20. [*]This is my entire build file [*]I will try the exclusion thing
  21. Could I see your code for your rocket entity?
×
×
  • Create New...

Important Information

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