-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Independence from clothconfig on neoforge
- Loading branch information
1 parent
7e94f09
commit 26366d8
Showing
21 changed files
with
395 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
common/src/main/java/com/github/dimadencep/mods/rrls/ConfigExpectPlatform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
package com.github.dimadencep.mods.rrls; | ||
|
||
import com.github.dimadencep.mods.rrls.config.AprilFool; | ||
import com.github.dimadencep.mods.rrls.config.HideType; | ||
import com.github.dimadencep.mods.rrls.config.ShowIn; | ||
import com.github.dimadencep.mods.rrls.config.Type; | ||
import dev.architectury.injectables.annotations.ExpectPlatform; | ||
|
||
public class ConfigExpectPlatform { | ||
@ExpectPlatform | ||
public static HideType hideType() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static boolean rgbProgress() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static boolean forceClose() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static ShowIn showIn() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static Type type() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static String reloadText() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static boolean resetResources() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static boolean reInitScreen() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static boolean earlyPackStatusSend() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static float animationSpeed() { | ||
throw new AssertionError(); | ||
} | ||
|
||
@ExpectPlatform | ||
public static AprilFool aprilFool() { | ||
throw new AssertionError(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
common/src/main/java/com/github/dimadencep/mods/rrls/config/AprilFool.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.github.dimadencep.mods.rrls.config; | ||
|
||
import java.util.Calendar; | ||
|
||
public enum AprilFool { | ||
ON_APRIL, | ||
ALWAYS, | ||
DISABLED; | ||
|
||
private static Calendar calendar; | ||
|
||
public boolean canUes() { | ||
if (this == ALWAYS) | ||
return true; | ||
|
||
try { | ||
if (this == ON_APRIL) { | ||
if (calendar == null) { | ||
calendar = Calendar.getInstance(); | ||
calendar.setTimeInMillis(System.currentTimeMillis()); | ||
} | ||
|
||
return calendar.get(Calendar.MONTH) == Calendar.APRIL && calendar.get(Calendar.DAY_OF_MONTH) == 1; | ||
} | ||
} catch (Throwable ignored) { | ||
} | ||
|
||
return false; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
common/src/main/java/com/github/dimadencep/mods/rrls/config/HideType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.github.dimadencep.mods.rrls.config; | ||
|
||
public enum HideType { | ||
ALL, | ||
LOADING, | ||
RELOADING, | ||
NONE; | ||
|
||
public boolean canHide(boolean reloading) { | ||
if (this == NONE) return false; | ||
|
||
if (this == ALL) return true; | ||
|
||
if (reloading) { | ||
return this == RELOADING; | ||
} else { | ||
return this == LOADING; | ||
} | ||
} | ||
} |
121 changes: 0 additions & 121 deletions
121
common/src/main/java/com/github/dimadencep/mods/rrls/config/ModConfig.java
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
common/src/main/java/com/github/dimadencep/mods/rrls/config/ShowIn.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.github.dimadencep.mods.rrls.config; | ||
|
||
public enum ShowIn { | ||
DISABLED, | ||
ONLY_GAME, | ||
ONLY_GUI, | ||
ALL; | ||
|
||
public boolean canShow(boolean isGame) { | ||
if (this == DISABLED) return false; | ||
|
||
if (this == ALL) return true; | ||
|
||
if (isGame) { | ||
return this == ONLY_GAME; | ||
} else { | ||
return this == ONLY_GUI; | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
common/src/main/java/com/github/dimadencep/mods/rrls/config/Type.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.github.dimadencep.mods.rrls.config; | ||
|
||
public enum Type { | ||
PROGRESS, | ||
TEXT | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.