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

Turn "broken" items into a non tool item (like a stick) until repaired #111

Open
Draycia opened this issue Aug 19, 2019 · 6 comments
Open
Labels
enhancement New feature or request unsure May or may not be implemented / fixed

Comments

@Draycia
Copy link
Contributor

Draycia commented Aug 19, 2019

Is your feature request related to a problem? Please describe.
Other plugins can behave weirdly with MT when items are "broken".
Causing duplication glitches (?) or other weird behaviour.

Describe the solution you'd like
Turn items into sticks or another non usable item when "broken".
When the item is repaired it turns back to the original item.

Describe alternatives you've considered
N/A

Additional context
I can see this working well when MT repair is used but I don't know how anvil repairing would work with this. We would probably have to manually listen to inventory clicks.

We'd also have to have ways of converting items to and from sticks.
I know vanilla has JSON serialization and deserialization for items.
We could probably go with that?

@Draycia Draycia added the enhancement New feature or request label Aug 19, 2019
@Draycia
Copy link
Contributor Author

Draycia commented Aug 19, 2019

Additional note:
New players are very often confused when items break and aren't usable.
The item turning into a stick or something else would grab their attention.
If the broken item has lore saying why it's a stick would help even more.

@Flo56958
Copy link
Owner

Flo56958 commented Aug 22, 2019

How should the items be repaired?

  1. In the Inventory like repairing a non broken item
  2. In the Anvil like vanilla reparations
  3. With the crafting table (with a custom recipe)

Option 1 should be implemented as it would tie in nicely with the current repair system but as it can be toggled off there must be another option for repairing. (I'd prefer option 2 as that would tie in nicely with modding the item)

Idea on implementation:
The stick can have all attributes, enchants and NBT-Values assigned to it. So only a material change should be all that is needed. Maybe the Listener for broken items can do that. The durability check could be removed.
Tools is easy. Armor is something different. This feature would also make armor "unbreakable". Plugins can force any item into the armor slots so no dropping of broken items is needed either.

If UnbreakableItems is turned off the feature should be deactivated.

The stick with a NBT-Tag (like BrokenMTitem: "DIAMOND_PICKAXE") could also be used to add textures to the broken items.

@Draycia
Copy link
Contributor Author

Draycia commented Aug 22, 2019

Option 2 would be the most intuitive but option 3 would make sense too.

@Flo56958
Copy link
Owner

The AnvilListener would be easier to implement as the crafting one, as you can not have a recipe with variable input and output or can you?

@Flo56958 Flo56958 assigned Flo56958 and unassigned Flo56958 Aug 22, 2019
@Flo56958 Flo56958 added this to the Version 1.3 milestone Oct 3, 2019
@Flo56958 Flo56958 removed this from the Version 1.3 milestone Apr 22, 2020
@Flo56958
Copy link
Owner

Don't know, if it is still a good solution. (as it could be to complicated)

@Flo56958 Flo56958 added the unsure May or may not be implemented / fixed label Jun 16, 2020
@Flo56958
Copy link
Owner

when #150: could be part of the ItemManager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request unsure May or may not be implemented / fixed
Projects
None yet
Development

No branches or pull requests

2 participants