Interface PaletteResizeListener<T>

All Known Implementing Classes:
PalettedContainer

interface PaletteResizeListener<T>
A listener for when a palette requires more bits to hold a newly indexed object. A no-op listener may be used if the palette does not have to resize.
See Also:
Mappings:
Namespace Name
official dbg
intermediary net/minecraft/class_2835
named net/minecraft/world/chunk/PaletteResizeListener
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    onResize(int newBits, T object)
    Callback for a palette's request to resize to at least newBits for each entry and to update the storage correspondingly in order to accommodate the new object.
  • Method Details

    • onResize

      int onResize(int newBits, T object)
      Callback for a palette's request to resize to at least newBits for each entry and to update the storage correspondingly in order to accommodate the new object. After the resize is completed in this method, returns the ID assigned to the object in the updated palette.
      Returns:
      the ID for the object in the (possibly new) palette
      Mappings:
      Namespace Name Mixin selector
      official onResize Ldbg;onResize(ILjava/lang/Object;)I
      intermediary onResize Lnet/minecraft/class_2835;onResize(ILjava/lang/Object;)I
      named onResize Lnet/minecraft/world/chunk/PaletteResizeListener;onResize(ILjava/lang/Object;)I