Skip to content

Commit

Permalink
Tag more interfaces as experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Sep 7, 2020
1 parent 7888ec6 commit e4dd7e6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,19 @@
*/
package dev.onyxstudios.cca.api.v3.component;

import net.minecraft.util.Identifier;
import org.jetbrains.annotations.ApiStatus;

/**
* A component that gets ticked alongside the provider it is attached to.
*
* <p>This interface must be visible at factory registration time - which means the class implementing it
* must either be the parameter to {@link ComponentRegistryV3#getOrCreate(Identifier, Class)} or declared explicitly
* using a dedicated method on the factory registry.
*
* <p>Not every provider supports client ticking. Check individual module documentation for more information.
*/
@ApiStatus.Experimental
public interface ClientTickingComponent extends ComponentV3 {
void clientTick();
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,17 @@
*/
package dev.onyxstudios.cca.api.v3.component;

import net.minecraft.util.Identifier;
import org.jetbrains.annotations.ApiStatus;

/**
* A component that gets ticked alongside the provider it is attached to.
*
* <p>This interface must be visible at factory registration time - which means the class implementing it
* must either be the parameter to {@link ComponentRegistryV3#getOrCreate(Identifier, Class)} or declared explicitly
* using a dedicated method on the factory registry.
*/
@ApiStatus.Experimental
public interface ServerTickingComponent extends ComponentV3 {
void tick();
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
import net.fabricmc.fabric.api.event.EventFactory;
import net.minecraft.scoreboard.Scoreboard;
import net.minecraft.server.network.ServerPlayerEntity;
import org.jetbrains.annotations.ApiStatus;

/**
* The callback interface for receiving scoreboard synchronization events.
*/
@FunctionalInterface
@ApiStatus.Experimental
public interface ScoreboardSyncCallback {
Event<ScoreboardSyncCallback> EVENT = EventFactory.createArrayBacked(ScoreboardSyncCallback.class, (p, t) -> {}, listeners -> (player, scoreboard) -> {
for (ScoreboardSyncCallback callback : listeners) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
import net.minecraft.scoreboard.Team;
import org.jetbrains.annotations.ApiStatus;

/**
* The callback interface for receiving global team synchronization events.
*/
@FunctionalInterface
@ApiStatus.Experimental
public interface TeamAddCallback {
Event<TeamAddCallback> EVENT = EventFactory.createArrayBacked(TeamAddCallback.class, (t) -> {}, listeners -> (team) -> {
for (TeamAddCallback callback : listeners) {
Expand Down

0 comments on commit e4dd7e6

Please sign in to comment.