Useful Backpacks

Useful Backpacks

22M Downloads

[1.12.2] Useful Backpacks Dupe Bug

focamacho opened this issue ยท 8 comments

commented

Describe the bug
Dupe items using backpacks

To Reproduce
Steps to reproduce the behavior:

  1. Open and drop a backpack at the same time
  2. Take the itens from the backpack gui, and the backpack on the ground
  3. It's all

Expected behavior
Be impossible to pick up the items in the backpack

Versions

  • Mod version: 1.5.1.42
  • Minecraft version: 1.12.2
  • Forge version: Latest 1.12.2
  • UTeamCore version: 2.2.4.133

Obs: It don't happens using UsefulBackpacks 1.5.1.35 & U-Team-Core 2.4.107

commented

Thanks for the report. The issue appeared some time ago (#15 ) too and was fixed there. I'll try to reproduce it and then try to fix it.

commented

When throwing the backpack, open the backpack GUI, then throw the items inside, close the GUI, pick up all the items, and copy an extra item

Versions

Mod version: 1.9.0.52
Minecraft version: 1.15.2
Forge version: Latest 1.15.2
UTeamCore version: 2.10.0.146

commented

Tried to reproduce it but failed. Do you use it on a server or an a single player world?
What do you press first to trigger that bug. Q or Rightclick?

commented

It's very hard to reproduce without some lag, so to do it in singleplayer you'll need a macro.
Press Rightclick first.

commented

Tried it with a macro which like 1ms delay but could not get it to work :/
I'll try it in singleplayer with a high ping simulator.

Are the items real items or ghost items?

commented

server . real items

commented

Found a fix. Will release updates for 1.12.2, 1.14.4 and 1.15.2!
Thanks for reporting this bug!

@Override
public boolean onDroppedByPlayer(ItemStack item, EntityPlayer player) {
	return !(player.openContainer instanceof ContainerBackPack);
}
commented

Thanks. Got the bug going on a local server with a network test tool so simulate a 4000ms rtt:
grafik

To get the bug:

  • Open the backpack
  • Before the gui opens press q
  • When the gui opens the backpack gets drops afterwards but the gui is still open an you can remove items from that.

Looking forward to fix that