Class DimensionMatcher
java.lang.Object
me.desht.pneumaticcraft.common.amadron.DimensionMatcher
- All Implemented Interfaces:
Predicate<net.minecraft.world.entity.player.Player>,IPlayerMatcher
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface me.desht.pneumaticcraft.api.misc.IPlayerMatcher
IPlayerMatcher.MatcherFactory<T extends IPlayerMatcher> -
Constructor Summary
ConstructorsConstructorDescriptionDimensionMatcher(Set<net.minecraft.resources.ResourceLocation> dimensionIds) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDescription(net.minecraft.world.entity.player.Player player, List<net.minecraft.network.chat.Component> tooltip) Add this matcher's information to a tooltip.booleantest(net.minecraft.world.entity.player.Player playerEntity) voidtoBytes(net.minecraft.network.FriendlyByteBuf buffer) Serialize this matcher object to a packet buffer, for sync'ing to clientscom.google.gson.JsonElementtoJson()Serialize this matcher object to JSON, for data generation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.desht.pneumaticcraft.api.misc.IPlayerMatcher
standardTooltip
-
Constructor Details
-
DimensionMatcher
-
-
Method Details
-
toBytes
public void toBytes(net.minecraft.network.FriendlyByteBuf buffer) Description copied from interface:IPlayerMatcherSerialize this matcher object to a packet buffer, for sync'ing to clients- Specified by:
toBytesin interfaceIPlayerMatcher- Parameters:
buffer- a packet buffer
-
toJson
public com.google.gson.JsonElement toJson()Description copied from interface:IPlayerMatcherSerialize this matcher object to JSON, for data generation.- Specified by:
toJsonin interfaceIPlayerMatcher- Returns:
- a JSON element
-
addDescription
public void addDescription(net.minecraft.world.entity.player.Player player, List<net.minecraft.network.chat.Component> tooltip) Description copied from interface:IPlayerMatcherAdd this matcher's information to a tooltip. This is used for example by the Amadron Tablet GUI to show information about this matcher.- Specified by:
addDescriptionin interfaceIPlayerMatcher- Parameters:
player- the relevant playertooltip- a tooltip list
-
test
public boolean test(net.minecraft.world.entity.player.Player playerEntity)
-