Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 25 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
plugins {
// loom plugin
id 'fabric-loom' version "${loom_version}"
id "fabric-loom" version "${loom_version}"
// legacy looming (loom plugin improvements)
id 'legacy-looming' version "${loom_version}"
id 'com.palantir.git-version' version '3.1.0'
id 'com.diffplug.spotless' version '7.0.3'
id "legacy-looming" version "${loom_version}"
id "com.palantir.git-version" version "3.1.0"
id "com.diffplug.spotless" version "7.0.3"
}


Expand All @@ -23,50 +23,43 @@ java {

loom {
// set access widener
accessWidenerPath = file('src/main/resources/tasmod.accesswidener')
accessWidenerPath = file("src/main/resources/tasmod.accesswidener")
// add log4jconfig
log4jConfigs.from(file('src/main/resources/log4j.xml'))
log4jConfigs.from(file("src/main/resources/log4j.xml"))
}

// dependency repositories
repositories {
mavenCentral()
maven { url = 'https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/' }
maven { url = "https://maven.minecrafttas.com/main" }
//maven { url = "https://maven.minecrafttas.com/snapshots" }
maven { url = "https://raw.githubusercontent.com/BleachDev/cursed-mappings/main/" }
maven { url = "https://jitpack.io" }
maven { url = "https://maven.mgnet.work/main" }
maven { url = 'https://repo.spongepowered.org/maven' }
maven { url = "https://repo.spongepowered.org/maven" }
}

// dependency configurations
configurations {
// non-transitive download mod dependency
downloadMod.transitive = false
// embed dependency included in build
implementation.extendsFrom(embed)
}

// dependencies
dependencies {
// tasmod dependencies
embed group: 'com.dselent', name: 'bigarraylist', version: '1.1'
//compileOnly group: 'com.minecrafttas', name: 'killtherng', version: '2.0'
//downloadMod group: 'com.minecrafttas', name: 'killtherng-full', version: '2.0' // for downloadKTRNG task
embed "com.dselent:bigarraylist:1.6"
embed "com.github.KaptainWutax:SeedUtils:b6a383113c"

// loom dependencies
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.legacyfabric:yarn:${project.minecraft_version}+build.mcp"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

// testing dependencies
testImplementation "org.junit.jupiter:junit-jupiter:5.13.3"
testRuntimeOnly "org.junit.platform:junit-platform-launcher"
}

// task for downloading KillTheRng
//task downloadKTRNG(type: Copy) {
//group 'tasmod'
//description 'Download KillTheRNG to the run/mods/ folder of the project'
//from configurations.downloadMod
//into 'run/mods/'
//}

compileJava {
options.release = 8
Expand All @@ -78,7 +71,7 @@ processResources {
inputs.property "mcversion", project.minecraft_version

filesMatching("fabric.mod.json") {
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
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
}
}

Expand All @@ -95,7 +88,7 @@ jar {
}

// configure testing
tasks.named('test', Test) {
tasks.named("test", Test) {
useJUnitPlatform()

testLogging {
Expand All @@ -104,11 +97,11 @@ tasks.named('test', Test) {
}

spotless {
encoding 'UTF-8'
lineEndings 'UNIX'
java {
importOrderFile('formatter/TASmodImportorder.txt')
eclipse().configFile('formatter/TASmodFormatter.xml')
}
enforceCheck false
encoding "UTF-8"
lineEndings "UNIX"
java {
importOrderFile("formatter/TASmodImportorder.txt")
eclipse().configFile("formatter/TASmodFormatter.xml")
}
enforceCheck false
}
6 changes: 3 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
pluginManagement {
// add repositories for plugins
repositories {
maven { url = 'https://maven.mgnet.work/main' }
maven { url = 'https://maven.fabricmc.net/' }
maven { url = 'https://repo.legacyfabric.net/repository/legacyfabric/' }
maven { url = "https://maven.minecrafttas.com/main" }
maven { url = "https://maven.fabricmc.net/" }
maven { url = "https://repo.legacyfabric.net/repository/legacyfabric/" }
mavenCentral()
gradlePluginPortal()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import static com.minecrafttas.tasmod.registries.TASmodPackets.PLAYBACK_SAVE;
import static com.minecrafttas.tasmod.registries.TASmodPackets.PLAYBACK_STATE;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.nio.ByteBuffer;
import java.nio.file.Path;
Expand Down Expand Up @@ -51,7 +49,6 @@
import com.minecrafttas.tasmod.playback.tasfile.PlaybackSerialiser;
import com.minecrafttas.tasmod.playback.tasfile.exception.PlaybackLoadException;
import com.minecrafttas.tasmod.playback.tasfile.exception.PlaybackSaveException;
import com.minecrafttas.tasmod.playback.tasfile.flavor.SerialiserFlavorBase;
import com.minecrafttas.tasmod.registries.TASmodConfig;
import com.minecrafttas.tasmod.registries.TASmodPackets;
import com.minecrafttas.tasmod.util.Ducks.GuiScreenDuck;
Expand Down Expand Up @@ -572,7 +569,7 @@ public void setInputs(BigArrayList<InputContainer> inputs) {

public void setInputs(BigArrayList<InputContainer> inputs, long index) {
clearInputList();
SerialiserFlavorBase.addAll(this.inputs, inputs);
this.inputs.addAll(inputs);
setIndex(index);
}

Expand Down Expand Up @@ -616,12 +613,7 @@ public void clear() {
}

private void clearInputList() {
try {
inputs.clearMemory();
} catch (IOException e) {
e.printStackTrace();
}
inputs = new BigArrayList<InputContainer>(tasFileDirectory + File.separator + "temp");
inputs.clear();
}

public VirtualKeyboard getNextPlaybackKeyboard() {
Expand Down
Loading