Skip to content

Commit 95fcb9d

Browse files
authored
Merge pull request #3 from tildejustin/fix/illegal-state-exception
fix illegal state exception
2 parents 988b7ab + d64e749 commit 95fcb9d

6 files changed

Lines changed: 5 additions & 82 deletions

File tree

.github/FUNDING.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ plugins {
88
sourceCompatibility = JavaVersion.VERSION_1_8
99
targetCompatibility = JavaVersion.VERSION_1_8
1010

11-
archivesBaseName = "${project.mod_id}-${project.minecraft_version}"
12-
version = "${getVersionMetadata()}"
11+
archivesBaseName = project.mod_id
12+
version = "$mod_version+$minecraft_version"
1313
group = project.maven_group
1414

1515
def getVersionMetadata() {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ loader_version=0.12.2
99
fabric_version=0.18.0+build.387-1.16.1
1010

1111
# Mod Properties
12-
mod_version = 2.3.3
12+
mod_version = 4.0.1
1313
maven_group = me.voidxwalker
1414
mod_id = worldpreview
1515

src/main/java/me/voidxwalker/worldpreview/StateOutputHelper.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*/
1616
public final class StateOutputHelper {
1717
private static final Path OUT_PATH = Paths.get("wpstateout.txt");
18-
private static final ExecutorService EXECUTOR = Executors.newSingleThreadExecutor();
1918
// Storage variable, not necessarily involved or required for using outputState()
2019
public static int loadingProgress = 0;
2120
public static boolean titleHasEverLoaded = false;
@@ -40,11 +39,10 @@ public static void outputState(String string) {
4039
}
4140
lastOutput = string;
4241

43-
// Queue up the file writes as to not interrupt mc itself
44-
EXECUTOR.execute(() -> outputStateInternal(string));
42+
outputStateInternal(string);
4543
}
4644

47-
private static void outputStateInternal(String string) {
45+
private synchronized static void outputStateInternal(String string) {
4846
try {
4947
if(stateFile == null){ // opening file only once is better for performance
5048
stateFile = new RandomAccessFile(OUT_PATH.toString(), "rw");

0 commit comments

Comments
 (0)