Class MultiPartBlockStateBuilder.PartBuilder

    • Method Detail

      • condition

        @SafeVarargs
        public final <T extends java.lang.Comparable<T>> MultiPartBlockStateBuilder.PartBuilder condition​(Property<T> prop,
                                                                                                          T... values)
        Set a condition for this part, which consists of a property and a set of valid values. Can be called multiple times for multiple different properties.
        Type Parameters:
        T - the type of the property value
        Parameters:
        prop - the property
        values - a set of valid values
        Returns:
        this builder
        Throws:
        java.lang.NullPointerException - if prop is null
        java.lang.NullPointerException - if values is null
        java.lang.IllegalArgumentException - if values is empty
        java.lang.IllegalArgumentException - if prop has already been configured
        java.lang.IllegalArgumentException - if prop is not applicable to the current block's state
        java.lang.IllegalStateException - if !nestedConditionGroups.isEmpty()
      • toJson

        com.google.gson.JsonObject toJson()
      • canApplyTo

        public boolean canApplyTo​(Block b)