Skip to content

Commit

Permalink
Use package-private where appropriate (CleanroomMC#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune authored Aug 1, 2023
1 parent 95c263d commit 7f908ca
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 14 deletions.
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

0 comments on commit 7f908ca

Please sign in to comment.