-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
Craft items with custom names #2313
Comments
This seems to be similar to #2234 While it's not within the scope of Quests to handle objects from other plugins (that's what modules and such are for), I'm curious if it's possible to find a general solution using just the Bukkit API. @S4r3ss Can you provide some more details on how to replicate this with Oraxen? What sort of item you created, how you added the crafting recipe, how to get the item in your hand, etc.? |
@PikaMug exist 2 ways of creating custom items. I have explained one of them on description, using oraxen and other one is in native minecraft, but little bit harder to do I will create steps to reproduce for both of them, and if you will have some questions, don't forget to ping me. For Native minecraft For oraxen plugin is much easier. It already has custom items and you can just modify them as you want. But, it's supporting additional plugin, so would be better to implement it at least for native minecraft |
Ohh, and also, I forget about crafting receipt. You can use this guide to impelent it You just need to modify the result item, to give him custom_model_data and that's it. Crafting receip for custom item is created |
That would be appreciated. Still unsure of how to create an item with Oraxen. If you'd rather I use your 'needle' item data instead, then I need to know where to put it and how to then acquire it in-game. |
@PikaMug okay, you want to proceed with oraxen then Open plugins/Oraxen/items/items.yml Inside this file you should add needle:
Enchantments:
sharpness: 1
ItemFlags:
- HIDE_ENCHANTS
itemname: <yellow>Голка
material: PAPER
lore:
- <yellow>Використовуйте даний предмет для крафту теплої броні
Pack:
generate_model: true
parent_model: item/generated
textures:
- default/needle.png
custom_model_data: 1026 Next, open plugins/Oraxen/recipes/shaped.yml There you should add next code needle:
result:
oraxen_item: needle
ingredients:
A:
minecraft_type: IRON_NUGGET
shape:
- OAO
- AOO
- OOO And also, add texture inside plugins/Oraxen/pack/textures/default. This texture should have name "needle". There are example of our picture, you can use it And now you can give this needle in minecraft using command or craft it, using iron nuggets, like you craft shears |
Thank you. I gave that a try, but the quest seemed to work fine. The only strange thing was server chat displaying the item as 'Paper' but I'm guessing that's because it does not have a displayname. For reference, here's the quest I used: '000001':
name: craftNeedle
ask-message: Challenge objectives!
finish-message: Well done!
stages:
ordered:
'1':
items-to-craft:
- ==: org.bukkit.inventory.ItemStack
v: 4082
type: PAPER
meta:
==: ItemMeta
meta-type: UNSPECIFIC
item-name: '{"text":"Голка","color":"yellow"}'
lore:
- '{"text":"","extra":[{"text":"Використовуйте даний предмет для крафту
теплої броні","obfuscated":false,"italic":false,"underlined":false,"strikethrough":false,"color":"yellow","bold":false}]}'
custom-model-data: 1052
enchants:
minecraft:sharpness: 1
ItemFlags:
- HIDE_ENCHANTS
PublicBukkitValues: |-
{
"oraxen:id": "needle"
} |
@PikaMug but what if you set display name, quest will still keep working? |
@S4r3ss I did not see a reason to test that, as the bottomline is it worked fine. Not sure what the issue could be on your end. If you'd like to share the quest you're using I could try to identify a difference, but if that checks out then all I can do is recommend that you investigate potential plugin conflicts. |
What does your feature do?
Plugin can't detect when user is crafting custom item, configured using plugin Oraxen
Item could have custom name with colors and lore
If it is already exist, please let me know how to configure it. My item data is
There are how I was trying to catch it, using your plugin
How would people use it?
From my perspective, it will allow people to use custom crafts, created by other plugins (like in my case) or using datapacks (also could be implemented in this way)
The text was updated successfully, but these errors were encountered: