Class SelectUpgradeModel.Builder<T>
java.lang.Object
dan200.computercraft.api.client.turtle.SelectUpgradeModel.Builder<T>
- Type Parameters:
T- The type of value to switch on.
- Enclosing class:
SelectUpgradeModel<T>
A builder for constructing
SelectUpgradeModels.-
Method Summary
Modifier and TypeMethodDescriptioncreate()Convert this builder into an unbaked model.Add a fallback value, when no previous value matches or the component is not present.when(List<T> values, TurtleUpgradeModel.Unbaked model) Add a case to our model.when(T value, TurtleUpgradeModel.Unbaked model) Add a case to our model.
-
Method Details
-
when
Add a case to our model.- Parameters:
value- The value for this case.model- The model to use.- Returns:
this, for chaining.
-
when
Add a case to our model.- Parameters:
values- The value(s) for this case.model- The model to use.- Returns:
this, for chaining.
-
fallback
Add a fallback value, when no previous value matches or the component is not present.- Parameters:
model- The fallback model.- Returns:
this, for chaining.
-
create
Convert this builder into an unbaked model.- Returns:
- The unbaked
SelectUpgradeModel.
-