Class HashOps

java.lang.Object
net.minecraft.util.HashOps
All Implemented Interfaces:
com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>

public class HashOps extends Object implements com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) class 
     
    (package private) final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final HashOps
     
    (package private) final com.google.common.hash.HashCode
     
    static final byte[]
     
    static final byte[]
     
    private static final byte[]
     
    private final com.google.common.hash.HashCode
     
    private final com.google.common.hash.HashCode
     
    private static final byte[]
     
    private final com.google.common.hash.HashCode
     
    private static final Comparator<com.google.common.hash.HashCode>
     
    (package private) final com.google.common.hash.HashFunction
     
    private static final Comparator<Map.Entry<com.google.common.hash.HashCode,com.google.common.hash.HashCode>>
     
    private static final Comparator<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>>
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte
     
    private static final byte[]
     
    private final com.google.common.hash.HashCode
     
    private static final com.mojang.serialization.DataResult<Object>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    HashOps(com.google.common.hash.HashFunction p_412557_)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <U> U
    convertTo(com.mojang.serialization.DynamicOps<U> p_412264_, com.google.common.hash.HashCode p_412248_)
     
    com.google.common.hash.HashCode
    createBoolean(boolean p_412649_)
     
    com.google.common.hash.HashCode
    createByte(byte p_412636_)
     
    com.google.common.hash.HashCode
     
    com.google.common.hash.HashCode
    createDouble(double p_412066_)
     
    com.google.common.hash.HashCode
    createFloat(float p_412641_)
     
    com.google.common.hash.HashCode
    createInt(int p_412683_)
     
    com.google.common.hash.HashCode
     
    com.google.common.hash.HashCode
    createList(Stream<com.google.common.hash.HashCode> p_412225_)
     
    com.google.common.hash.HashCode
    createLong(long p_412271_)
     
    com.google.common.hash.HashCode
     
    com.google.common.hash.HashCode
    createMap(Map<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412512_)
     
    com.google.common.hash.HashCode
    createMap(Stream<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>> p_412416_)
     
    com.google.common.hash.HashCode
    createNumeric(Number p_412443_)
     
    com.google.common.hash.HashCode
    createShort(short p_412616_)
     
    com.google.common.hash.HashCode
    createString(String p_412211_)
     
    com.google.common.hash.HashCode
     
    com.google.common.hash.HashCode
     
    com.google.common.hash.HashCode
     
    com.mojang.serialization.DataResult<com.google.common.hash.HashCode>
    get(com.google.common.hash.HashCode p_412426_, String p_412356_)
     
    com.mojang.serialization.DataResult<Boolean>
    getBooleanValue(com.google.common.hash.HashCode p_412639_)
     
    com.mojang.serialization.DataResult<ByteBuffer>
    getByteBuffer(com.google.common.hash.HashCode p_412476_)
     
    com.mojang.serialization.DataResult<com.google.common.hash.HashCode>
    getGeneric(com.google.common.hash.HashCode p_412138_, com.google.common.hash.HashCode p_412331_)
     
    com.mojang.serialization.DataResult<IntStream>
    getIntStream(com.google.common.hash.HashCode p_412744_)
     
    com.mojang.serialization.DataResult<Consumer<Consumer<com.google.common.hash.HashCode>>>
    getList(com.google.common.hash.HashCode p_412386_)
     
    com.mojang.serialization.DataResult<LongStream>
    getLongStream(com.google.common.hash.HashCode p_412105_)
     
    com.mojang.serialization.DataResult<com.mojang.serialization.MapLike<com.google.common.hash.HashCode>>
    getMap(com.google.common.hash.HashCode p_412339_)
     
    com.mojang.serialization.DataResult<Consumer<BiConsumer<com.google.common.hash.HashCode,com.google.common.hash.HashCode>>>
    getMapEntries(com.google.common.hash.HashCode p_412308_)
     
    com.mojang.serialization.DataResult<Stream<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>>>
    getMapValues(com.google.common.hash.HashCode p_412515_)
     
    com.mojang.serialization.DataResult<Number>
    getNumberValue(com.google.common.hash.HashCode p_412281_)
     
    getNumberValue(com.google.common.hash.HashCode p_412545_, Number p_412129_)
     
    com.mojang.serialization.DataResult<Stream<com.google.common.hash.HashCode>>
    getStream(com.google.common.hash.HashCode p_412047_)
     
    com.mojang.serialization.DataResult<String>
    getStringValue(com.google.common.hash.HashCode p_412375_)
     
    private static com.google.common.hash.Hasher
    hashMap(com.google.common.hash.Hasher p_412213_, Map<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412494_)
     
    (package private) static com.google.common.hash.Hasher
    hashMap(com.google.common.hash.Hasher p_412189_, Stream<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>> p_412324_)
     
    com.mojang.serialization.ListBuilder<com.google.common.hash.HashCode>
     
    com.mojang.serialization.RecordBuilder<com.google.common.hash.HashCode>
     
    com.mojang.serialization.DataResult<com.google.common.hash.HashCode>
    mergeToList(com.google.common.hash.HashCode p_412567_, com.google.common.hash.HashCode p_412638_)
     
    com.mojang.serialization.DataResult<com.google.common.hash.HashCode>
    mergeToList(com.google.common.hash.HashCode p_412195_, List<com.google.common.hash.HashCode> p_412670_)
     
    com.mojang.serialization.DataResult<com.google.common.hash.HashCode>
    mergeToMap(com.google.common.hash.HashCode p_412061_, com.google.common.hash.HashCode p_412446_, com.google.common.hash.HashCode p_412770_)
     
    com.mojang.serialization.DataResult<com.google.common.hash.HashCode>
    mergeToMap(com.google.common.hash.HashCode p_412371_, com.mojang.serialization.MapLike<com.google.common.hash.HashCode> p_412753_)
     
    com.mojang.serialization.DataResult<com.google.common.hash.HashCode>
    mergeToMap(com.google.common.hash.HashCode p_412263_, Map<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412681_)
     
    com.google.common.hash.HashCode
    remove(com.google.common.hash.HashCode p_412437_, String p_412123_)
     
    com.google.common.hash.HashCode
    set(com.google.common.hash.HashCode p_412708_, String p_412229_, com.google.common.hash.HashCode p_412577_)
     
     
    private static <T> com.mojang.serialization.DataResult<T>
     
    com.google.common.hash.HashCode
    update(com.google.common.hash.HashCode p_412258_, String p_412582_, Function<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412141_)
     
    com.google.common.hash.HashCode
    updateGeneric(com.google.common.hash.HashCode p_412276_, com.google.common.hash.HashCode p_412115_, Function<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412233_)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.mojang.serialization.DynamicOps

    compressMaps, convertList, convertMap, mergeToPrimitive, withDecoder, withEncoder, withParser
  • Field Details

    • TAG_EMPTY

      private static final byte TAG_EMPTY
      See Also:
    • TAG_MAP_START

      private static final byte TAG_MAP_START
      See Also:
    • TAG_MAP_END

      private static final byte TAG_MAP_END
      See Also:
    • TAG_LIST_START

      private static final byte TAG_LIST_START
      See Also:
    • TAG_LIST_END

      private static final byte TAG_LIST_END
      See Also:
    • TAG_BYTE

      private static final byte TAG_BYTE
      See Also:
    • TAG_SHORT

      private static final byte TAG_SHORT
      See Also:
    • TAG_INT

      private static final byte TAG_INT
      See Also:
    • TAG_LONG

      private static final byte TAG_LONG
      See Also:
    • TAG_FLOAT

      private static final byte TAG_FLOAT
      See Also:
    • TAG_DOUBLE

      private static final byte TAG_DOUBLE
      See Also:
    • TAG_STRING

      private static final byte TAG_STRING
      See Also:
    • TAG_BOOLEAN

      private static final byte TAG_BOOLEAN
      See Also:
    • TAG_BYTE_ARRAY_START

      private static final byte TAG_BYTE_ARRAY_START
      See Also:
    • TAG_BYTE_ARRAY_END

      private static final byte TAG_BYTE_ARRAY_END
      See Also:
    • TAG_INT_ARRAY_START

      private static final byte TAG_INT_ARRAY_START
      See Also:
    • TAG_INT_ARRAY_END

      private static final byte TAG_INT_ARRAY_END
      See Also:
    • TAG_LONG_ARRAY_START

      private static final byte TAG_LONG_ARRAY_START
      See Also:
    • TAG_LONG_ARRAY_END

      private static final byte TAG_LONG_ARRAY_END
      See Also:
    • EMPTY_PAYLOAD

      private static final byte[] EMPTY_PAYLOAD
    • FALSE_PAYLOAD

      private static final byte[] FALSE_PAYLOAD
    • TRUE_PAYLOAD

      private static final byte[] TRUE_PAYLOAD
    • EMPTY_MAP_PAYLOAD

      public static final byte[] EMPTY_MAP_PAYLOAD
    • EMPTY_LIST_PAYLOAD

      public static final byte[] EMPTY_LIST_PAYLOAD
    • UNSUPPORTED_OPERATION_ERROR

      private static final com.mojang.serialization.DataResult<Object> UNSUPPORTED_OPERATION_ERROR
    • HASH_COMPARATOR

      private static final Comparator<com.google.common.hash.HashCode> HASH_COMPARATOR
    • MAP_ENTRY_ORDER

      private static final Comparator<Map.Entry<com.google.common.hash.HashCode,com.google.common.hash.HashCode>> MAP_ENTRY_ORDER
    • MAPLIKE_ENTRY_ORDER

      private static final Comparator<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>> MAPLIKE_ENTRY_ORDER
    • CRC32C_INSTANCE

      public static final HashOps CRC32C_INSTANCE
    • hashFunction

      final com.google.common.hash.HashFunction hashFunction
    • empty

      final com.google.common.hash.HashCode empty
    • emptyMap

      private final com.google.common.hash.HashCode emptyMap
    • emptyList

      private final com.google.common.hash.HashCode emptyList
    • trueHash

      private final com.google.common.hash.HashCode trueHash
    • falseHash

      private final com.google.common.hash.HashCode falseHash
  • Constructor Details

    • HashOps

      public HashOps(com.google.common.hash.HashFunction p_412557_)
  • Method Details

    • empty

      public com.google.common.hash.HashCode empty()
      Specified by:
      empty in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • emptyMap

      public com.google.common.hash.HashCode emptyMap()
      Specified by:
      emptyMap in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • emptyList

      public com.google.common.hash.HashCode emptyList()
      Specified by:
      emptyList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createNumeric

      public com.google.common.hash.HashCode createNumeric(Number p_412443_)
      Specified by:
      createNumeric in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createByte

      public com.google.common.hash.HashCode createByte(byte p_412636_)
      Specified by:
      createByte in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createShort

      public com.google.common.hash.HashCode createShort(short p_412616_)
      Specified by:
      createShort in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createInt

      public com.google.common.hash.HashCode createInt(int p_412683_)
      Specified by:
      createInt in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createLong

      public com.google.common.hash.HashCode createLong(long p_412271_)
      Specified by:
      createLong in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createFloat

      public com.google.common.hash.HashCode createFloat(float p_412641_)
      Specified by:
      createFloat in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createDouble

      public com.google.common.hash.HashCode createDouble(double p_412066_)
      Specified by:
      createDouble in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createString

      public com.google.common.hash.HashCode createString(String p_412211_)
      Specified by:
      createString in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createBoolean

      public com.google.common.hash.HashCode createBoolean(boolean p_412649_)
      Specified by:
      createBoolean in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • hashMap

      private static com.google.common.hash.Hasher hashMap(com.google.common.hash.Hasher p_412213_, Map<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412494_)
    • hashMap

      static com.google.common.hash.Hasher hashMap(com.google.common.hash.Hasher p_412189_, Stream<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>> p_412324_)
    • createMap

      public com.google.common.hash.HashCode createMap(Stream<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>> p_412416_)
      Specified by:
      createMap in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createMap

      public com.google.common.hash.HashCode createMap(Map<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412512_)
      Specified by:
      createMap in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createList

      public com.google.common.hash.HashCode createList(Stream<com.google.common.hash.HashCode> p_412225_)
      Specified by:
      createList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createByteList

      public com.google.common.hash.HashCode createByteList(ByteBuffer p_412081_)
      Specified by:
      createByteList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createIntList

      public com.google.common.hash.HashCode createIntList(IntStream p_412517_)
      Specified by:
      createIntList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • createLongList

      public com.google.common.hash.HashCode createLongList(LongStream p_412654_)
      Specified by:
      createLongList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • remove

      public com.google.common.hash.HashCode remove(com.google.common.hash.HashCode p_412437_, String p_412123_)
      Specified by:
      remove in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • mapBuilder

      public com.mojang.serialization.RecordBuilder<com.google.common.hash.HashCode> mapBuilder()
      Specified by:
      mapBuilder in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • listBuilder

      public com.mojang.serialization.ListBuilder<com.google.common.hash.HashCode> listBuilder()
      Specified by:
      listBuilder in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • convertTo

      public <U> U convertTo(com.mojang.serialization.DynamicOps<U> p_412264_, com.google.common.hash.HashCode p_412248_)
      Specified by:
      convertTo in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getNumberValue

      public Number getNumberValue(com.google.common.hash.HashCode p_412545_, Number p_412129_)
      Specified by:
      getNumberValue in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • set

      public com.google.common.hash.HashCode set(com.google.common.hash.HashCode p_412708_, String p_412229_, com.google.common.hash.HashCode p_412577_)
      Specified by:
      set in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • update

      public com.google.common.hash.HashCode update(com.google.common.hash.HashCode p_412258_, String p_412582_, Function<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412141_)
      Specified by:
      update in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • updateGeneric

      public com.google.common.hash.HashCode updateGeneric(com.google.common.hash.HashCode p_412276_, com.google.common.hash.HashCode p_412115_, Function<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412233_)
      Specified by:
      updateGeneric in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • unsupported

      private static <T> com.mojang.serialization.DataResult<T> unsupported()
    • get

      public com.mojang.serialization.DataResult<com.google.common.hash.HashCode> get(com.google.common.hash.HashCode p_412426_, String p_412356_)
      Specified by:
      get in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getGeneric

      public com.mojang.serialization.DataResult<com.google.common.hash.HashCode> getGeneric(com.google.common.hash.HashCode p_412138_, com.google.common.hash.HashCode p_412331_)
      Specified by:
      getGeneric in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getNumberValue

      public com.mojang.serialization.DataResult<Number> getNumberValue(com.google.common.hash.HashCode p_412281_)
      Specified by:
      getNumberValue in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getBooleanValue

      public com.mojang.serialization.DataResult<Boolean> getBooleanValue(com.google.common.hash.HashCode p_412639_)
      Specified by:
      getBooleanValue in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getStringValue

      public com.mojang.serialization.DataResult<String> getStringValue(com.google.common.hash.HashCode p_412375_)
      Specified by:
      getStringValue in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • mergeToList

      public com.mojang.serialization.DataResult<com.google.common.hash.HashCode> mergeToList(com.google.common.hash.HashCode p_412567_, com.google.common.hash.HashCode p_412638_)
      Specified by:
      mergeToList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • mergeToList

      public com.mojang.serialization.DataResult<com.google.common.hash.HashCode> mergeToList(com.google.common.hash.HashCode p_412195_, List<com.google.common.hash.HashCode> p_412670_)
      Specified by:
      mergeToList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • mergeToMap

      public com.mojang.serialization.DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode p_412061_, com.google.common.hash.HashCode p_412446_, com.google.common.hash.HashCode p_412770_)
      Specified by:
      mergeToMap in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • mergeToMap

      public com.mojang.serialization.DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode p_412263_, Map<com.google.common.hash.HashCode,com.google.common.hash.HashCode> p_412681_)
      Specified by:
      mergeToMap in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • mergeToMap

      public com.mojang.serialization.DataResult<com.google.common.hash.HashCode> mergeToMap(com.google.common.hash.HashCode p_412371_, com.mojang.serialization.MapLike<com.google.common.hash.HashCode> p_412753_)
      Specified by:
      mergeToMap in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getMapValues

      public com.mojang.serialization.DataResult<Stream<com.mojang.datafixers.util.Pair<com.google.common.hash.HashCode,com.google.common.hash.HashCode>>> getMapValues(com.google.common.hash.HashCode p_412515_)
      Specified by:
      getMapValues in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getMapEntries

      public com.mojang.serialization.DataResult<Consumer<BiConsumer<com.google.common.hash.HashCode,com.google.common.hash.HashCode>>> getMapEntries(com.google.common.hash.HashCode p_412308_)
      Specified by:
      getMapEntries in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getStream

      public com.mojang.serialization.DataResult<Stream<com.google.common.hash.HashCode>> getStream(com.google.common.hash.HashCode p_412047_)
      Specified by:
      getStream in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getList

      public com.mojang.serialization.DataResult<Consumer<Consumer<com.google.common.hash.HashCode>>> getList(com.google.common.hash.HashCode p_412386_)
      Specified by:
      getList in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getMap

      public com.mojang.serialization.DataResult<com.mojang.serialization.MapLike<com.google.common.hash.HashCode>> getMap(com.google.common.hash.HashCode p_412339_)
      Specified by:
      getMap in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getByteBuffer

      public com.mojang.serialization.DataResult<ByteBuffer> getByteBuffer(com.google.common.hash.HashCode p_412476_)
      Specified by:
      getByteBuffer in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getIntStream

      public com.mojang.serialization.DataResult<IntStream> getIntStream(com.google.common.hash.HashCode p_412744_)
      Specified by:
      getIntStream in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>
    • getLongStream

      public com.mojang.serialization.DataResult<LongStream> getLongStream(com.google.common.hash.HashCode p_412105_)
      Specified by:
      getLongStream in interface com.mojang.serialization.DynamicOps<com.google.common.hash.HashCode>