HotFix to PartialItem
This commit is contained in:
parent
85b5228d27
commit
1708216b25
2 changed files with 6 additions and 2 deletions
|
@ -47,7 +47,7 @@ mod_name=Thresholds
|
|||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||
mod_license=GPLv3
|
||||
# The mod version. See https://semver.org/
|
||||
mod_version=1201.4.050724.1919
|
||||
mod_version=1201.4.050724.1934
|
||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||
# This should match the base package used for the mod sources.
|
||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
|
|
|
@ -95,7 +95,11 @@ public class PartialItem extends Item
|
|||
{
|
||||
ItemStack partial = new ItemStack(ModItems.PARTIAL_ITEM.get(), 1);
|
||||
CompoundTag tag = new CompoundTag();
|
||||
tag.put(ItemStack.TAG_ENCH, original.getTag().get(ItemStack.TAG_ENCH));
|
||||
Map<Enchantment, Integer> enchants = EnchantmentHelper.getEnchantments(original);
|
||||
for(Map.Entry<Enchantment, Integer> entry : enchants.entrySet())
|
||||
{
|
||||
partial.enchant(entry.getKey(), entry.getValue());
|
||||
}
|
||||
|
||||
partial.setTag(tag);
|
||||
|
||||
|
|
Reference in a new issue