Package com.mojang.datafixers
Interface TypeRewriteRule
- All Known Implementing Classes:
TypeRewriteRule.All
,TypeRewriteRule.CheckOnce
,TypeRewriteRule.Everywhere
,TypeRewriteRule.IfSame
,TypeRewriteRule.Nop
,TypeRewriteRule.One
,TypeRewriteRule.OrElse
,TypeRewriteRule.Seq
public interface TypeRewriteRule
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static final record
static class
static class
static enum
static final record
static final class
static final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic TypeRewriteRule
all
(TypeRewriteRule rule, boolean recurse, boolean checkIndex) static TypeRewriteRule
checkOnce
(TypeRewriteRule rule, Consumer<Type<?>> onFail) static TypeRewriteRule
everywhere
(TypeRewriteRule rule, PointFreeRule optimizationRule, boolean recurse, boolean checkIndex) static <B> TypeRewriteRule
ifSame
(Type<B> targetType, RewriteResult<B, ?> value) static TypeRewriteRule
nop()
static TypeRewriteRule
once
(TypeRewriteRule rule) static TypeRewriteRule
one
(TypeRewriteRule rule) static TypeRewriteRule
orElse
(TypeRewriteRule first, TypeRewriteRule second) static TypeRewriteRule
orElse
(TypeRewriteRule first, Supplier<TypeRewriteRule> second) <A> Optional<RewriteResult<A,
?>> static TypeRewriteRule
seq
(TypeRewriteRule first, TypeRewriteRule second) static TypeRewriteRule
seq
(TypeRewriteRule firstRule, TypeRewriteRule... rules) static TypeRewriteRule
seq
(List<TypeRewriteRule> rules)
-
Method Details
-
rewrite
-
nop
-
seq
-
seq
-
seq
-
orElse
-
orElse
-
all
-
one
-
once
-
checkOnce
-
everywhere
static TypeRewriteRule everywhere(TypeRewriteRule rule, PointFreeRule optimizationRule, boolean recurse, boolean checkIndex) -
ifSame
-