Most elements that uses loot context parameters confirm that paramaters they are goint to use is not null, and if that’s not the case they returns fallback value (number providers → 0, predicates → false, item modifiers → original stack, etc.).
However, following elements doesn’t perform such confirmation, which can results in crash if they are executed in context that doesn’t have try-catch (e.g. loot table when mobs are killed by non-player damage).
EnchantmentLevelProviderEnvironmentAttributeValueEnvironmentAttributeCheck
How to reproduce
Create world with attacked datapack.
Perform following action to test these classes:
EnchantmentLevelProvider: Summon a silverfish and kill it by non-player damage (e.g. fall damage)EnvironmentAttributeValue: Barter with a piglin.EnvironmentAttributeCheck: Summon an arumadillo and use a brush on them via a dispenser.
※ These specific actions are to call loot tables without required parameter (
enchantment_level for EnchantmentLevelProvider, originfor the other two) outside of try-catch (for exapmle, player attack or command have try-catch).Each of these action causes crash.
We do not have enough information to reproduce this issue.
Please include the following information to help us understand your problem:
Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.
Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.
This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki