Class AstralTrinketPredicate
java.lang.Object
dev.jaxydog.astral.content.trinket.AstralTrinketPredicate
- All Implemented Interfaces:
Registered,Registered.Common
Wraps a trinket predicate for automatic registration.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.jaxydog.astral.register.Registered
Registered.All, Registered.Client, Registered.Common, Registered.Generated, Registered.Server -
Constructor Summary
ConstructorsConstructorDescriptionAstralTrinketPredicate(String path, com.mojang.datafixers.util.Function3<net.minecraft.item.ItemStack, dev.emi.trinkets.api.SlotReference, net.minecraft.entity.LivingEntity, net.fabricmc.fabric.api.util.TriState> predicate) Creates a new predicate wrapper. -
Method Summary
Modifier and TypeMethodDescriptionReturns this value's associated registry identifier path.voidRegisters this value on both the client and server environments.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.jaxydog.astral.register.Registered
getRegistryId
-
Constructor Details
-
AstralTrinketPredicate
public AstralTrinketPredicate(String path, com.mojang.datafixers.util.Function3<net.minecraft.item.ItemStack, dev.emi.trinkets.api.SlotReference, net.minecraft.entity.LivingEntity, net.fabricmc.fabric.api.util.TriState> predicate) Creates a new predicate wrapper.- Parameters:
path- The predicate's identifier path.predicate- The predicate.- Since:
- 2.0.0
-
-
Method Details
-
getRegistryPath
Description copied from interface:RegisteredReturns this value's associated registry identifier path.This is by default used to determine the
Identifierprovided byRegistered.getRegistryId(). For example, returning"my_item"will cause the associated identifier to beastral:my_item.- Specified by:
getRegistryPathin interfaceRegistered- Returns:
- An identifier path.
-
registerCommon
public void registerCommon()Description copied from interface:Registered.CommonRegisters this value on both the client and server environments.The contained code will run for both environments. If you only want one or the other, see its sister interfaces.
- Specified by:
registerCommonin interfaceRegistered.Common- See Also:
-