Jump to content

Athire

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by Athire

  1. Thank you guys! SanAndreasP's solution seems to have worked. I was sure there must be a way to do that, but Java isn't my Forte so wasn't sure of the syntax. On the convention note, I learned camelCase (as opposed to CamelCase) at my university for other languages and it's become a bit of a bad habit. I'll try to get better at sticking to the java coding conventions Thanks again, you guys rock! Marking as solved!
  2. Hello all! Me again! It's been awhile but I'm continuing on with my mod. Here's my dilemna: I have a tool class that is going to be used to create 7 or 8 different instances of that tool with different properties (below). In particular, the material and the buffVal will differ between instances of this class. My goal is that when a player has this weapon in hand, it increases an extended player property by the buffVal. My issue is I don't want to check player.getCurrentEquippedItem().getItem() 7 or 8 times to hit every tool. Is there a way to check if an item is one of the various instances of a class like that? I've been looking but haven't come across anything yet. The other issue I run into is that I need the buffVal of the particular instance of the class the player has equipped. Is there an easy way to get that without hard coding in every value and comparing 8 times? Here is some pseudocode to illustrate what I mean: Thanks in advance for any help you guys can provide! I'm trying to code this smartly (for a change ) and it's throwing me for a loop!
  3. ...I am literally so dumb. I quadruple checked the item initialization but never checked that I was actually registering it. As soon as you mentioned the registration I realized what was wrong. Both projectiles are now rendering. Thank you so much, I've been trying to figure this out for way too long. I was sure it was a rendering issue! Related question: Whenever I try to thank some one on this forum it doesn't look like it takes effect. I just hit the applaude button right? Thanks again, marking this as solved!
  4. I updated it to use RenderSnowball() but still nothing Any other ideas? Thanks again for your help, I'll include the changed ClientProxy code below. Client Proxy:
  5. Ok thanks! I'll try updateing that. In the meantime here are the rendering classes in question. They are pretty much the same. I copied them from the snowball rendering class a long time ago, has something here depricated?I just realized I haven't thought to check the new snowball code since updating, I'll do that now. Thanks again! renderSpiritBolt: renderHolyLight
  6. I think I did. I added the initKeys() method to my common proxy and got rid of the client side only call. Here is my updated code. By the way, thank you for the explanation of the client/common proxy system. That was always a bit confusing to me but makes a lot more sencee now. Load: ClientProxy: CommonProxy:
  7. I finally had a minute to look at this. I moved the registerModEntity() calls to the load function but the projectiles still will not render. Any other ideas? Thanks again.
  8. Hello All! Sorry to be back so soon. Thanks to your help I was able to take care of most of the remaining issues and I finally have my mod into a playable state in 1.7. I have one last bug I could use some help with. I have two projectiles which I could render fine in the 1.6 version of my mod. They fire ok, I can shoot them at mobs and they do what I want them to, but they are completely invisible. I don't even get the untextured white cube. I've been looking through this for a while, so maybe a fresh set of eyes can figure out what I'm doing wrong. Thanks in advance! Client Proxy Load Function SpiritBolt Renderer (copied from RenderSnowball). Holy Light Renderer (Much the same as Spirit Bolt Renderer) Thanks again! Once I fix this I get to start adding new content!
  9. I figured it out! It was a super stupid mistake like I thought, but my fromBytes method was writing and my toBytes method was reading, when it should have been the other way around! I'm having other issues now but they aren't related to this so I'll try and solve it on my own and mark this as solved! Thanks again for your help guys!
  10. I did add the default constructor, but here is all the relevant code: Registration: Key Input Handler: Packet Class: Packet Handler: Please let me know if there is anything relevant that I've left out. Thanks again!
  11. Thanks so much. So I am using the new version of forge now but that doesn't appear to be solving my issue here. I'll include the error log below again because it looks a little different this time (which could be due to the new forge version).
  12. I'm not sure I did this right. In the directory for forge 1180 I changed the build.gradle version number to: version = "1.7.10-10.13.4.1448-1.7.10" and ran gradlew setupDecompWorkspace in that directory. A lot of items seem to be skipping here. When I open Eclipse I still see the changelog titled " forge-1.7.10-10.13.0.1180-changelog.txt ". Am I changeing the version in the right place? And is there a better way to check which forge version I'm using in my eclipse project? Thanks again for your help guys. I'm not too familiar with forge other than the actual coding part, so anything you can tell me is a huge help.
  13. Quick qestion relating to this (it's been awhile since I've updated Forge and all the tutorials just show the setup from scratch). I've downloaded a new version of forge and run gradlew setupDecompWorkspace and gradlew eclipse, but in eclipse the forge changelog under src still shows version 1180. How do I get my current eclipse project running with the new version Forge? (I thought thats what gradlew eclipse did). Thanks again in advance. Most of the resources I'm finding show the setup from scratch but not how to update a current project.
  14. Thanks, I'll try that and post back here if I have further issues!
  15. I'm using Forge 10.13.0.1180. I think this is a fairly early version, were there known issues with it?
  16. Right. I forgot the default constructor. I'll fix that Here is the full error log: Thanks again!
  17. Hello all! I'm still trying to get the hang of the 1.7 packet structure, and I think I know what the issue is here and where it occurs but I'm a bit confused as to how to actually fix it. I have other packets working but this one is being a bit of a pain. I'm trying to send a packet when I press a key. When I press the button the keybinding tries to send the packet, but I get the following error: readerIndex(0) + length(4) exceeds writerIndex(1). This happens on the line which should be sending a packet. The packet should literally just contain the number 1. I read this as I'm not sending as much as the recieving code expects to see. In all the other packets I've sent I just create a new packet using the constructor and input the paramater I need. So given that my packet constructor takes in an int and saves it to a variable, shouldn't I send it like: BaseClass.innerpowerChannel.sendToServer(new useAbilityPacket(keyPressed)); Where keyPressed is an int? Thanks in advance! I'll include the full code below: Packet class: Packet Handler: Key Input Handler:
  18. I finally had a bit of time to test this out, and moving everything to one channel did the trick! Thank you guys so much! I will mark this as solved!
  19. Ok I'll try that an let you know how it goes. Thank you so much!
  20. Ah, I see. Should I try moving everything to one channel to see if that clears this up? I'm a bit worried if I do that before figuring this out I could introduce more bugs.
  21. I didn't realize I could do it all in one. The tutorials I was reading made it sound like I would need to register a different channel for each packet. I guess I would need one channel for packets recieved by the server and one for those recieved by the client? Do you think that could be my issue?
  22. I have it in my PreInit() method, along with item and block registrations which I know are working. A thought just occured to me, I'm registering multiple channels there, maybe I did something wrong there? Here is the full registration for all of my channels:
  23. Here is the new crash report, but it doesn't seem to have changed. Here is the new registration code: Thanks again for helping me out!
  24. That should have been client, I changed it to server when trying to figure out what was going on. Unfortunately that's not the cause of this problem, I suspect it's somewhere in the toBytes() of fromBytes() methods. Thanks for the input though
  25. Thank you both! I changed it to extend BlockBush, it seems to work perfectly now!
×
×
  • Create New...

Important Information

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