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

Cannot Copy Books #3682

Open
TheFloyds4240 opened this issue Apr 17, 2023 · 1 comment · May be fixed by #4784
Open

Cannot Copy Books #3682

TheFloyds4240 opened this issue Apr 17, 2023 · 1 comment · May be fixed by #4784
Labels
Confirmed Bug The bug reported is confirmed and able to be replicated.

Comments

@TheFloyds4240
Copy link
Contributor

Describe the bug

A player sent me this video saying that they cannot copy books using a crafting table.

To Reproduce

  1. Write a book
  2. Get another book
  3. Place them on a crafting table
  4. Try to move the new book to your inventory
  5. Book glitches back to the crafting table

Expected behaviour

The book is expected to move into the player's inventory

Screenshots / Videos

Minecraft_2023-04-03_20-55-04-1.mp4

Server Version and Plugins

I don't have console access to the server - It's on PurpurMC 1.19.3

Geyser Dump

https://dump.geysermc.org/7DHpYrH4sqJz972yZqcV1qJJqQbrRLhp

Geyser Version

Latest

Minecraft: Bedrock Edition Device/Version

PE

Additional Context

NA

@davchoo davchoo added the Confirmed Bug The bug reported is confirmed and able to be replicated. label May 22, 2023
@YHDiamond
Copy link
Contributor

Did some digging... This issue (which doesn't occur 100% of the time by the way) seems to be caused by the deprecatedCraftAction returning two result items instead of one... Looking at the ItemData it seems the only discrepancy between the two items is the "generation" field in which one version has "1i" and the other has "2i" which seems to be referring to the number of generations to the original source book.

Turn on debug mode and you can see this for yourself, or take a look at the error from when I tried.

java.lang.Throwable: DEBUGGING: ItemStackRequest rejected ItemStackRequest(requestId=-1699, actions=[CraftRecipeAction(recipeNetworkId=5), CraftResultsDeprecatedAction(resultItems=[BaseItemData(definition=SimpleItemDefinition(identifier=minecraft:written_book, runtimeId=524, componentBased=false), damage=0, count=1, tag={
  "GeyserHash": -754300022i,
  "author": "YHDiamond",
  "generation": 2i,
  "pages": [
    {
      "photoname": "",
      "text": "test"
    }
  ],
  "title": "TEST"
}, canPlace=[], canBreak=[], blockingTicks=0, blockDefinition=GeyserBedrockBlock{minecraft:cyan_terracotta}, usingNetId=false, netId=0), BaseItemData(definition=SimpleItemDefinition(identifier=minecraft:written_book, runtimeId=524, componentBased=false), damage=0, count=1, tag={
  "GeyserHash": -754300022i,
  "author": "YHDiamond",
  "generation": 1i,
  "pages": [
    {
      "photoname": "",
      "text": "test"
    }
  ],
  "title": "TEST"
}, canPlace=[], canBreak=[], blockingTicks=0, blockDefinition=GeyserBedrockBlock{minecraft:cyan_terracotta}, usingNetId=false, netId=0)], timesCrafted=1), ConsumeAction(count=1, source=ItemStackRequestSlotData(container=CRAFTING_INPUT, slot=36, stackNetworkId=221)), ConsumeAction(count=1, source=ItemStackRequestSlotData(container=CRAFTING_INPUT, slot=40, stackNetworkId=218)), CreateAction(slot=0), TakeAction(count=1, source=ItemStackRequestSlotData(container=CREATED_OUTPUT, slot=50, stackNetworkId=-1699), destination=ItemStackRequestSlotData(container=CURSOR, slot=0, stackNetworkId=0)), CreateAction(slot=1), PlaceAction(count=1, source=ItemStackRequestSlotData(container=CREATED_OUTPUT, slot=50, stackNetworkId=-1699), destination=ItemStackRequestSlotData(container=HOTBAR_AND_INVENTORY, slot=31, stackNetworkId=157))], filterStrings=[], textProcessingEventOrigin=null)
	at org.geysermc.geyser.translator.inventory.InventoryTranslator.rejectRequest(InventoryTranslator.java:811)
	at org.geysermc.geyser.translator.inventory.InventoryTranslator.rejectRequest(InventoryTranslator.java:800)
	at org.geysermc.geyser.translator.inventory.InventoryTranslator.translateCraftingRequest(InventoryTranslator.java:473)
	at org.geysermc.geyser.translator.inventory.InventoryTranslator.translateRequests(InventoryTranslator.java:170)
	at org.geysermc.geyser.translator.protocol.bedrock.BedrockItemStackRequestTranslator.translate(BedrockItemStackRequestTranslator.java:48)
	at org.geysermc.geyser.translator.protocol.bedrock.BedrockItemStackRequestTranslator.translate(BedrockItemStackRequestTranslator.java:38)
	at org.geysermc.geyser.registry.PacketTranslatorRegistry.translate0(PacketTranslatorRegistry.java:89)
	at org.geysermc.geyser.registry.PacketTranslatorRegistry.lambda$translate$0(PacketTranslatorRegistry.java:69)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
	at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

@YHDiamond YHDiamond linked a pull request Jun 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Confirmed Bug The bug reported is confirmed and able to be replicated.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants