Posted July 29, 201411 yr Hello everyone, I'm trying to make 2 GUIs and both of them have problems: 1) In this GUI I should be able to insert an item in the only slot of my item (headPhones). The problems are: 1) I can't interact with the player inventory, in any way 2) In the container slot there's the item that's in the 2nd slot of the player's hotbar, I don't know why. Here are the classes I used: https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/handler/GuiHandler.java https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/client/gui/HeadPhonesGui.java https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/items/HeadPhones.java https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/items/HeadPhonesContainer.java 2) This GUI should allow the player to manage Links (I'm making a radio mod), I have 2 textFields and some buttons. The problem is that I can't interact with the textFields, in any way, neither clicking them nor using "textfield.setText("Test Text");". I even tried using a variable to get the String that is inserted. Here are the classed used: https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/handler/GuiHandler.java https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/items/RadioCrystal.java https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/items/RadioCrystalContainer.java https://github.com/gjkf/HeadPhones-Radio/blob/master/src/main/java/com/gjkf/headPhones/client/gui/RadioCrystalGui.java Any help, clarifications, suggestions would be really appreciated, thanks. "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
July 30, 201411 yr Author Anyone has any ideas? "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
July 30, 201411 yr The reason nobody helps much on these inventory issues is that it is very involved to look through all the code. 2nd, people tend to use their own convention instead of following the tutorials which normally causes the error. In your case, you didn't follow the tutorials at all. Read them again and start over. There will never be a way to interact with the players inventory if you have client only functionality defined. Long time Bukkit & Forge Programmer Happy to try and help
July 31, 201411 yr I think I see your problem, in your gui handler class you are returning null, rather than your container, in getServerGuiElement and returning the container rather than the gui in the getClientGuiElement. You may have other issues but that is the only issues I see at first glance.
July 31, 201411 yr I had the 2nd problem as well. You assigned the slot the players internal inventory. You need to assign it to the tile entity, which should be implementing IInventory. I didnt look through your code, but thats most likely the error. [shadow=gray,left][glow=red,2,300]KEEGAN[/glow][/shadow]
July 31, 201411 yr Author Thanks to kenoba10, I have fixed my 1st issue, now I crash trying to open the 2nd GUI, I have the problem at textField.drawtextBox(); and insertField.drawtextBox(); Here's the crash: http://pastebin.com/svQq8jDD Thanks for the help. "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
August 1, 201411 yr Author Even doing that it won't write anything on the textfield. It fixes the crash, but it won't work. "I an atom in the universe, a universe of atoms"-- Richard P. Feynman
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.