Interface ICognitiveInducerMarks
- All Known Implementing Classes:
CognitiveInducerMarksImpl
public interface ICognitiveInducerMarks
Capability to be attached to Villagers marked by the Cognitive Inducer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraftforge.common.capabilities.Capability<ICognitiveInducerMarks>static final net.minecraft.resources.ResourceLocation -
Method Summary
Modifier and TypeMethodDescriptiongetMarks()Returns a sorted set of all marks.voidmark(long gameTime) Marks the villager indicating that a cognitive inducer tried to take an impression.voidpruneMarks(long gameTime) Prunes any marks older than the configured retention time.static voidwith(net.minecraft.world.entity.npc.Villager villager, net.minecraftforge.common.util.NonNullConsumer<ICognitiveInducerMarks> consumer) Passes theICognitiveInducerMarkscapability for the givenVillagerto the consumer.static <T> TwithF(net.minecraft.world.entity.npc.Villager villager, net.minecraftforge.common.util.NonNullFunction<ICognitiveInducerMarks, T> func) Calls func with theICognitiveInducerMarkscapability for the givenVillager.
-
Field Details
-
CAPABILITY
-
ID
static final net.minecraft.resources.ResourceLocation ID
-
-
Method Details
-
with
static void with(net.minecraft.world.entity.npc.Villager villager, net.minecraftforge.common.util.NonNullConsumer<ICognitiveInducerMarks> consumer) Passes theICognitiveInducerMarkscapability for the givenVillagerto the consumer.Note: In practice, the capability will always be present as it is attached unconditionally in
CapabilityEventHandler. -
withF
static <T> T withF(net.minecraft.world.entity.npc.Villager villager, net.minecraftforge.common.util.NonNullFunction<ICognitiveInducerMarks, T> func) Calls func with theICognitiveInducerMarkscapability for the givenVillager.Note: In practice, the capability will always be present as it is attached unconditionally in
CapabilityEventHandler. -
mark
void mark(long gameTime) Marks the villager indicating that a cognitive inducer tried to take an impression.- Parameters:
gameTime- The current game time as per `Level.getGameTime()`
-
getMarks
Returns a sorted set of all marks. -
pruneMarks
void pruneMarks(long gameTime) Prunes any marks older than the configured retention time.- Parameters:
gameTime- The current game time as per `Level.getGameTime()`
-