Skip to content
This repository has been archived by the owner on Apr 22, 2019. It is now read-only.

EMC values for enchantments #940

Open
BigXplosion opened this issue Jul 7, 2015 · 11 comments
Open

EMC values for enchantments #940

BigXplosion opened this issue Jul 7, 2015 · 11 comments
Assignees
Labels
Milestone

Comments

@BigXplosion
Copy link

I'm wondering if it is possible to take the enchantments into account for the tools? Best way to do this is probably calculating an extra EMC value on top of the original one with the use of the enchantment weight and level. Maybe something like this:

public int getAdditionEnchantmentEMC(ItemStack stack) {
        int result = 0;

        Map<Integer, Integer> enchantments = EnchantmentHelper.getEnchantments(stack);

        if (!enchantments.isEmpty())
        {
            for (Map.Entry<Integer, Integer> entry : enchantments.entrySet())
            {
                Enchantment enchantment = Enchantment.enchantmentsList[entry.getKey()];

                if (enchantment.getWeight() == 0)
                {
                    continue;
                }

                result += 5000 / enchantment.getWeight() * entry.getValue();
            }
        }

        return result;
}

If this would be added I would say to not make the enchanted item learnable (if this isn't already the case)

@MatanShahar
Copy link

I don't know if fits the theme of the mod all that well. Enchantments are not exactly matter. Regardless it seems that you have some working knowledge in java, you're more than welcome to make a pull request. It's up to Pahimar to accept it though.

@BigXplosion
Copy link
Author

i wanted to ask first before PRing it in

@pahimar pahimar added the idea label Aug 21, 2015
@pahimar pahimar self-assigned this Aug 21, 2015
@pahimar pahimar modified the milestones: 0.3.*, Roadmap May 28, 2016
@pahimar
Copy link
Owner

pahimar commented May 28, 2016

This would definitely be possible, but not sure about how I feel about it. Currently (because you can set EMC values for items that have NBT data) you could set a value on an enchanted item. However, that is per item. This idea would support EMC values per enchantment.

Open to discussion on this.

@pahimar pahimar changed the title think about enchantments when showing/using the EMC value EMC values for enchantments May 28, 2016
@SonOfTheStars
Copy link

Great idea! There is defenitly time and effort put into enchants so you should get more out of it AND pay more for creating them

@GeoTerra
Copy link

I would be in support of this. Reasons being that, as Bitterholz said, to get enchants (in a vanilla environment anyways) you need to invest the time and effort, and lore-wise, enchants can be considered as additional energy imbued into the item.

@MaPePeR
Copy link

MaPePeR commented May 28, 2016

ProjectE does this in a way, so I guess it was also part of EE2?

It's a fixed amount of emc for the level of the enchantment, I think.

It caused some problems in the past, though.

@tahg
Copy link

tahg commented May 28, 2016

As far as I know, no, this was not a part of EE2.

@MaPePeR
Copy link

MaPePeR commented May 28, 2016

I don't know for sure. It was part of ProjectE since forever and was included in the code MozeIntel wrote.

I have to correct myself: The part that caused the real problems was the "Reduce amount of emc for damaged tools" and not the enchantment bonus.

@BigXplosion
Copy link
Author

@Bitterholz, that was the exact idea I had when I made this issue! I needed it for a mod I was making back then although it's put on hold now :D

@MercuriusXeno
Copy link
Collaborator

MercuriusXeno commented Aug 9, 2016

Late to the party, but I think it goes against the spirit of the mod. EMC Values for entities, I can get behind. Items, duh. Blocks yes. Enchantments, bit nebulous. I could use some convincing.

I've been doing some thinking and I've really come around on this. I'm not sure what it is about it, but I realize now that we could do something pretty fun with this.

Edit: To be honest, I like the idea of EE3 breaking the conventions of tools/enchantments altogether. I'd like to see people doing more with alchemy. But that's just my two cents.

@MercuriusXeno
Copy link
Collaborator

One of my thoughts on this over the past day or so is a little incoherent, but I'm going to suss it out and share it with Pahimar and hope he likes it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants