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 ResearchProgressFetches the progress of the researchPack that is currently researching.default net.minecraft.resources.ResourceKey<Research> Gets the researchPack that is currently researchinggetId()getName()getOwner()getQueue()Map<net.minecraft.resources.ResourceKey<Research>, ResearchInstance> Map<net.minecraft.resources.ResourceKey<Research>, ResearchProgress> booleanvoidinit(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
String 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
UUID 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
TeamMember getOwner() -
getMember
-
hasMember
-
addMember
-
addMember
-
removeMember
-
getMembers
SequencedCollection<TeamMember> getMembers() -
setRole
-
isModerator
-
isOwner
-
getSocialManager
TeamSocialManager 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
ResearchQueue getQueue() -
getResearches
Map<net.minecraft.resources.ResourceKey<Research>,ResearchInstance> getResearches() -
getResearchProgresses
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()
-