Jump to content

Jedispencer21

Forge Modder
  • Posts

    262
  • Joined

  • Last visited

Everything posted by Jedispencer21

  1. alright its working, thanks. Edit: actually noticing this, but when I change the blue value it changes the alpha...
  2. I'm not exactly great with the colors, how would I add the alpha value to the: this.red << 16 | this.green << 8 | this.blue
  3. I have changed it to Gui.drawRect(drawX, drawY, rectX2, rectY2, (this.red << 16 & 255 | this.green << 8 & 255 | this.blue & 255)); and now it just doesn't appear to draw the rectangle.
  4. honestly I think that was me testing and not realizing I don't exactly have to do those, but still not 100% sure about the gui
  5. Right now what I am trying to do is in my mod I have an element that gets rendered into the world and onto a Gui, instead of specifying the color of it, I would like to color it based on rgb values entered with a slider. right now I have the sliders working but it doesn't give the correct color. This is the code:
  6. Enchantment.addBookToList(yourenchantment) should add it to the creative.
  7. it may say its for 1.7.2, but it still works in 1.7.10
  8. I am still having some crashes, like before, only the owner of the lan can share the waypoint, while when others try to share, it just crashes. Crash Report: Here is the code: http://pastebin.com/J0MabeH2 I know no one is going to code this for me, I would just like to know where I am going wrong with this.
  9. So what I have is a GuiTextField in when the person will enter the players name of which the waypoint will be shared to, so what I have to do is when they press the share/confirm button, it sends a (ShareWaypoint) packet to the server with the sendToServer method, when the server receives the (ShareWaypoint) packet it will send a (RecieveWaypoint) packet with the sendTo method to the player in which the person entered in the GuiTextField. The only problem I have is getting the player, because the only way I have ever accessed the player is through the Minecraft.getMinecraft().thePlayer, but I know that won't work because that is a client player and not a EntityPlayerMP.
  10. So I have been trying things, but still no success, the closest I had gotten it was before rewriting the sharing code, was to make it so the owner of the lan was able to share it to others, but now thats not even happening, I have no idea how to send the data from a player to the server to another player
  11. So what would be the best way to fix these crashes on the public/lan servers since the way I would like to share the waypoints would be to enter the players name.
  12. I'm fine with it not working on multiplayer, I just want to fix the crashes it has on mulitplayer and lan
  13. So I have gotten this to work, but it only works on lan servers when the owner of the lan shares it, if anyone who connected to the lan tries to share, it crashes, also crashes on public servers. Here is the crash: Here is the code: Now what I am assuming is causing it to crash on public servers is the fact that I am getting the player through the integrated server, since I do not know what other good way is to grab the player.
  14. So I have a test packet that searches for other players then sends a found message to the sender of the message, now what im wondering is how to send non string things in a packet since my waypoints aren't strings.
  15. it spits out event.slimerain.end because if you don't have a .lang file that contains (event.slimerain.end=Whatever the translation is) dont add the brackets, it wont translate it, plus for it to use what is in the lang file you add new ChatComponentTranslation(EnumChatFormatting.RED + I18n.format("event.slimerain.end");
  16. My waypoints are stored in ArrayLists, so could I make it so when the client receives the packet, it adds a waypoint to the list, and the same for removing shared waypoints? Also there is a message getPlayerEntityByName, could I pass in the player name in a GuiTextField when sharing waypoints, then send a packet to that player, which adds a shared waypoint to the list?
  17. from what I can see about the /tell command, it does not use packets, it just gets the command sender and the player it is being sent to, then adds the message to their chats with two seperate messages.
  18. to specify the player it would be shared to I was thinking a GuiTextField in which the player would put the player to be shared to name.
  19. So what I am trying to do, is I have waypoints and what I would like to do is make it so that a player can share a specified waypoint with a specified player. What I am wondering is what would be the be way to handle this. Also, would this work on servers if the mod is not installed on it?
  20. So I have created a custom option slider like the vanilla ones but instead of it using it for floats I am using it for integers, all is working but one thing, when I click and drag it, it changes the option, but when I close the gui and open it back up, the value never changed to the dragged value, but to the value I clicked on. What I am wondering is how to fix this. Here is my slider code: http://pastebin.com/cvTsTcmz
  21. Have you tried: BlockPos pos = new BlockPos(0, 0, 0); currentRespawnLocs.put(pos, true); currentRespawnLocs.get(pos);
  22. That sort of worked, it swaps the items client side and appears to swap them, but it doesn't actually swap them server side also the other problem I have is that it doesn't select the item with the most damage, it just selects the right most item, this is the selection code:
  23. What I am trying to do is to have it when you place a button, it swaps your current item with an item with higher damage, the problem I am having is that when I press the button, it takes the weapon from the slot, but it doesn't swap them, it just replaces the current held item with the swapped item, but doesn't take the current item and put it in the other slot. Here is my code for swapping:
  24. This is a problem that I have run into with alot of my guibutton positions and other things when I rescale my window, the HUD doesn't stay in the same place, even when I use the same code from vanilla, IDK how to fix it, but help would be appreciated. Here is my code: http://pastebin.com/wGufAy3J
×
×
  • Create New...

Important Information

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