Giter VIP home page Giter VIP logo

Comments (6)

lcy0x1 avatar lcy0x1 commented on September 3, 2024

For problem 1, it's because WrappedCurio::getDynamicModifiers invokes AccessoryAttributeBuilder::addExclusive, which use Map<ResourceLocation, AttributeModificationData>. It should be using Map<Holder<Attribute>, Map<ResourceLocation, AttributeModificationData>> or Table<Holder<Attribute>>, ResourceLocation, AttributeModificationData> instead.

from accessories.

Dragon-Seeker avatar Dragon-Seeker commented on September 3, 2024
  1. Is the problem that AttributeModifier across multiple Attribute share the same ResourceLocation or is it the fact that multiple AttributeModifier have the same ResourceLocation for a single Attribute

from accessories.

lcy0x1 avatar lcy0x1 commented on September 3, 2024

@Dragon-Seeker The problem is having several AttributeModifiers sharing the same ResourceLocation for multiple Attributes

The method provides a ResourceLocation that wants the accessory to use for its attribute modifiers. The issue 1 can technically be solved by appending a different suffix for every modifier, but most mods are not doing that

from accessories.

Dragon-Seeker avatar Dragon-Seeker commented on September 3, 2024

Ah, that is really odd and frankly concerning as the ResourceLocation would be unique across all AttributeModifier's but Minecraft doesn't enforce such even though they merged the id and name into one field to uniquely identifier the attribute with info about why or naming the modifier instance so it kind seems lazy to just share across every modifer but I guess since vanilla allows such I will need to adjust such even if I feel that this should not happen its just not enforced.

  1. I did not know the API functioned like such as it is quite odd, to say the least. I understand its reasons but I believe that Accessories should attempt to use the Vanilla method ItemStack.addModifierTooltip and any mods should attempt injection within there to adjust the Attribute tooltips. Understandable that currently, this affects the Curios API but I don't really know exactly fix such an issue as the Accessories API isn't designed for such. Frankly, I don't want to redesign this as it seems like the incorrect method to deal with this.

from accessories.

lcy0x1 avatar lcy0x1 commented on September 3, 2024

The tooltip modification part is there to help with the missing Attribute tooltip customization from Forge/NeoForge. I think there is a PR regarding this in NeoForge currently?

from accessories.

lcy0x1 avatar lcy0x1 commented on September 3, 2024

If this PR is completed, I wouldn't need to use the odd attribute tooltip method
neoforged/NeoForge#1371

from accessories.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.