Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inventory Transactions (Work in Progress) #67

Merged
merged 46 commits into from Feb 29, 2020

Conversation

AJ-Ferguson
Copy link
Member

@AJ-Ferguson AJ-Ferguson commented Oct 20, 2019

Work in progress.
Testing is wanted and edits are welcomed.

List of things that should be working:

  • Basic left/right clicking
  • Shift clicking
  • Double clicking to fill stack
  • Touchscreen
  • Dropping items
  • Using menus in custom servers (Hypixel, Mineplex, etc.)
  • Opening Basic Containers
  • Crafting
  • Item spreading
  • Creative mode
  • Enchanted items
  • Basic potions

List of known issues:

  • Custom potions
  • Some windows have not been implemented yet
    • Enchanting Table
    • Beacon
    • Cartography Table
    • Lectern
    • Loom
    • Stonecutter
    • Villager Trading
  • Changing the cursor. The bedrock client is bugged when changing the cursor. (Fixed in BE 1.14)

getChunkBlock() in ChunkPosition returned incorrect values when negative numbers were inputted.

ChunkPosition did not function correctly when used as a key for maps because it did not override equals() and hashCode()
Mineplex server seemed to be sensitive about quotes in string tags
@FrostNovaHD
Copy link
Contributor

@AJ-Ferguson right click on bukkit is inverted i got long tab it ehh and 1 row chest gui is litlte ampty so could fill that with glass panes or soemting?

@Flonja
Copy link

Flonja commented Oct 21, 2019

Do chests that aren't 3 or 6 rows work?

@FrostNovaHD
Copy link
Contributor

yes they do

@Redned235 Redned235 marked this pull request as ready for review October 21, 2019 22:52
@Redned235 Redned235 added the Work in Progress The issue is currently being worked on. label Oct 21, 2019
@FrostNovaHD
Copy link
Contributor

FrostNovaHD commented Oct 22, 2019

there are two bugs one of them i cant rigtclick on a item

seccond one is in kits gui there is close item and a back item both dont work

both in touch and and mouse and keyboard

@FrostNovaHD
Copy link
Contributor

also i did get a error

�[31;1mCould not translate packet ServerSetSlotPacket java.lang.ArrayIndexOutOfBoundsException: 45�[0m java.lang.ArrayIndexOutOfBoundsException: 45 at org.geysermc.connector.network.translators.java.window.JavaSetSlotTranslator.translate(JavaSetSlotTranslator.java:79) at org.geysermc.connector.network.translators.java.window.JavaSetSlotTranslator.translate(JavaSetSlotTranslator.java:43) at org.geysermc.connector.network.translators.Registry.translate(Registry.java:54) at org.geysermc.connector.network.session.GeyserSession$1.packetReceived(GeyserSession.java:186) at com.github.steveice10.packetlib.event.session.PacketReceivedEvent.call(PacketReceivedEvent.java:51) at com.github.steveice10.packetlib.tcp.TcpSession.callEvent(TcpSession.java:143) at com.github.steveice10.packetlib.tcp.TcpSession$3.run(TcpSession.java:343) at java.lang.Thread.run(Thread.java:748)

Fix offhand, use AtomicInteger for transaction id, send null stack instead of air, and clear open inventory on dimension change
@AJ-Ferguson
Copy link
Member Author

AJ-Ferguson commented Oct 22, 2019

there are two bugs one of them i cant right click on a item

I don't think it is possible to fix that. The bedrock client does not send whether the user left or right clicked, only the changed amounts. I made it default to left clicking on a 1 item stack.

EDIT: To clarify, I'm talking about differentiating a left or right click on an item stack containing one item.
It is of course possible to find out which click it was on an item stack containing more than one item using simple math.

@EOT3000
Copy link
Contributor

EOT3000 commented Oct 22, 2019

pspe does it so press+hold = double click

@EOT3000
Copy link
Contributor

EOT3000 commented Oct 23, 2019

*right click

@FrostNovaHD
Copy link
Contributor

FrostNovaHD commented Oct 23, 2019

there are two bugs one of them i cant right click on a item

I don't think it is possible to fix that. The bedrock client does not send whether the user left or right clicked, only the changed amounts. I made it default to left clicking on a 1 item stack.

Indeed what @EOT3000 says in pspe It works so why cant you get It to work?

@FrostNovaHD
Copy link
Contributor

@FrostNovaHD
Copy link
Contributor

@Kasjuhh
Copy link

Kasjuhh commented Oct 29, 2019

A dropper gets seen as a Dispenser on bedrock side

@Kasjuhh
Copy link

Kasjuhh commented Oct 29, 2019

Clicking on Y on an item to shift click it doesnt work on armor. Tps item back to original spot

Some translation identifiers such as "container.blast_furnace" are not being translated yet
anvil, brewing stand, crafting table (still no crafting yet), shulker box
@ghost
Copy link

ghost commented Jan 3, 2020

Is this going to continue?

# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/session/GeyserSession.java
#	connector/src/main/java/org/geysermc/connector/network/translators/TranslatorsInit.java
#	connector/src/main/java/org/geysermc/connector/network/translators/java/JavaRespawnTranslator.java
@Encritary
Copy link

Cursor change bug was actually fixed in 1.14

@AJ-Ferguson
Copy link
Member Author

I'm currently rewriting most of the inventory code. The cursor will be handled properly in the rewrite now that the bug is fixed.

@FrostNovaHD
Copy link
Contributor

What's different in rewrite then how it's in it current state its usable and stable only thing I cant is do q to drop a item or tab hold it to right click in custom inventory and I made workarounds for that a custom inventory for it

@Pecacheu
Copy link

Pecacheu commented Jan 22, 2020

Inventory management is working perfectly for me in the current release, only crafting does not work, nothing shows in the output slot.

EDIT: Never mind, must have downloaded from master branch instead of the pull request, crafting is working.

Still much to do.
Inventory desyncing when crafting will be fixed soon.
This fixes the NPE when sending an ItemStack with a null NBT tag.
This also fixes some item movement bugs on pure vanilla servers.
Copy link

@Daisreich Daisreich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good!

@Khushashi Khushashi mentioned this pull request Feb 5, 2020
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/translators/TranslatorsInit.java
#	connector/src/main/java/org/geysermc/connector/utils/Toolbox.java
Quick fix. Might have a different method for getting block IDs in the future
@jackson-57 jackson-57 mentioned this pull request Feb 26, 2020
# Conflicts:
#	connector/src/main/java/org/geysermc/connector/network/translators/TranslatorsInit.java
#	connector/src/main/java/org/geysermc/connector/network/translators/inventory/updater/ChestInventoryUpdater.java
@Redned235 Redned235 changed the base branch from master to inventory February 29, 2020 19:28
@Redned235 Redned235 merged commit 964663f into GeyserMC:inventory Feb 29, 2020
@FrostNovaHD
Copy link
Contributor

Right click doesn't work in costom inventories like previewing a kit

@FrostNovaHD
Copy link
Contributor

Some times a item ghost around in the costom inventories

@AJ-Ferguson AJ-Ferguson deleted the inventory branch April 12, 2020 18:04
Hellohi3654 added a commit to HelloGeyser/Geyser that referenced this pull request Sep 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Work in Progress The issue is currently being worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet