Skip to content

Commit

Permalink
Rename Requirements class
Browse files Browse the repository at this point in the history
To `CollisionDependencies`
  • Loading branch information
MattSturgeon committed Apr 21, 2024
1 parent 3d497bd commit 49bbebf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ private AutoConfigExtensions() {}

public static void apply(Class<? extends ConfigData> configClass) {
GuiRegistry registry = AutoConfig.getGuiRegistry(configClass);
Requirements.apply(registry);

ModBindingsConfigImpl.apply(registry);
VariantTooltipImpl.apply(registry);
ValidateRegexImpl.apply(registry);
BoundedContinuousImpl.apply(registry);

CollisionDependencies.apply(registry);
CollisionWhitelistDependencies.apply(registry);
ServerRestrictionDependencies.apply(registry);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
import static java.lang.Boolean.FALSE;

@SuppressWarnings("UnstableApiUsage")
class Requirements {
class CollisionDependencies {

private static final Logger LOGGER = LogManager.getLogger();
private static ValueHolder<Boolean> ignoreAllWidget;

private Requirements() {}
private CollisionDependencies() {}

static void apply(GuiRegistry guiRegistry) {
// FIXME These transformers assume that no subsequent GUI transformers will replace
Expand Down Expand Up @@ -55,7 +55,7 @@ static void apply(GuiRegistry guiRegistry) {
guis.stream()
.filter(BooleanListEntry.class::isInstance)
.map(BooleanListEntry.class::cast)
.forEach(gui -> gui.setRequirement(Requirements::notIgnoreAll));
.forEach(gui -> gui.setRequirement(CollisionDependencies::notIgnoreAll));
return guis;
}, field -> List.of("ignoreTransparent", "ignoreOpenable", "ignoreCustom").contains(field.getName()));
}
Expand Down

0 comments on commit 49bbebf

Please sign in to comment.