Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TrialSpawner methods for end of cooldown and next mob spawn time #12025

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Doc94
Copy link
Contributor

@Doc94 Doc94 commented Jan 27, 2025

This resolve #12023 by adding two new methods related to the when the cooldown ends in gametime and when the next mob spawn in gametime.

ref: https://minecraft.wiki/w/Trial_Spawner

@Doc94 Doc94 requested a review from a team as a code owner January 27, 2025 18:51
@Doc94 Doc94 requested a review from lynxplay January 29, 2025 01:32
@kennytv kennytv added type: feature Request for a new Feature. scope: api labels Jan 31, 2025
Copy link
Member

@kennytv kennytv left a comment

Choose a reason for hiding this comment

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

Gametime -> game time and you could maybe add a @see tag for a method to get the game time, else looks good

@Doc94
Copy link
Contributor Author

Doc94 commented Jan 31, 2025

based in others PR is valid implement jspecify in this classes or can be done in another PR?

@kennytv
Copy link
Member

kennytv commented Jan 31, 2025

Since you're already changing all method lines you might as well update the annotations here yeah 👍 add nullmarked at the top and remove the explicit notnull annotations

Doc94 added 3 commits January 31, 2025 09:15
…e/trial-spawner-state-more-methods

# Conflicts:
#	paper-api/src/main/java/org/bukkit/block/TrialSpawner.java
@@ -102,16 +132,15 @@ public interface TrialSpawner extends TileState {
* @return a collection of entities this spawner is tracking or an empty
* collection if there aren't any
*/
@NotNull
public Collection<Entity> getTrackedEntities();
Collection<Entity> getTrackedEntities();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why there is a space here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

skill issue.

@Override
public void onEnable() {
this.getServer().getPluginManager().registerEvents(this, this);

// io.papermc.testplugin.brigtests.Registration.registerViaOnEnable(this);
testBlockData = Material.PISTON.createBlockData();
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to revert that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: api type: feature Request for a new Feature.
Projects
Status: Changes required
Development

Successfully merging this pull request may close these issues.

TrialSpawner API is very lacking
4 participants