Skip to content

Commit

Permalink
Merge pull request #3 from lolouthefox/dev-1.20.1
Browse files Browse the repository at this point in the history
Dev 1.20.1
  • Loading branch information
lolouthefox authored Jul 5, 2023
2 parents 39c30c9 + 9ea638a commit b80a9e5
Show file tree
Hide file tree
Showing 23 changed files with 280 additions and 21 deletions.
Binary file modified .gradle/7.3.3/checksums/checksums.lock
Binary file not shown.
Binary file modified .gradle/7.3.3/checksums/md5-checksums.bin
Binary file not shown.
Binary file modified .gradle/7.3.3/checksums/sha1-checksums.bin
Binary file not shown.
Binary file modified .gradle/7.3.3/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.3.3/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.3.3/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.3.3/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/file-system.probe
Binary file not shown.
2 changes: 1 addition & 1 deletion .idea/runConfigurations/Minecraft_Server.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
<h2>Description</h2>
Ever tried playing on servers with shaders? Probably, and we can all agree that it can be annoying to always have constant dawn while playing in servers as it reduces visibility for shaders enjoyers. This Fabric mod will make you able to control time while playing client-side. Meaning that it will only change what the game displays to you and no other player’s. Additionally it doesn’t affect gameplay.

<h2>1.20 update</h2>
1.20 is coming soon and I will try my best to update the mod as soon as possible. I am currently waiting for the following mods to update their mods to 1.20 as they are essential dependencies;
<h2>Description</h2>
Ever tried playing on servers with shaders? Probably, and we can all agree that it can be annoying to always have constant dawn while playing in servers as it reduces visibility for shaders enjoyers. This Fabric mod will make you able to control time while playing client-side. Meaning that it will only change what the game displays to you and no other player’s. Additionally it doesn’t affect gameplay.

- ❎ Yet Another Config Lib
- ❎ Cloth Config
- ❎ Mod Menu
<h2>About updates</h2>
The mod will always be compatible and updated with the latest Minecraft version available and the version right before this one. The mod will only be updated for official releases.

<h2>How to use</h2>
This is fairly easy to use. Go in main menu or pause menu and select "Mods", then find Sunshine and click on the edit settings button to enable/disable and change time!
This is fairly easy to use. Go in main menu or pause menu and select "Mods", then find Sunshine and click on the edit settings button to enable/disable and change time! You can now also use the "Y" key to enable or disable the mod, you can change this in Minecraft keybinds settings.

<h2>Looking for feedbacks!</h2>
Do you have an idea (I don't have any idea on how to improve the mod) or found a bug? Please create an issue on GitHub using the issues button on the side panel.
Expand Down
Binary file modified build/devlibs/Sunshine-1.1.0-dev.jar
Binary file not shown.
Binary file modified build/devlibs/Sunshine-1.1.0-sources.jar
Binary file not shown.
Binary file modified build/libs/Sunshine-1.1.0-sources.jar
Binary file not shown.
Binary file modified build/libs/Sunshine-1.1.0.jar
Binary file not shown.

This file was deleted.

16 changes: 8 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
loader_version=0.14.19
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.9
loader_version=0.14.21

# Mod Properties
mod_version = 1.1.0
Expand All @@ -14,10 +14,10 @@ org.gradle.jvmargs=-Xmx1G

# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.78.0+1.19.4
modmenu_version=6.1.0-rc.4
yacl_version=2.4.0
cloth_config_version=10.0.96
fabric_version=0.85.0+1.20.1
modmenu_version=7.1.0
yacl_version=3.0.3
cloth_config_version=11.0.99

# MidnightLib
midnightlib_version=1.1.0-fabric
midnightlib_version=1.4.1-fabric
80 changes: 80 additions & 0 deletions remappedSrc/lolousstudio/sunshine/ConfigMenu.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package lolousstudio.sunshine;

import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
import me.shedaniel.clothconfig2.api.ConfigBuilder;
import me.shedaniel.clothconfig2.api.ConfigCategory;
import me.shedaniel.clothconfig2.api.ConfigEntryBuilder;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.text.Text;

@Config(name = "alwayssun")
public class ConfigMenu implements ConfigData, ModMenuApi {
public boolean staticTime = true;
public int timeTick = 6000;

public Screen MyConfig() throws ValidationException {
ConfigMenu config = AutoConfig.getConfigHolder(ConfigMenu.class).getConfig();
config.validatePostLoad();

ConfigBuilder builder = (ConfigBuilder) ConfigBuilder.create()
.setTitle(Text.literal("Sunshine"))
.setTransparentBackground(true)
.setSavingRunnable(() -> {

});
ConfigCategory general = builder.getOrCreateCategory(Text.literal("Time of day"));
ConfigEntryBuilder entryBuilder = builder.entryBuilder();
general.addEntry(entryBuilder.startBooleanToggle(Text.literal("Make time static"), config.staticTime)
.setDefaultValue(true)
.setTooltip(Text.literal("Time will not cycle."))
.setSaveConsumer(newValue -> config.staticTime = newValue)
.build()
);
general.addEntry(entryBuilder.startIntSlider(Text.literal("World time tick"), config.timeTick, 0, 24000)
.setDefaultValue(6000)
.setTooltip(Text.literal("Time that the game will show."))
.setSaveConsumer(newValue -> config.timeTick = newValue)
.build()
);
Screen screen = builder.build();
return screen;
}

@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return parent -> {
try {
return MyConfig();
} catch (ValidationException e) {
throw new RuntimeException(e);
}
};
}
}























Loading

0 comments on commit b80a9e5

Please sign in to comment.