Geyser icon indicating copy to clipboard operation
Geyser copied to clipboard

Custom Items not in recipe book

Open DokiDerg opened this issue 9 months ago • 1 comments

Describe the bug

After setting up a custom recipe, even with custom model data, the recipe does not show up in the recipe book, java this works fine but on bedrock it seems to now appear

To Reproduce

  1. Create the item:
ItemStack item = new ItemStack(Material.STONE_SWORD);
ItemMeta meta = result.getItemMeta();
meta.setCustomModelData(2);
result.setItemMeta(meta);
  1. Register recipe
NamespacedKey namespacedKey = new NamespacedKey(App.plugin, "wand.teleport",);
ShapedRecipe recipe = new ShapedRecipe(namespacedKey item);
recipe.SetShape(" *#", " |*", "|  ");
recipe.AddIngredient('*', Material.DIAMOND);
recipe.AddIngredient('#', Material.ENDER_PEARL);
recipe.AddIngredient('|', Material.BLAZE_ROD);
recipe.SetCategory(CraftingBookCategory.EQUIPMENT);

getServer().addRecipe(recipe);


// give a player the recipe
player.discoverRecipe(namespacedKey);
  1. Add item with resource pack using model id 2 and a stone sword (let me know if you want those files, any custom item with a texture should work

  2. Finally open the game on java, and the item is in the recipe book, then open it on bedrock and the item is not there

please let me know if i missed any details thats needed or for any extra source

Expected behaviour

For the item to exist in the recipe book, but it does not and rather replaces the original item

Screenshots / Videos

Bedrock (not in the recipe book, but clearly can be crafted) image

Java (is in the recipe book and can be crafted), and the texture for java is my next step, this is the correct item image

Server Version and Plugins

This server is running CraftBukkit version 3856-Spigot-94e187b-b76ceb4 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT)

AdvancedHelp v1.12.7
AdvancedReplay v1.8.4
AntiCheatReplay v2.7.8
AntiPopup v6.2
AutoBackup v1.2.1
ChestCleaner v2.4.4
ChestShop v3.12.2 (build 353)
Chunky v1.3.52
ColoredSigns v6.2.0.211
ConsoleReader v1.5.4-ALPHA
ConsoleSpamFix v1.10.0
CoreProtect v22.0
CrazyAdvancementsAPI v2.1.14
DokiDergPlugin v0.1 < My plugin
dynmap v3.6-beta-2-894
EconomyShopGUI v5.6.0
emotecraft v2.2.7-b.build.50
Essentials v2.20.1
EssentialsAntiBuild v2.20.1
EssentialsChat v2.20.1
EssentialsProtect v2.20.1
FastAsyncWorldEdit v2.7.1
floodgate v2.2.2-SNAPSHOT (b59-2278589)
GCore v8.46.0
Geyser-Spigot v2.2.0-SNAPSHOT
GeyserSkinManager v1.7
GeyserUpdater v1.6.2
GSit v1.5.2
HeadAtDeath v4.0
IllegalStack v2.9.8
LibsDisguises v10.0.38
LuckPerms v5.4.40
Maintenance v4.1.0
Multiverse-Core v4.3.1-b861
Multiverse-Inventories v4.2.3-b523
Multiverse-NetherPortals v4.2.2-b807
Multiverse-Portals v4.2.1-b834
MyCommand v5.7.3
NBTAPI v2.11.3
Orebfuscator v5.4.0
PacketWrapper v1.19.4-2.1.2
Pl-Hide-Pro v2.7.4
PlaceholderAPI v2.11.3
PlayerParticles v8.3
PlugManX v2.3.3
ProtocolLib v5.1.1-SNAPSHOT-673
ServerListPlus v3.5.0
SignShop v3.7.2
SilkSpawners v7.5.0
Spartan vPhase 525
SuperVanish v6.2.18
TAB v4.0.6
TabList v5.7.3
TheMultiWorldMoney v2.3.6
TradeSystem v2.4.0
TrollBoss v6.5.3
UnsignedMessages v1.0.0
Vault v1.7.3-b131
ViaVersion v4.8.1
VillagerMarket v1.11.6
WorldEditSelectionVisualizer v2.1.3
WorldGuard v7.0.9+5934e49
WorldGuardExtraFlags v4.2.1

Geyser Dump

https://dump.geysermc.org/uU4LosnFJqgTgFKxQD7t1q8iBvDKnDoY

Geyser Version

This server is running Geyser version 2.2.0-SNAPSHOT (git-master-06663bc) (Java: 1.20.2, Bedrock: 1.20.0/1.20.1 - 1.20.40)

Minecraft: Bedrock Edition Device/Version

1.20.41 Windows 10 Edition

Additional Context

No response

DokiDerg avatar Nov 07 '23 08:11 DokiDerg

bump

DokiDerg avatar Dec 06 '23 09:12 DokiDerg

Able to reproduce locally. This seems to be due to us not including custom items in the creative inventory - these are, for some reason, linked on Bedrock.

onebeastchris avatar Mar 08 '24 23:03 onebeastchris

Since https://github.com/GeyserMC/Geyser/commit/0ad7c4325d43b0865c0ebea5cd0f83aba93bf40d it's now possible to work around this - you can specify a creative category (and optionally, a creative group) to add custom items to the Bedrock creative inventory. It won't be possible to get them through it, but the benefit of adding them anyways is that custom recipes that output this custom item actually show up in the recipe book :)

For an example, see the linked PR - a little mappings modification is all that's required to fix this. Thanks for reporting the issue!

onebeastchris avatar Mar 10 '24 22:03 onebeastchris

@onebeastchris Could you make an example how to use it? I'm using Bukkit.addRecipe() and I can't research the custom recipes on bedrock client.

lucasfrederico avatar Apr 12 '24 20:04 lucasfrederico

@lucasfrederico It would be done in Geysers mappings for the custom item in the recipe output.

See the example in this PR: https://github.com/GeyserMC/Geyser/pull/4484

onebeastchris avatar Apr 12 '24 20:04 onebeastchris