Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I am trying to find a way to move items from the player into an opened chest, kind of like a death chest mod but completely client side, so that it will work on servers. What I tried using is this (inside of a keybind):

 

EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;

player.openContainer.transferStackInSlot(player, 1);

 

This transfers the items in slot one of the chest into the player's inventory when I press the bound key and have a chest open, but once you try to pick up the transferred items, they revert to where they were before. I tried adding this, to see if it would help:

 

player.openContainer.detectAndSendChanges();

player.inventoryContainer.detectAndSendChanges();

 

But those didn't help either. What should I do to get this code to work, or is there another method that will work? Thanks in advance!

completely client side, so that it will work on servers

:o

You got it completely wrong. It is the opposite.

It will never work on server if it is client side.

Use a KeyHandler to send a packet to server side, then move items to the chest.

  • Author

That may have been a bit unclear. I meant so that I can run it on my client, and it will still work while connected to a server instead of just SSP. Since it has to work on a client while connected to a server, I cant just do something like delete the items in the player inventory and add them in the chest, as the server would not let the client do this.

You can't.  Client side is visual only.

 

If you want something to function like you have described, it would need to be a mod that is installed on the server.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

The client has to send the message to the server when it receives the shift click on an item in the inventory. Is there not a way to spoof this and send what ever info to the server that it would send if I had actually gone in and shift clicked a slot myself?

The client has to send the message to the server when it receives the shift click on an item in the inventory. Is there not a way to spoof this and send what ever info to the server that it would send if I had actually gone in and shift clicked a slot myself?

 

Having a container open involves a lot of voodoo.  You can't spoof that.  Opening a chest actually DOES stuff on the server side so the server knows what inventory you're interacting with.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.