Skip to content

Commit fbae542

Browse files
authored
Update BigArrayList dependency (#267)
2 parents 37b3f92 + d115de0 commit fbae542

File tree

10 files changed

+646
-245
lines changed

10 files changed

+646
-245
lines changed

build.gradle

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
plugins {
22
// loom plugin
3-
id 'fabric-loom' version "${loom_version}"
3+
id "fabric-loom" version "${loom_version}"
44
// legacy looming (loom plugin improvements)
5-
id 'legacy-looming' version "${loom_version}"
6-
id 'com.palantir.git-version' version '3.1.0'
7-
id 'com.diffplug.spotless' version '7.0.3'
5+
id "legacy-looming" version "${loom_version}"
6+
id "com.palantir.git-version" version "3.1.0"
7+
id "com.diffplug.spotless" version "7.0.3"
88
}
99

1010

@@ -23,50 +23,43 @@ java {
2323

2424
loom {
2525
// set access widener
26-
accessWidenerPath = file('src/main/resources/tasmod.accesswidener')
26+
accessWidenerPath = file("src/main/resources/tasmod.accesswidener")
2727
// add log4jconfig
28-
log4jConfigs.from(file('src/main/resources/log4j.xml'))
28+
log4jConfigs.from(file("src/main/resources/log4j.xml"))
2929
}
3030

3131
// dependency repositories
3232
repositories {
3333
mavenCentral()
34-
maven { url = 'https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/' }
34+
maven { url = "https://maven.minecrafttas.com/main" }
35+
//maven { url = "https://maven.minecrafttas.com/snapshots" }
36+
maven { url = "https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/" }
3537
maven { url = "https://jitpack.io" }
36-
maven { url = "https://maven.mgnet.work/main" }
37-
maven { url = 'https://repo.spongepowered.org/maven' }
38+
maven { url = "https://repo.spongepowered.org/maven" }
3839
}
3940

4041
// dependency configurations
4142
configurations {
42-
// non-transitive download mod dependency
43-
downloadMod.transitive = false
4443
// embed dependency included in build
4544
implementation.extendsFrom(embed)
4645
}
4746

4847
// dependencies
4948
dependencies {
5049
// tasmod dependencies
51-
embed group: 'com.dselent', name: 'bigarraylist', version: '1.1'
52-
//compileOnly group: 'com.minecrafttas', name: 'killtherng', version: '2.0'
53-
//downloadMod group: 'com.minecrafttas', name: 'killtherng-full', version: '2.0' // for downloadKTRNG task
50+
embed "com.dselent:bigarraylist:1.6"
51+
embed "com.github.KaptainWutax:SeedUtils:b6a383113c"
5452

5553
// loom dependencies
5654
minecraft "com.mojang:minecraft:${project.minecraft_version}"
5755
mappings "net.legacyfabric:yarn:${project.minecraft_version}+build.mcp"
5856
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
59-
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.3'
60-
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
57+
58+
// testing dependencies
59+
testImplementation "org.junit.jupiter:junit-jupiter:5.13.3"
60+
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
6161
}
6262

63-
// task for downloading KillTheRng
64-
//task downloadKTRNG(type: Copy) {
65-
//group 'tasmod'
66-
//description 'Download KillTheRNG to the run/mods/ folder of the project'
67-
//from configurations.downloadMod
68-
//into 'run/mods/'
69-
//}
7063

7164
compileJava {
7265
options.release = 8
@@ -78,7 +71,7 @@ processResources {
7871
inputs.property "mcversion", project.minecraft_version
7972

8073
filesMatching("fabric.mod.json") {
81-
expand 'mod_url': project.mod_url, 'name': project.mod_name, 'mod_version': project.version, 'mod_description': project.mod_description, 'mod_sources': project.mod_sources, 'mod_email': project.mod_email
74+
expand "mod_url": project.mod_url, "name": project.mod_name, "mod_version": project.version, "mod_description": project.mod_description, "mod_sources": project.mod_sources, "mod_email": project.mod_email
8275
}
8376
}
8477

@@ -95,7 +88,7 @@ jar {
9588
}
9689

9790
// configure testing
98-
tasks.named('test', Test) {
91+
tasks.named("test", Test) {
9992
useJUnitPlatform()
10093

10194
testLogging {
@@ -104,11 +97,11 @@ tasks.named('test', Test) {
10497
}
10598

10699
spotless {
107-
encoding 'UTF-8'
108-
lineEndings 'UNIX'
109-
java {
110-
importOrderFile('formatter/TASmodImportorder.txt')
111-
eclipse().configFile('formatter/TASmodFormatter.xml')
112-
}
113-
enforceCheck false
100+
encoding "UTF-8"
101+
lineEndings "UNIX"
102+
java {
103+
importOrderFile("formatter/TASmodImportorder.txt")
104+
eclipse().configFile("formatter/TASmodFormatter.xml")
105+
}
106+
enforceCheck false
114107
}

settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
pluginManagement {
33
// add repositories for plugins
44
repositories {
5-
maven { url = 'https://maven.mgnet.work/main' }
6-
maven { url = 'https://maven.fabricmc.net/' }
7-
maven { url = 'https://repo.legacyfabric.net/repository/legacyfabric/' }
5+
maven { url = "https://maven.minecrafttas.com/main" }
6+
maven { url = "https://maven.fabricmc.net/" }
7+
maven { url = "https://repo.legacyfabric.net/repository/legacyfabric/" }
88
mavenCentral()
99
gradlePluginPortal()
1010
}

src/main/java/com/minecrafttas/tasmod/playback/PlaybackControllerClient.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
import static com.minecrafttas.tasmod.registries.TASmodPackets.PLAYBACK_SAVE;
1010
import static com.minecrafttas.tasmod.registries.TASmodPackets.PLAYBACK_STATE;
1111

12-
import java.io.File;
13-
import java.io.IOException;
1412
import java.io.Serializable;
1513
import java.nio.ByteBuffer;
1614
import java.nio.file.Path;
@@ -51,7 +49,6 @@
5149
import com.minecrafttas.tasmod.playback.tasfile.PlaybackSerialiser;
5250
import com.minecrafttas.tasmod.playback.tasfile.exception.PlaybackLoadException;
5351
import com.minecrafttas.tasmod.playback.tasfile.exception.PlaybackSaveException;
54-
import com.minecrafttas.tasmod.playback.tasfile.flavor.SerialiserFlavorBase;
5552
import com.minecrafttas.tasmod.registries.TASmodConfig;
5653
import com.minecrafttas.tasmod.registries.TASmodPackets;
5754
import com.minecrafttas.tasmod.util.Ducks.GuiScreenDuck;
@@ -572,7 +569,7 @@ public void setInputs(BigArrayList<InputContainer> inputs) {
572569

573570
public void setInputs(BigArrayList<InputContainer> inputs, long index) {
574571
clearInputList();
575-
SerialiserFlavorBase.addAll(this.inputs, inputs);
572+
this.inputs.addAll(inputs);
576573
setIndex(index);
577574
}
578575

@@ -616,12 +613,7 @@ public void clear() {
616613
}
617614

618615
private void clearInputList() {
619-
try {
620-
inputs.clearMemory();
621-
} catch (IOException e) {
622-
e.printStackTrace();
623-
}
624-
inputs = new BigArrayList<InputContainer>(tasFileDirectory + File.separator + "temp");
616+
inputs.clear();
625617
}
626618

627619
public VirtualKeyboard getNextPlaybackKeyboard() {

0 commit comments

Comments
 (0)