-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Changes - [Savestates] Fix loading savestates across dimensions failing on the first try - [Gui] Readded keystrokes to the gui - [FileCommands] Added more precision to desyncMonitor - [Gui] Changed DesyncMonitor values from relative to absolute - Added hash to dev-build filename and ingame hud - Removed "savestates are broken" warnings from the chat - [Savestates] Switched to Paths instead of Files - [Savestates|Config] Reworked Config and other files - [Savestates] Switched from storing motion in the playerdata to storing motion in `World/tasmod/clientMotion.json` - [Gui] Removed "TASmod is still in development! Major issues may arise!" message in gui screens - [PlaybackSerialiser] Loads of fixes to integrate better with savestates - [VirtualInput] Fixed player being able to turn during playback - [Savestates] Fix scoreboard not being applied - [Savestates] Fix some redstone components behaving weirdly
- Loading branch information
Showing
70 changed files
with
3,249 additions
and
1,678 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
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,31 @@ | ||
name: Create Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '22' | ||
distribution: 'temurin' | ||
architecture: x64 | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
with: | ||
gradle-version: 8.10.2 | ||
- name: Setup workspace | ||
run: gradle build -Prelease=true | ||
- name: Upload assets | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: 'build/libs/!(-@(dev|sources|javadoc|all)).jar' | ||
- name: Publish 1.12.2 | ||
uses: Kir-Antipov/mc-publish@v3.3 | ||
with: | ||
files: 'build/libs/*-1.12.2-*!(*-@(dev|sources|javadoc|all)).jar' | ||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }} | ||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }} |
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
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
66 changes: 66 additions & 0 deletions
66
src/main/java/com/minecrafttas/mctcommon/ConfigurationRegistry.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,66 @@ | ||
package com.minecrafttas.mctcommon; | ||
|
||
import java.util.ArrayList; | ||
import java.util.LinkedHashMap; | ||
import java.util.List; | ||
|
||
import com.minecrafttas.mctcommon.ConfigurationRegistry.ConfigOptions; | ||
import com.minecrafttas.mctcommon.registry.AbstractRegistry; | ||
import com.minecrafttas.mctcommon.registry.Registerable; | ||
|
||
public class ConfigurationRegistry extends AbstractRegistry<ConfigOptions> { | ||
|
||
protected final List<ConfigOptions> configRegistry = new ArrayList<>(); | ||
|
||
public ConfigurationRegistry() { | ||
super("Configuration", new LinkedHashMap<>()); | ||
} | ||
|
||
@Override | ||
public void register(ConfigOptions registryObject) { | ||
if (registryObject == null) { | ||
return; | ||
} | ||
|
||
if (configRegistry.contains(registryObject)) { | ||
return; | ||
} | ||
|
||
configRegistry.add(registryObject); | ||
} | ||
|
||
@Override | ||
public void unregister(ConfigOptions registryObject) { | ||
if (registryObject == null) { | ||
return; | ||
} | ||
|
||
if (!configRegistry.contains(registryObject)) { | ||
return; | ||
} | ||
|
||
configRegistry.remove(registryObject); | ||
} | ||
|
||
public List<ConfigOptions> getConfigRegistry() { | ||
return configRegistry; | ||
} | ||
|
||
/** | ||
* <p>Interface for registering your own options in the TASmod config | ||
* | ||
* @see com.minecrafttas.tasmod.registries.TASmodConfig TASmodConfig | ||
* @author Scribble | ||
*/ | ||
public interface ConfigOptions extends Registerable { | ||
/** | ||
* @return The config key name that is stored in the file | ||
*/ | ||
public String getConfigKey(); | ||
|
||
/** | ||
* @return The default value that is used if the config key doesn't exist yet | ||
*/ | ||
public String getDefaultValue(); | ||
} | ||
} |
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.