Class ExpandDataComponentMap.ExpandDataComponentMapBuilder

java.lang.Object
com.blamejared.crafttweaker.natives.component.ExpandDataComponentMap.ExpandDataComponentMapBuilder
Enclosing class:
ExpandDataComponentMap

@ZenRegister public static class ExpandDataComponentMap.ExpandDataComponentMapBuilder extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.core.component.DataComponentMap.Builder
    addAll(net.minecraft.core.component.DataComponentMap.Builder internal, net.minecraft.core.component.DataComponentMap other)
    Adds all the DataComponentTypes and values from the other DataComponentMap to the builder.
    static net.minecraft.core.component.DataComponentMap
    build(net.minecraft.core.component.DataComponentMap.Builder internal)
    Builds the DataComponentMap.
    static <T> net.minecraft.core.component.DataComponentMap.Builder
    setComponent(net.minecraft.core.component.DataComponentMap.Builder internal, Class<T> tClass, net.minecraft.core.component.DataComponentType<T> type, T value)
    Sets the value of the data component for the given DataComponentType.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandDataComponentMapBuilder

      public ExpandDataComponentMapBuilder()
  • Method Details

    • setComponent

      public static <T> net.minecraft.core.component.DataComponentMap.Builder setComponent(net.minecraft.core.component.DataComponentMap.Builder internal, Class<T> tClass, net.minecraft.core.component.DataComponentType<T> type, T value)
      Sets the value of the data component for the given DataComponentType.
      Parameters:
      type - The DataComponentType to set the value of.
      value - The value to set the data component to.
      Returns:
      The DataComponentMap.Builder with the updated value.
    • build

      public static net.minecraft.core.component.DataComponentMap build(net.minecraft.core.component.DataComponentMap.Builder internal)
      Builds the DataComponentMap.
      Returns:
      The built DataComponentMap.
    • addAll

      public static net.minecraft.core.component.DataComponentMap.Builder addAll(net.minecraft.core.component.DataComponentMap.Builder internal, net.minecraft.core.component.DataComponentMap other)
      Adds all the DataComponentTypes and values from the other DataComponentMap to the builder.
      Parameters:
      other - The DataComponentMap to add the DataComponentTypes and values from.
      Returns:
      The DataComponentMap.Builder with the added values.