Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use package-private where appropriate #18

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/main/java/com/cleanroommc/modularui/GuiErrorHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ public void clear() {
errors.clear();
}

@ApiStatus.Internal
public void pushError(IGuiElement reference, GuiError.Type type, String msg) {
void pushError(IGuiElement reference, GuiError.Type type, String msg) {
GuiError error = new GuiError(msg, reference, type);
if (errorSet.add(error)) {
ModularUI.LOGGER.error(msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public class AdaptableUITexture extends UITexture {
/**
* Use {@link UITexture#builder()} with {@link Builder#adaptable(int, int)}
*/
@ApiStatus.Internal
public AdaptableUITexture(ResourceLocation location, float u0, float v0, float u1, float v1, boolean background, int imageWidth, int imageHeight, int borderX, int borderY, boolean tiled) {
AdaptableUITexture(ResourceLocation location, float u0, float v0, float u1, float v1, boolean background, int imageWidth, int imageHeight, int borderX, int borderY, boolean tiled) {
super(location, u0, v0, u1, v1, background);
this.imageWidth = imageWidth;
this.imageHeight = imageHeight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ public class TiledUITexture extends UITexture {
/**
* Use {@link UITexture#builder()} with {@link Builder#tiled()}
*/
@ApiStatus.Internal
public TiledUITexture(ResourceLocation location, float u0, float v0, float u1, float v1, int imageWidth, int imageHeight, boolean canApplyTheme) {
TiledUITexture(ResourceLocation location, float u0, float v0, float u1, float v1, int imageWidth, int imageHeight, boolean canApplyTheme) {
super(location, u0, v0, u1, v1, canApplyTheme);
this.imageWidth = imageWidth;
this.imageHeight = imageHeight;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ public ModularScreen(@NotNull String name) {
this(ModularUI.ID, name);
}

@ApiStatus.Internal
@MustBeInvokedByOverriders
public void construct(GuiScreenWrapper wrapper, GuiSyncHandler syncHandler) {
void construct(GuiScreenWrapper wrapper, GuiSyncHandler syncHandler) {
if (this.screenWrapper != null) throw new IllegalStateException("ModularScreen is already constructed!");
if (wrapper == null) throw new NullPointerException("GuiScreenWrapper must not be null!");
this.screenWrapper = wrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ public boolean isMainPanel(ModularPanel panel) {
return this.mainPanel == panel;
}

@ApiStatus.Internal
public void clearQueue() {
void clearQueue() {
if (!this.queueOpenPanels.isEmpty()) {
for (ModularPanel panel : this.queueOpenPanels) {
openPanel(panel, true);
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/cleanroommc/modularui/theme/ThemeAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,13 @@ public void registerWidgetTheme(String id, WidgetTheme defaultTheme, WidgetTheme

// Internals

@ApiStatus.Internal
void registerTheme(ITheme theme) {
if (THEMES.containsKey(theme.getId())) {
throw new IllegalArgumentException("Theme with id " + theme.getId() + " already exists!");
}
THEMES.put(theme.getId(), theme);
}

@ApiStatus.Internal
void onReload() {
THEMES.clear();
jsonScreenThemes.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ public void setRelativePoint(GuiAxis axis, int v) {
}
}

@ApiStatus.Internal
public void applyPos(int parentX, int parentY) {
void applyPos(int parentX, int parentY) {
this.x = parentX + this.rx;
this.y = parentY + this.ry;
}
Expand Down