NBTFilter

public class NBTFilter implements Iterable<T>

A tool for stripping NBT compounds of excess data, especially to retain a low memory footprint.

Constructors

Link copied to clipboard
public void NBTFilter(FilterMode mode)
Creates a new filter whose behaviour is determined by the provided mode.

Functions

Link copied to clipboard
public void addTags(Array<String> tagNames)
Adds each of the tagNames to the filter.
Link copied to clipboard
public void forEach(Consumer<? extends Object> action)
Link copied to clipboard
public Set<FilteredTag> getFilteredTags()
Link copied to clipboard
public FilterMode getMode()
Link copied to clipboard
public boolean isEmpty()
Link copied to clipboard
public Iterator<FilteredTag> iterator()
Link copied to clipboard
public void removeFilteredTags(Array<String> tagNames)
Removes certain tagNames from the filter, such that getFilteredTags will no longer return tags with those names unless they are explicitly re-added.
Link copied to clipboard
public Spliterator<T> spliterator()
Link copied to clipboard
public NBTFilter subFilter(FilteredTag base, int depth)
Creates a new filter that contains all tags in the current filter that extend the base tag up to the provided depth.
Link copied to clipboard
public static NBTFilter with(Array<String> includedTags)
Shorthand for constructing a new filter with the mode set to INCLUDE, and calling addTags(...) with the includedTags.
Link copied to clipboard
public static NBTFilter without(Array<String> excludedTags)
Shorthand for constructing a new filter with the mode set to EXCLUDE, and calling addTags(...) with the excludedTags.

Properties

Link copied to clipboard
public final Set<FilteredTag> filteredTags
Link copied to clipboard
public final FilterMode mode