Jump to content
  • Home
  • Files
  • Docs
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Thornack

Thornack

Members
 View Profile  See their activity
  • Content Count

    622
  • Joined

    August 10, 2013
  • Last visited

    July 1, 2017

Community Reputation

3 Neutral

About Thornack

  • Rank
    Dragon Slayer

Converted

  • Gender
    Undisclosed
  • Personal Text
    Using modding to Learn Java - Successfully

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thornack

    What would cause a [Netty Client IO #5/ERROR]

    Thornack replied to Thornack's topic in Modder Support

    Ya sorry about that my bad, I ended up fixing the error
    • July 1, 2017
    • 4 replies
  2. Thornack

    What would cause a [Netty Client IO #5/ERROR]

    Thornack replied to Thornack's topic in Modder Support

    [SOLVED] For some reason I had a string that was somehow being deleted right before the NBT data was being saved. So when I tried using it to send a message to the player the string did not exist and this seemed to cause the crash and only happen sometimes. Really weird but meh its fixed
    • July 1, 2017
    • 4 replies
  3. Thornack

    What would cause a [Netty Client IO #5/ERROR]

    Thornack posted a topic in Modder Support

    Hi Everyone, Once in a while when I test my mod I get a [Netty Client IO #5/ERROR] any ideas what might cause this? The console says the following: [Netty Client IO #5/ERROR] [FML]: NetworkDispatcher exception io.netty.handler.timeout.ReadTimeoutException [23:29:02] [Client thread/INFO] [FML]: Applying holder lookups [23:29:02] [Client thread/INFO] [FML]: Holder lookups applied
    • July 1, 2017
    • 4 replies
  4. Thornack

    How would you disable item drop when in gui

    Thornack replied to Thornack's topic in Modder Support

    Hey everyone so this is the solution to this problem. To disable the dropping of items via mouse drag you have to override the #mouseMovedOrUp() method (not the mouse clicked method) like so To disable the dropping of items via the "Q" Key (or whichever key this functionality gets bound to) use the following in your gui class and it works
    • July 5, 2016
    • 4 replies
  5. Thornack

    How would you disable item drop when in gui

    Thornack replied to Thornack's topic in Modder Support

    For the mouse drag I tried the following - I created an imaginary barrier and using the draw method just reset the mouse mosition if it goes outside my guis bounds. However it isnt foolproof the player can still try and succeed at dropping the item by dragging the mouse fast. - need a better way to do this still @Override protected void drawGuiContainerBackgroundLayer(float x, int y, int z) { int mousePosX = Mouse.getEventX() * this.width / this.mc.displayWidth; int mousePosY = Mouse.getEventY() * this.height / this.mc.displayHeight; if(mousePosX < 140){ Mouse.setCursorPosition(140 * this.mc.displayWidth/this.width, Mouse.getEventY()); } if (mousePosX > 284){ Mouse.setCursorPosition(284 * this.mc.displayWidth/this.width, Mouse.getEventY()); } if(mousePosY < 58){ Mouse.setCursorPosition(Mouse.getEventX(), 58 * this.mc.displayHeight/this.height); } if(mousePosY > 190){ Mouse.setCursorPosition(Mouse.getEventX(), 190 * this.mc.displayHeight/this.height); } //Rest of drawing code }
    • July 4, 2016
    • 4 replies
  6. Thornack

    How would you disable item drop when in gui

    Thornack replied to Thornack's topic in Modder Support

    @Override protected void keyTyped(char key, int event){ if (event == 1 || event == this.mc.gameSettings.keyBindInventory.getKeyCode()) { this.mc.thePlayer.closeScreen(); } this.checkHotbarKeys(key); } To disable the dropping of items from my gui inventory using the "Q" keyboard Key, I overrode the keyTyped method and changed it to the code above so that the "Q" key cannot be used to drop items. Still have no idea how to disable dropping items via mouse drag though. Any ideas are helpful
    • July 4, 2016
    • 4 replies
  7. Thornack

    How would you disable item drop when in gui

    Thornack posted a topic in Modder Support

    Hi everyone, I have created a gui with a custom inventory and container. I want to make it impossible for a player to drop items onto the ground while inside this gui. Anyone know how to achieve this?
    • July 3, 2016
    • 4 replies
  8. Thornack

    Cant Move Items inside inventory

    Thornack replied to Thornack's topic in Modder Support

    thanks that worked
    • May 11, 2016
    • 9 replies
  9. Thornack

    Cant Move Items inside inventory

    Thornack replied to Thornack's topic in Modder Support

    not sure why the item movement stuff is so very broken
    • May 11, 2016
    • 9 replies
  10. Thornack

    Cant Move Items inside inventory

    Thornack replied to Thornack's topic in Modder Support

    Key is pressed public class KeyMiney extends KeyBinding { private static int index= 1; public KeyMiney() { super("key.keyMoney", Keyboard.KEY_M, "key.categories.custommod"); } @SubscribeEvent public void keyDown(InputEvent.KeyInputEvent event) { if (isPressed()) { PacketOverlord.sendToServer(new PacketC2SMineyKeyPressed()); } } } that key press sends a packet to server which then sends a packet back to client that opens the gui public class PacketC2SMineyKeyPressed extends AbstractMessageToServer<PacketC2SMineyKeyPressed> { public PacketC2SMineyKeyPressed() {} @Override protected void read(PacketBuffer buffer) throws IOException { } @Override protected void write(PacketBuffer buffer) throws IOException { } @Override public void process(EntityPlayer player, Side side) { PacketOverlord.sendTo(new PacketS2COpenMineyGui((EntityPlayer) player, (int)player.posX, (int)player.posY, (int)player.posZ),(EntityPlayerMP) player); } } packet that actually opens the gui client side public class PacketS2COpenMineyGui extends AbstractMessageToClient<PacketS2COpenMineyGui> { int xPos; int yPos; int zPos; public PacketS2COpenMineyGui() {} public PacketS2COpenMineyGui(EntityPlayer player, int xPos, int yPos, int zPos) { this.xPos = xPos; this.yPos = yPos; this.zPos = zPos; } @Override protected void read(PacketBuffer buffer) throws IOException { xPos = buffer.readInt(); yPos = buffer.readInt(); zPos = buffer.readInt(); } @Override protected void write(PacketBuffer buffer) throws IOException { buffer.writeInt(xPos); buffer.writeInt(yPos); buffer.writeInt(zPos); } @Override public void process(EntityPlayer player, Side side) { if(player.worldObj.isRemote){ //player is only the client side player here using if(!player.worldObj.isRemote) does not work nothing is called player.openGui(CustomMod.instance, 9, player.worldObj, xPos, yPos, zPos); } } }
    • May 11, 2016
    • 9 replies
  11. Thornack

    Cant Move Items inside inventory

    Thornack replied to Thornack's topic in Modder Support

    When I click on an item it appears to be grabbed by the mouse but then immediately jumps back into the slot I grabbed it from so I cannot move it
    • May 11, 2016
    • 9 replies
  12. Thornack

    Cant Move Items inside inventory

    Thornack replied to Thornack's topic in Modder Support

    176 X 166 pixels is the visible bit
    • May 11, 2016
    • 9 replies
  13. Thornack

    Cant Move Items inside inventory

    Thornack replied to Thornack's topic in Modder Support

    The entire texture is 256x256 but the drawn portion is exact same size as the furnace gui
    • May 11, 2016
    • 9 replies
  14. Thornack

    Cant Move Items inside inventory

    Thornack posted a topic in Modder Support

    Hi everyone, I have created a gui where I have the players inventory and a custom inventory. I have run into the problem where If I click on an item which is inside a player inventory slot I cant seem to move it to my other inventory slots (not even from one player inventory slot to the next) and Im not sure what the issue is? here is my code: Gui class Container Class Inventory Class gui Handler class (I removed the other guis cause I have alot of them in there this is just the stuff pertaining to my custom one with the mouse issues)
    • May 11, 2016
    • 9 replies
  15. Thornack

    Slot alignment with gui issue?

    Thornack posted a topic in Modder Support

    Hi everyone, I am trying to add slots to a gui that the player can open anytime. The purpose of this gui will be so that the player can convert the amount of currency called "Miney" he stored in his ieep to coin items or vice versa (kinda like a deposit/withdrawal system) I have run into a problem however. I cant seem to get my inventory slots to align with the gui "slots". When the game is resized they end up in the incorrect spot. Anyone know how to fix this? My gui is centered and resizes correctly it seems. It is basically the same shape as the default vanilla furnace gui (same size too and has the players inventory as in the vanilla gui). I cant get the slots to stay aligned with the gui on game resize. Anyone know what the issue is and how to solve this? GuiClass ContainerClass
    • May 11, 2016
    • 2 replies
  • All Activity
  • Home
  • Thornack
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community