Class MultiPartBlockStateBuilder.PartBuilder.ConditionGroup

    • Constructor Detail

      • ConditionGroup

        public ConditionGroup()
    • Method Detail

      • condition

        @SafeVarargs
        public final <T extends java.lang.Comparable<T>> MultiPartBlockStateBuilder.PartBuilder.ConditionGroup 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()
      • end

        public MultiPartBlockStateBuilder.PartBuilder end()
        Ends this condition group and returns the part builder
        Throws:
        java.lang.IllegalStateException - If this is a nested condition group
      • toJson

        com.google.gson.JsonObject toJson()