Interface JavaTool.Rule
- Enclosing interface:
- JavaTool
public static interface JavaTool.Rule
A rule for a tool. Consists of a
Holders of block identifiers, and a speed to use for those blocks.- Since:
- 2.9.3
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for a tool rule. -
Method Summary
Modifier and TypeMethodDescription@NonNull Holdersblocks()static @NonNull JavaTool.Rule.Builderbuilder()Creates a builder for a tool rule.static @NonNull JavaTool.RuleCreates a rule consisting of the given blocks and the given speed.floatspeed()
-
Method Details
-
blocks
@NonNull Holders blocks()- Returns:
- the
Holdersof block identifiers that this rule is for - Since:
- 2.9.3
-
speed
float speed()- Returns:
- the speed to use when mining a block that matches this rule
- Since:
- 2.9.3
-
builder
Creates a builder for a tool rule.- Returns:
- a new builder
- Since:
- 2.9.3
-
of
static @NonNull JavaTool.Rule of(@NonNull Holders blocks, @org.checkerframework.checker.index.qual.Positive float speed) Creates a rule consisting of the given blocks and the given speed.- Parameters:
blocks- theHoldersof block identifiers that this rule is forspeed- the speed to use when mining a block that matches this rule- Returns:
- a tool rule
- Since:
- 2.9.3
-