Class BiomeMatcher

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

public class BiomeMatcher extends Object implements IPlayerMatcher
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.api.misc.IPlayerMatcher

    IPlayerMatcher.MatcherFactory<T extends IPlayerMatcher>
  • Constructor Summary

    Constructors
    Constructor
    Description
    BiomeMatcher(Set<net.minecraft.world.level.biome.Biome.BiomeCategory> categories)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addDescription(net.minecraft.world.entity.player.Player player, List<net.minecraft.network.chat.Component> tooltip)
    Add this matcher's information to a tooltip.
    boolean
    test(net.minecraft.world.entity.player.Player playerEntity)
     
    void
    toBytes(net.minecraft.network.FriendlyByteBuf buffer)
    Serialize this matcher object to a packet buffer, for sync'ing to clients
    com.google.gson.JsonElement
    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, wait

    Methods inherited from interface me.desht.pneumaticcraft.api.misc.IPlayerMatcher

    standardTooltip

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Constructor Details

    • BiomeMatcher

      public BiomeMatcher(Set<net.minecraft.world.level.biome.Biome.BiomeCategory> categories)
  • 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>