mojira.dev
MCPE-162304

Using item json minecraft::weapon will copy the current weapon

There is a serious bug after using item json minecraft::weapon, when I die after attacking with a weapon once, the weapon will drop two pieces, which will cause the enchanted weapon to replicate infinitely in survival mode.

Step 1: Create or download a custom weapon and add the minecraft::weapon component to the project json.
Step 2: Enter the game, no matter what mode, hold the custom weapon in your hand and attack the entity (just guessing this step triggers the on_hurt_entity event, this step is required).
Step 3: Let yourself die, at this point, you can even discard the custom weapon, Whether it's equipped or not, whether you have it or not.
Result: BUG appears, after rebirth go to where you died, and two custom weapons will fall there, you can pick them up and use them. Both weapons are identical, including the enchantment properties.
Please observe the screenshot.

Linked issues

Attachments

Comments 5

"minecraft:weapon": {
     "on_hurt_entity": {
            "event": "on_hurt_entity",
            "target": "self"
       }
}
Adding this component triggers the bug.

Your report does not contain enough information to fully understand or reproduce the problem.
Please include a numbered list of steps along with the Observed and Expected results by Editing the Description above as shown here:

Steps to Reproduce:
1. (list every step exactly, so someone else can reproduce the issue, and try following your list to make sure you can still reproduce the issue yourself)
2.
3.
Observed Results:
(briefly describe what you see happen, including any message(s) shown)
Expected Results:
(briefly describe what should happen)

(add screenshots or video to help explain the issue) A copy of the add-on might also be helpful.

This report has been temporarily closed as Awaiting Response. It will automatically reopen when you add information. Please follow the format shown and include all sections (steps, observed, expected). Reports that do not contain all of the requested information and complete steps to reproduce the issue may be closed as Incomplete. For more information please read the Bug Tracker Guidelines.

You may find this Report Creation Form helpful for any future reports you create.

Thank you for your report!
Thank you for taking the time to report a bug. Unfortunately we are only able to accept bug reports in English since it is the common language used on this tracker.

You are welcome to create a new ticket about your issue in English. You can use an online translator, if it helps.
However, please search before writing a new bug report, as it's very likely that someone else already reported your issue before.
If you find an existing ticket about your issue, you can add a vote and any new information to it instead of reporting it yourself.

Please note that this bug tracker is not for support or technical issues. If you have a payment issue or an issue with your account, please contact Mojang Support. If you need help with a technical issue (e.g. Minecraft doesn't start at all), please contact Community Support.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Sorry,I have updated to English.

Thank you for your report!
We're tracking this issue in MCPE-128897, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

KofLe

(Unassigned)

Unconfirmed

Windows

Windows10

1.19.22 Hotfix

Retrieved