Record Class ColorCollection<T>
java.lang.Object
java.lang.Record
net.minecraft.world.level.block.ColorCollection<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TThe field for theblackrecord component.private final TThe field for thebluerecord component.private final TThe field for thebrownrecord component.private final TThe field for thecyanrecord component.private final TThe field for thegrayrecord component.private final TThe field for thegreenrecord component.private final TThe field for thelightBluerecord component.private final TThe field for thelightGrayrecord component.private final TThe field for thelimerecord component.private final TThe field for themagentarecord component.static final ColorCollection<String> private final TThe field for theorangerecord component.private final TThe field for thepinkrecord component.private final TThe field for thepurplerecord component.private final TThe field for theredrecord component.static final ColorCollection<DyeColor> private final TThe field for thewhiterecord component.private final TThe field for theyellowrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasList()black()Returns the value of theblackrecord component.blue()Returns the value of thebluerecord component.brown()Returns the value of thebrownrecord component.static <T> ColorCollection<T> create(T value) cyan()Returns the value of thecyanrecord component.final booleanIndicates whether some other object is "equal to" this one.voidgray()Returns the value of thegrayrecord component.green()Returns the value of thegreenrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelightBluerecord component.Returns the value of thelightGrayrecord component.lime()Returns the value of thelimerecord component.magenta()Returns the value of themagentarecord component.<U> ColorCollection<U> orange()Returns the value of theorangerecord component.pink()Returns the value of thepinkrecord component.static ColorCollection<String> purple()Returns the value of thepurplerecord component.red()Returns the value of theredrecord component.static <Id> ColorCollection<Item> registerBlockItems(ColorCollection<Id> ids, ColorCollection<Block> blocks, org.apache.commons.lang3.function.TriFunction<Id, Block, DyeColor, Item> itemFactory) static <B extends Block, Id>
ColorCollection<Block> registerBlocks(ColorCollection<Id> ids, org.apache.commons.lang3.function.TriFunction<Id, Function<BlockBehaviour.Properties, Block>, BlockBehaviour.Properties, Block> register, BiFunction<DyeColor, BlockBehaviour.Properties, B> colorBlockFactory, Function<DyeColor, BlockBehaviour.Properties> propertiesSupplier) static <Id> ColorCollection<Item> registerItems(ColorCollection<Id> ids, BiFunction<Id, DyeColor, Item> itemFactory) final StringtoString()Returns a string representation of this record class.white()Returns the value of thewhiterecord component.yellow()Returns the value of theyellowrecord component.static <T,U> void zipApply(ColorCollection<T> first, ColorCollection<U> second, BiConsumer<T, U> consumer) static <T,U, R> ColorCollection <R> zipMap(ColorCollection<T> first, ColorCollection<U> second, BiFunction<T, U, R> operation)
-
Field Details
-
white
The field for thewhiterecord component. -
orange
The field for theorangerecord component. -
magenta
The field for themagentarecord component. -
lightBlue
The field for thelightBluerecord component. -
yellow
The field for theyellowrecord component. -
lime
The field for thelimerecord component. -
pink
The field for thepinkrecord component. -
gray
The field for thegrayrecord component. -
lightGray
The field for thelightGrayrecord component. -
cyan
The field for thecyanrecord component. -
purple
The field for thepurplerecord component. -
blue
The field for thebluerecord component. -
brown
The field for thebrownrecord component. -
green
The field for thegreenrecord component. -
red
The field for theredrecord component. -
black
The field for theblackrecord component. -
VALUES
-
NAMES
-
-
Constructor Details
-
ColorCollection
public ColorCollection(T white, T orange, T magenta, T lightBlue, T yellow, T lime, T pink, T gray, T lightGray, T cyan, T purple, T blue, T brown, T green, T red, T black) Creates an instance of aColorCollectionrecord class.- Parameters:
white- the value for thewhiterecord componentorange- the value for theorangerecord componentmagenta- the value for themagentarecord componentlightBlue- the value for thelightBluerecord componentyellow- the value for theyellowrecord componentlime- the value for thelimerecord componentpink- the value for thepinkrecord componentgray- the value for thegrayrecord componentlightGray- the value for thelightGrayrecord componentcyan- the value for thecyanrecord componentpurple- the value for thepurplerecord componentblue- the value for thebluerecord componentbrown- the value for thebrownrecord componentgreen- the value for thegreenrecord componentred- the value for theredrecord componentblack- the value for theblackrecord component
-
-
Method Details
-
create
-
registerBlocks
public static <B extends Block, Id> ColorCollection<Block> registerBlocks(ColorCollection<Id> ids, org.apache.commons.lang3.function.TriFunction<Id, Function<BlockBehaviour.Properties, Block>, BlockBehaviour.Properties, Block> register, BiFunction<DyeColor, BlockBehaviour.Properties, B> colorBlockFactory, Function<DyeColor, BlockBehaviour.Properties> propertiesSupplier) -
registerBlockItems
public static <Id> ColorCollection<Item> registerBlockItems(ColorCollection<Id> ids, ColorCollection<Block> blocks, org.apache.commons.lang3.function.TriFunction<Id, Block, DyeColor, Item> itemFactory) -
registerItems
public static <Id> ColorCollection<Item> registerItems(ColorCollection<Id> ids, BiFunction<Id, DyeColor, Item> itemFactory) -
prefixWithColor
-
asList
-
forEach
-
pick
-
map
-
zipApply
public static <T,U> void zipApply(ColorCollection<T> first, ColorCollection<U> second, BiConsumer<T, U> consumer) -
zipMap
public static <T,U, ColorCollection<R> zipMapR> (ColorCollection<T> first, ColorCollection<U> second, BiFunction<T, U, R> operation) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
white
Returns the value of thewhiterecord component.- Returns:
- the value of the
whiterecord component
-
orange
Returns the value of theorangerecord component.- Returns:
- the value of the
orangerecord component
-
magenta
Returns the value of themagentarecord component.- Returns:
- the value of the
magentarecord component
-
lightBlue
Returns the value of thelightBluerecord component.- Returns:
- the value of the
lightBluerecord component
-
yellow
Returns the value of theyellowrecord component.- Returns:
- the value of the
yellowrecord component
-
lime
Returns the value of thelimerecord component.- Returns:
- the value of the
limerecord component
-
pink
Returns the value of thepinkrecord component.- Returns:
- the value of the
pinkrecord component
-
gray
Returns the value of thegrayrecord component.- Returns:
- the value of the
grayrecord component
-
lightGray
Returns the value of thelightGrayrecord component.- Returns:
- the value of the
lightGrayrecord component
-
cyan
Returns the value of thecyanrecord component.- Returns:
- the value of the
cyanrecord component
-
purple
Returns the value of thepurplerecord component.- Returns:
- the value of the
purplerecord component
-
blue
Returns the value of thebluerecord component.- Returns:
- the value of the
bluerecord component
-
brown
Returns the value of thebrownrecord component.- Returns:
- the value of the
brownrecord component
-
green
Returns the value of thegreenrecord component.- Returns:
- the value of the
greenrecord component
-
red
Returns the value of theredrecord component.- Returns:
- the value of the
redrecord component
-
black
Returns the value of theblackrecord component.- Returns:
- the value of the
blackrecord component
-