Interface ResearchTeam
- All Known Implementing Classes:
ResearchTeamImpl
public interface ResearchTeam
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidvoidaddMember(UUID member, ResearchTeamRole role) longGets the creation time of the teamdefault @Nullable ResearchProgressFetches the progress of the researchPack that is currently researching.default @Nullable net.minecraft.resources.ResourceKey<Research> Gets the researchPack that is currently researching@NotNull UUIDgetId()@NotNull TeamMember@NotNull SequencedCollection<TeamMember> @NotNull StringgetName()@Nullable TeamMembergetOwner()@NotNull ResearchQueuegetQueue()@NotNull Map<net.minecraft.resources.ResourceKey<Research>, ResearchInstance> @NotNull Map<net.minecraft.resources.ResourceKey<Research>, ResearchProgress> @NotNull TeamSocialManagerbooleanvoidinit(net.minecraft.world.level.Level level) booleanisModerator(UUID member) booleanvoidonCompleteResearch(net.minecraft.resources.ResourceKey<Research> research, long completionTime, boolean forced, Function<UUID, net.minecraft.world.entity.player.Player> playerGetter) default voidonCompleteResearch(net.minecraft.resources.ResourceKey<Research> research, long completionTime, Function<UUID, net.minecraft.world.entity.player.Player> playerGetter) voidonRemoveResearch(net.minecraft.resources.ResourceKey<Research> research, Function<UUID, net.minecraft.world.entity.player.Player> playerGetter) Inverse ofonCompleteResearch(net.minecraft.resources.ResourceKey<com.portingdeadmods.researchd.api.research.Research>, long, boolean, java.util.function.Function<java.util.UUID, net.minecraft.world.entity.player.Player>): flips the research back to non-completed, firesonLockto reverse the effect, and syncs the team.voidvoidremoveMember(UUID member) voidsetCreationTime(long creationTime) Sets the creation time of the team.voidSet the display name of this teamvoidsetResearchCompleted(net.minecraft.resources.ResourceKey<Research> research, long completionTime) voidsetRole(UUID member, ResearchTeamRole role)
-
Method Details
-
getName
- Returns:
- The display name of this team
-
setName
Set the display name of this team- Parameters:
name- The new display name of the team
-
getId
- Returns:
- The unique uuid of this team
-
getCreationTime
long getCreationTime()Gets the creation time of the team- Returns:
- the time in ticks when the team was created
-
setCreationTime
void setCreationTime(long creationTime) Sets the creation time of the team. This should be correctly relative to further calculations.- Parameters:
creationTime- The time in ticks when the team was created.
-
getOwner
-
getMember
- Returns:
- the team member for the given player uuid. Never null; players that are
not part of this team are returned as members with the
ResearchTeamRole.NOT_MEMBERrole.
-
hasMember
-
addMember
-
addMember
-
removeMember
-
getMembers
-
setRole
-
isModerator
-
isOwner
-
getSocialManager
-
getCurrentResearch
Gets the researchPack that is currently researching- Returns:
ResourceKeyof the researchPack or null if no researchPack is currently in progress
-
getCurrentProgress
Fetches the progress of the researchPack that is currently researching.- Returns:
ResearchProgressof the researchPack or null if no researchPack is currently in progress.
-
init
void init(net.minecraft.world.level.Level level) -
getQueue
-
getResearches
@NotNull @NotNull Map<net.minecraft.resources.ResourceKey<Research>,ResearchInstance> getResearches() -
getResearchProgresses
@NotNull @NotNull Map<net.minecraft.resources.ResourceKey<Research>,ResearchProgress> getResearchProgresses() -
setResearchCompleted
void setResearchCompleted(net.minecraft.resources.ResourceKey<Research> research, long completionTime) -
onCompleteResearch
-
onCompleteResearch
-
onRemoveResearch
void onRemoveResearch(net.minecraft.resources.ResourceKey<Research> research, Function<UUID, net.minecraft.world.entity.player.Player> playerGetter) Inverse ofonCompleteResearch(net.minecraft.resources.ResourceKey<com.portingdeadmods.researchd.api.research.Research>, long, boolean, java.util.function.Function<java.util.UUID, net.minecraft.world.entity.player.Player>): flips the research back to non-completed, firesonLockto reverse the effect, and syncs the team. -
refreshResearchStatus
void refreshResearchStatus()
-