Class DimensionMatcher

java.lang.Object
me.desht.pneumaticcraft.common.amadron.DimensionMatcher
All Implemented Interfaces:
Predicate<net.minecraft.world.entity.player.Player>, IPlayerMatcher

public class DimensionMatcher extends Object implements IPlayerMatcher
  • Constructor Details

    • DimensionMatcher

      public DimensionMatcher(Set<net.minecraft.resources.ResourceLocation> dimensionIds)
  • Method Details

    • toBytes

      public void toBytes(net.minecraft.network.FriendlyByteBuf buffer)
      Description copied from interface: IPlayerMatcher
      Serialize this matcher object to a packet buffer, for sync'ing to clients
      Specified by:
      toBytes in interface IPlayerMatcher
      Parameters:
      buffer - a packet buffer
    • toJson

      public com.google.gson.JsonElement toJson()
      Description copied from interface: IPlayerMatcher
      Serialize this matcher object to JSON, for data generation.
      Specified by:
      toJson in interface IPlayerMatcher
      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: IPlayerMatcher
      Add 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:
      addDescription in interface IPlayerMatcher
      Parameters:
      player - the relevant player
      tooltip - a tooltip list
    • test

      public boolean test(net.minecraft.world.entity.player.Player playerEntity)
      Specified by:
      test in interface Predicate<net.minecraft.world.entity.player.Player>