Skip to content

Attributes#1428

Closed
kashike wants to merge 1 commit intoSpongePowered:bleedingfrom
kashike:feature/attributes
Closed

Attributes#1428
kashike wants to merge 1 commit intoSpongePowered:bleedingfrom
kashike:feature/attributes

Conversation

@kashike
Copy link
Contributor

@kashike kashike commented Dec 9, 2016

@simon816
Copy link
Contributor

Aren't most of these things available (or can be made available) through the data API?

@kashike
Copy link
Contributor Author

kashike commented Dec 10, 2016

@Maxqia
Copy link
Contributor

Maxqia commented Dec 11, 2016

ooooh, I don't have to use NMS anymore for this : https://github.com/Maxqia/MiscStuff/blob/master/src/main/java/com/maxqia/miscstuff/DisableAttackTime.java, btw your Common link is accidentally referencing SpongeAPI

@Cybermaxke
Copy link
Contributor

The Common refers to a wrong pr.

Copy link
Member

@gabizou gabizou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Javadocs please.

Copy link
Member

@gabizou gabizou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarification in javadocs needed. Also, wouldn't this PR fit to have some events? Or usability with Data API being able to perform more modifications than just getting an Attribute instance from Living?

import java.util.UUID;

/**
* An attribute instance.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify? Is it just a container for some values? What does it represent? Who can own one?

import java.util.UUID;

/**
* An attribute modifier.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these for? What do they modify on an Attribute? How do they interact with each other?

import org.spongepowered.api.util.annotation.CatalogedBy;

/**
* An attribute operation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An operation that does "what"?

@randombyte-developer
Copy link

What's the status of this?

@HaedHutner
Copy link

Also interested in a status update on this. Will it make it into API7?

@parlough
Copy link
Contributor

parlough commented Dec 19, 2017

@HaedHutner @randombyte-developer I do not think so unfortunately, but I will see what I can do as this has been a popular request recently.

@HaedHutner
Copy link

HaedHutner commented Dec 19, 2017

@Meronat What else needs to be done on this? I'd be willing to help out

@ryantheleach
Copy link
Contributor

Kashike has some changes locally on this that need to be finished, If anyone picks this up, I'd recommend contacting them first to see what direction it was heading in.

@BrainStone
Copy link

@kashike what's the status on this? I'd love to help out, as I really want to see this implemented!

Also knowing what needs to be done would be helpful. I'd highly apprechiate if you get in contact with me. If you don't mind I'd apprechiate getting write access to your branches, so I don't have to fork it myself and create another PR.

@gabizou
Copy link
Member

gabizou commented May 8, 2018

@BrainStone I'd recommend forking and PR'ing due to the time difference since the original commit from kashike and the current "status" of the API. As the API has evolved since 2016, there are some concepts that need to be changed with how registrations are handled, and other things (look at the registration event for example, build new attributes and register them there). I'd say that it would be safe to start from there, and the implementation as well (can assist with updating the implementation to bring it "up to speed" with other changes, but definitely a "test" would be to write a test plugin that takes advantage of the API and operates with the basis of how the Attribute API can be used by plugins.

@Faithcaio
Copy link
Contributor

@kashike status?

public static final RangedAttributeType MAX_HEALTH = DummyObjectProvider.createFor(RangedAttributeType.class, "MAX_HEALTH");

public static final RangedAttributeType MOVEMENT_SPEED = DummyObjectProvider.createFor(RangedAttributeType.class, "MOVEMENT_SPEED");

Copy link
Contributor

@Cybermaxke Cybermaxke Jun 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also support the generic.reachDistance attribute which is added by forge?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something we can implement in vanilla? Does it need to be synced with the client?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will work nicer that way yes, but you can also make it server side only by blocking interaction if the reach distance is below the client distance, or handle custom interaction if it's the other way around (could also just limit this to forge).

@Cybermaxke
Copy link
Contributor

How can you get/set attribute modifiers on ItemStacks?

@JBYoshi
Copy link
Member

JBYoshi commented Jun 8, 2019

How's this going? I saw a few people asking about this on the forums.

@Sago92
Copy link

Sago92 commented Aug 25, 2019

I am comming from the Sponge forum and I am looking forward for the completion of this implementation. This would be an essential part in my RPG pluing (for example manipulating attack speed of entities and so on ...) Any plan for the finish line?

@SirFancyBacon
Copy link

I also am looking for a way to adjust attack speed on entities.

@gabizou gabizou closed this Oct 8, 2019
@Sago92
Copy link

Sago92 commented Oct 8, 2019

Closed without any final statement? What is the future plan for the ItemStack attributes like attack speed?

@gabizou
Copy link
Member

gabizou commented Oct 8, 2019

The branch needs to be rebased/recreated based on api-8. Bleeding and 1.13 are severely outdated, so they were deleted. Unfortunately, GitHub doesn't have a way to automatically re-target the PR's that were targeting those branches, so it auto-closes them. It'll be looked at after some deployments get working to build api-8, but for now this PR needs to be rebased and rebuilt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.