Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Oneconfig, Kotlin, Pathfind lines #18

Open
wants to merge 22 commits into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c7c80fd
kotlin rewrite, oneconfig instead of forge config, refactor
kingstefan26 Dec 26, 2022
af151c7
remove unnecessary stuff from build.gradle, gradle now sets the versi…
kingstefan26 Dec 26, 2022
f6329b5
use filesystem workaround to list files inside a jar, fixes not launc…
kingstefan26 Dec 26, 2022
5639555
move oneconfig config class to kotlin
kingstefan26 Dec 26, 2022
958b400
move room size in RoomDetection to a enum
kingstefan26 Dec 26, 2022
7d24745
implement an enum reflecting the run stage
kingstefan26 Dec 26, 2022
2d3eeea
rename secretNum to secretCount
kingstefan26 Dec 26, 2022
c6d4349
implement proper deserialization of room data, rewrite most of Waypoi…
kingstefan26 Dec 26, 2022
a19f139
make the properties in Waypoints.kt make sense
kingstefan26 Dec 26, 2022
4c87a9e
add comments in RoomDataLoader
kingstefan26 Dec 26, 2022
6beebf7
refactor DungeonRooms.kt
kingstefan26 Dec 26, 2022
0888f4b
port basic pathfinding from dg
kingstefan26 Dec 27, 2022
91f9bb5
improve pathfind preformance by 400%, add changing colors to pathfind…
kingstefan26 Dec 27, 2022
fcc89ca
add force refresh map key
kingstefan26 Dec 27, 2022
b9414ee
automatic debug variable setting
kingstefan26 Dec 27, 2022
ee97dbf
version bump
kingstefan26 Dec 27, 2022
fa4e69a
add credits, remove jps algorithm since its broken and no one cares a…
kingstefan26 Dec 27, 2022
f19695b
remove useless duplicate logo
kingstefan26 Dec 28, 2022
22efadb
add licence/credits for dg
kingstefan26 Dec 28, 2022
71afaa4
point to real logo file
kingstefan26 Dec 28, 2022
a7879a9
cleanup pathfinding
kingstefan26 Dec 28, 2022
fd077f3
inline the debug config val
kingstefan26 Dec 29, 2022
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
Binary file added $buildDir/classes/java/main/drm_logo_x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ build
# other
eclipse
run
/$buildDir/
151 changes: 111 additions & 40 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,66 +1,137 @@
// For those who want the bleeding edge
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
plugins {
id 'idea'
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'dev.architectury.architectury-pack200' version '0.1.3'
id 'gg.essential.loom' version '0.10.0.+'
id 'org.jetbrains.kotlin.jvm' version '1.6.21'
id 'net.kyori.blossom' version '1.3.0'
}

tasks.wrapper {
gradleVersion = '7.4'
// You can either download the binary-only version of Gradle (BIN) or
// the full version (with sources and documentation) of Gradle (ALL)
distributionType = Wrapper.DistributionType.ALL
}
version = '4.0.0'
group = 'io.github.quantizr.DungeonRooms'
archivesBaseName = 'Dungeon_Rooms'
var mod_name = 'DRM'
var mod_id = 'dungeonrooms'

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
}

blossom {
replaceToken("@VER@", version)
replaceToken("@NAME@", mod_name)
replaceToken("@ID@", mod_id)
}

loom {
launchConfigs {
client {
arg('--tweakClass', 'cc.polyfrost.oneconfigwrapper.OneConfigWrapper')
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
runs {
'client' {
property('devauth.enabled','true')
client()
}
}
forge {
pack200Provider.set(new dev.architectury.pack200.java.Pack200Adapter())
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

version = "3.3.2"
group= "io.github.quantizr.DungeonRooms" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Dungeon_Rooms"

sourceCompatibility = targetCompatibility = 1.8
sourceSets.main {
output.setResourcesDir(file('$buildDir/classes/java/main'))
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"

repositories {
mavenCentral()
maven { url 'https://repo.polyfrost.cc/releases' }
maven { url 'https://jitpack.io' }
maven {url 'https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1'}
}

configurations {
implementation.extendsFrom shadowImpl
}

sourceSets {
main {
output.resourcesDir = java.outputDir
}

test {
useJUnitPlatform()
}


minecraft {
version = "1.8.9-11.15.1.2318-1.8.9"
runDir = "run"
dependencies {
minecraft('com.mojang:minecraft:1.8.9')
mappings('de.oceanlabs.mcp:mcp_stable:22-1.8.9')
forge('net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9')

implementation 'org.jetbrains:annotations-java5:23.0.0'
implementation 'org.joml:joml:1.10.5'
implementation 'com.github.ben-manes.caffeine:caffeine:2.9.3'

mappings = "stable_22"
modRuntimeOnly('me.djtheredstoner:DevAuth-forge-legacy:1.1.0')

compileOnly 'cc.polyfrost:oneconfig-1.8.9-forge:0.1.0-alpha+' // Should not be included in jar
implementation 'cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-alpha+' // Should be included in jar
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

jar {
manifest.attributes(
'Main-Class': 'DungeonRoomsInstallerFrame'
)
tasks.withType(Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archivesBaseName = 'drm'
manifest {
attributes['ModSide'] = 'CLIENT'
attributes['TweakOrder'] = '0'
attributes['TweakClass'] = 'cc.polyfrost.oneconfigwrapper.OneConfigWrapper'
attributes['ForceLoadAsMod'] = 'true'
attributes['FMLCorePluginContainsFMLMod'] = 'true'
// this['TweakClass'] = 'org.spongepowered.asm.launch.MixinTweaker'
// this['MixinConfigs'] = 'mixins.examplemod.json'
}
}

processResources {
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version

// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
tasks.shadowJar {

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
archiveFileName = jar.archiveFileName
relocate 'org.joml', 'io.github.quantizr.org.joml'
relocate 'com.github.benmanes.caffeine', 'io.github.quantizr.com.github.benmanes.caffeine'

dependencies {
include(dependency('org.joml:joml:..*'))
include(dependency('cc.polyfrost:oneconfig-wrapper-launchwrapper:..*'))
include(dependency('com.github.ben-manes.caffeine:caffeine:..*'))
}
}


tasks.named('remapJar') {
archiveClassifier = 'all'
from(tasks.shadowJar)
input = tasks.shadowJar.archiveFile
}


// copy everything else, thats not the mcmod.info
tasks.assemble.dependsOn tasks.remapJar

processResources {
inputs.property 'version', project.version
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
duplicatesStrategy = 'include'
include 'mcmod.info'
expand 'version': project.version
}
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
org.gradle.jvmargs=-Xmx2G
loom.platform=forge
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Tue Jan 26 23:06:02 PST 2021
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip
21 changes: 21 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
maven{ url "https://oss.sonatype.org/content/repositories/snapshots"}
maven{ url "https://maven.architectury.dev/"}
maven{ url "https://maven.fabricmc.net"}
maven{ url "https://maven.minecraftforge.net/"}
maven{ url "https://repo.spongepowered.org/maven/"}
maven{ url "https://repo.sk1er.club/repository/maven-releases/"}
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == "gg.essential.loom") {
useModule("gg.essential:architectury-loom:${requested.version}")
}
}
}
}

rootProject.name = "Dungeon Rooms"
Loading