-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21feeb6
commit 4b6652b
Showing
18 changed files
with
251 additions
and
22 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
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
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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
org.gradle.jvmargs=-Xmx4G | ||
|
||
available_loaders=fabric,forge,tweaker | ||
available_loaders=fabric,forge,neoforge,tweaker | ||
|
||
mod_version=1.10.2 | ||
maven_group=baritone | ||
archives_base_name=baritone | ||
|
||
minecraft_version=1.20.2 | ||
forge_version=48.0.1 | ||
minecraft_version=1.20.4 | ||
|
||
forge_version=49.0.3 | ||
neoforge_version=0-beta | ||
|
||
fabric_version=0.14.22 | ||
|
||
nether_pathfinder_version=1.4.1 |
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,134 @@ | ||
/* | ||
* This file is part of Baritone. | ||
* | ||
* Baritone is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Baritone is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
import baritone.gradle.task.CreateDistTask | ||
import baritone.gradle.task.ProguardTask | ||
|
||
plugins { | ||
id "com.github.johnrengelman.shadow" version "8.0.0" | ||
} | ||
|
||
archivesBaseName = archivesBaseName + "-neoforge" | ||
|
||
unimined.minecraft { | ||
mappings { | ||
devFallbackNamespace "intermediary" | ||
} | ||
|
||
neoForged { | ||
loader project.neoforge_version | ||
mixinConfig ["mixins.baritone.json"] | ||
} | ||
|
||
minecraftRemapper.config { | ||
// neoforge adds 1 conflict, where 2 interfaces have a method with the same name on yarn/mojmap, | ||
// but the method has different names in the intermediary mappings. | ||
// this is a conflict because they have a class that extends both interfaces. | ||
// this shouldn't be a problem as long as named mappings don't make the name of those 2 methods different. | ||
ignoreConflicts(true) | ||
} | ||
|
||
} | ||
|
||
//loom { | ||
// forge { | ||
// mixinConfig 'mixins.baritone.json' | ||
// } | ||
//} | ||
|
||
configurations { | ||
common | ||
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this. | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
} | ||
|
||
dependencies { | ||
// because of multiple sourcesets `common project(":")` doesn't work | ||
for (sourceSet in rootProject.sourceSets) { | ||
if (sourceSet == rootProject.sourceSets.test) continue | ||
if (sourceSet == rootProject.sourceSets.schematica_api) continue | ||
common sourceSet.output | ||
shadowCommon sourceSet.output | ||
} | ||
shadowCommon "dev.babbaj:nether-pathfinder:${nether_pathfinder_version}" | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("META-INF/mods.toml") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
shadowJar { | ||
configurations = [project.configurations.shadowCommon] | ||
archiveClassifier.set "dev-shadow" | ||
} | ||
|
||
remapJar { | ||
inputFile.set shadowJar.archiveFile | ||
dependsOn shadowJar | ||
archiveClassifier.set null | ||
} | ||
|
||
jar { | ||
archiveClassifier.set "dev" | ||
|
||
manifest { | ||
attributes( | ||
'MixinConfigs': 'mixins.baritone.json', | ||
"MixinConnector": "baritone.launch.BaritoneMixinConnector", | ||
|
||
'Implementation-Title': 'Baritone', | ||
'Implementation-Version': version, | ||
) | ||
} | ||
} | ||
|
||
components.java { | ||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { | ||
skip() | ||
} | ||
} | ||
|
||
task proguard(type: ProguardTask) { | ||
url 'https://github.com/Guardsquare/proguard/releases/download/v7.2.1/proguard-7.2.1.zip' | ||
extract 'proguard-7.2.1/lib/proguard.jar' | ||
compType "neoforge" | ||
} | ||
|
||
task createDist(type: CreateDistTask, dependsOn: proguard) { | ||
compType "neoforge" | ||
} | ||
|
||
build.finalizedBy(createDist) | ||
|
||
publishing { | ||
publications { | ||
mavenFabric(MavenPublication) { | ||
artifactId = rootProject.archives_base_name + "-" + project.name | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
} | ||
} |
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,18 @@ | ||
# | ||
# This file is part of Baritone. | ||
# | ||
# Baritone is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Baritone is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with Baritone. If not, see <https://www.gnu.org/licenses/>. | ||
# | ||
|
||
loom.platform=forge |
24 changes: 24 additions & 0 deletions
24
neoforge/src/main/java/baritone/launch/BaritoneForgeModXD.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,24 @@ | ||
/* | ||
* This file is part of Baritone. | ||
* | ||
* Baritone is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Baritone is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with Baritone. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package baritone.launch; | ||
|
||
import net.neoforged.fml.common.Mod; | ||
|
||
@Mod("baritoe") | ||
public class BaritoneForgeModXD { | ||
} |
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,40 @@ | ||
# This is an example mods.toml file. It contains the data relating to the loading mods. | ||
# There are several mandatory fields (#mandatory), and many more that are optional (#optional). | ||
# The overall format is standard TOML format, v0.5.0. | ||
# Note that there are a couple of TOML lists in this file. | ||
# Find more information on toml format here: https://github.com/toml-lang/toml | ||
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml | ||
modLoader="javafml" #mandatory | ||
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version | ||
loaderVersion="[1,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions. | ||
license="https://raw.githubusercontent.com/cabaletta/baritone/1.16.2/LICENSE" | ||
# A URL to refer people to when problems occur with this mod | ||
issueTrackerURL="https://github.com/cabaletta/baritone/issues" #optional | ||
# A list of mods - how many allowed here is determined by the individual mod loader | ||
[[mods]] #mandatory | ||
# The modid of the mod | ||
modId="baritoe" #mandatory | ||
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it | ||
version="${version}" #mandatory | ||
# A display name for the mod | ||
displayName="Baritone" #mandatory | ||
# A URL for the "homepage" for this mod, displayed in the mod UI | ||
displayURL="https://github.com/cabaletta/baritone" #optional | ||
# A file name (in the root of the mod JAR) containing a logo for display | ||
#logoFile="examplemod.png" #optional | ||
# A text field displayed in the mod UI | ||
credits="Hat Gamers" #optional | ||
# A text field displayed in the mod UI | ||
authors="leijurv, Brady" #optional | ||
# The description text for the mod (multi line!) (#mandatory) | ||
description=''' | ||
A Minecraft pathfinder bot. | ||
''' | ||
|
||
[[dependencies.baritoe]] | ||
modId="minecraft" | ||
mandatory=true | ||
# This version range declares a minimum of the current minecraft version up to but not including the next major version | ||
versionRange="[1.20.4]" | ||
ordering="NONE" | ||
side="BOTH" |
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,6 @@ | ||
{ | ||
"pack": { | ||
"description": "null", | ||
"pack_format": 8 | ||
} | ||
} |
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
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
Oops, something went wrong.