Skip to content

Commit 5d805d1

Browse files
committed
Initial fork. Migrate to GTNH Gradle and apply spotless
0 parents  commit 5d805d1

File tree

232 files changed

+14288
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+14288
-0
lines changed

.editorconfig

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This is the universal Text Editor Configuration
2+
# for all GTNewHorizons projects
3+
# See: https://editorconfig.org/
4+
5+
root = true
6+
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 4
11+
indent_style = space
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
[*.{bat,ini}]
16+
end_of_line = crlf
17+
18+
[*.{dtd,json,info,mcmeta,md,sh,svg,xml,xsd,xsl,yaml,yml}]
19+
indent_size = 2
20+
21+
[*.lang]
22+
trim_trailing_whitespace = false

.gitattributes

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
* text eol=lf
2+
3+
*.[jJ][aA][rR] binary
4+
5+
*.[pP][nN][gG] binary
6+
*.[jJ][pP][gG] binary
7+
*.[jJ][pP][eE][gG] binary
8+
*.[gG][iI][fF] binary
9+
*.[tT][iI][fF] binary
10+
*.[tT][iI][fF][fF] binary
11+
*.[iI][cC][oO] binary
12+
*.[sS][vV][gG] text
13+
*.[eE][pP][sS] binary
14+
*.[xX][cC][fF] binary
15+
16+
*.[kK][aA][rR] binary
17+
*.[mM]4[aA] binary
18+
*.[mM][iI][dD] binary
19+
*.[mM][iI][dD][iI] binary
20+
*.[mM][pP]3 binary
21+
*.[oO][gG][gG] binary
22+
*.[rR][aA] binary
23+
24+
*.7[zZ] binary
25+
*.[gG][zZ] binary
26+
*.[tT][aA][rR] binary
27+
*.[tT][gG][zZ] binary
28+
*.[zZ][iI][pP] binary
29+
30+
*.[tT][cC][nN] binary
31+
*.[sS][oO] binary
32+
*.[dD][lL][lL] binary
33+
*.[dD][yY][lL][iI][bB] binary
34+
*.[pP][sS][dD] binary
35+
*.[tT][tT][fF] binary
36+
*.[oO][tT][fF] binary
37+
38+
*.[pP][aA][tT][cC][hH] -text
39+
40+
*.[bB][aA][tT] text eol=crlf
41+
*.[cC][mM][dD] text eol=crlf
42+
*.[pP][sS]1 text eol=crlf
43+
44+
*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary

.github/workflows/build-and-test.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
name: Build and test
3+
4+
on:
5+
pull_request:
6+
branches: [ master, main ]
7+
push:
8+
branches: [ master, main ]
9+
10+
jobs:
11+
build-and-test:
12+
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
13+
secrets: inherit

.github/workflows/release-tags.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
name: Release tagged build
3+
4+
on:
5+
push:
6+
tags: [ '*' ]
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release-tags:
13+
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
14+
secrets: inherit

.gitignore

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.gradle
2+
.settings
3+
/.idea/
4+
/.vscode/
5+
/run/
6+
/build/
7+
/eclipse/
8+
.classpath
9+
.project
10+
/bin/
11+
/config/
12+
/crash-reports/
13+
/logs/
14+
options.txt
15+
/saves/
16+
usernamecache.json
17+
banned-ips.json
18+
banned-players.json
19+
eula.txt
20+
ops.json
21+
server.properties
22+
servers.dat
23+
usercache.json
24+
whitelist.json
25+
/out/
26+
*.iml
27+
*.ipr
28+
*.iws
29+
src/main/resources/mixins.*([!.]).json
30+
*.bat
31+
*.DS_Store
32+
!gradlew.bat
33+
.factorypath
34+
addon.local.gradle
35+
addon.local.gradle.kts
36+
addon.late.local.gradle
37+
addon.late.local.gradle.kts
38+
layout.json

LICENSE

+222
Large diffs are not rendered by default.

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Chance Cubes
2+
This is a fork of Chance Cubes for Minecraft 1.7.10. It has been forked from the sources for version 1.7.10-2.4.1.182 of the original Chance Cubes. Obtained from CurseForge under the GPL v3 license.
3+
4+
This fork is also licensed under the GPL v3.
5+
6+
## Building
7+
8+
This fork uses https://github.com/GTNewHorizons/GTNHGradle to build, and follows the example from https://github.com/GTNewHorizons/ExampleMod1.7.10

build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
//version: 1707058017
2+
3+
plugins {
4+
id 'com.gtnewhorizons.gtnhconvention'
5+
}

dependencies.gradle

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Add your dependencies here. Supported configurations:
3+
* - api("group:name:version:classifier"): if you use the types from this dependency in the public API of this mod
4+
* Available at runtime and compiletime for mods depending on this mod
5+
* - implementation("g:n:v:c"): if you need this for internal implementation details of the mod, but none of it is visible via the public API
6+
* Available at runtime but not compiletime for mods depending on this mod
7+
* - compileOnly("g:n:v:c"): if the mod you're building doesn't need this dependency during runtime at all, e.g. for optional mods
8+
* Not available at all for mods depending on this mod, only visible at compiletime for this mod
9+
* - compileOnlyApi("g:n:v:c"): like compileOnly, but also visible at compiletime for mods depending on this mod
10+
* Available at compiletime but not runtime for mods depending on this mod
11+
* - runtimeOnlyNonPublishable("g:n:v:c"): if you want to include a mod in this mod's runClient/runServer runs, but not publish it as a dependency
12+
* Not available at all for mods depending on this mod, only visible at runtime for this mod
13+
* - devOnlyNonPublishable("g:n:v:c"): a combination of runtimeOnlyNonPublishable and compileOnly for dependencies present at both compiletime and runtime,
14+
* but not published as Maven dependencies - useful for RFG-deobfuscated dependencies or local testing
15+
* - runtimeOnly("g:n:v:c"): if you don't need this at compile time, but want it to be present at runtime
16+
* Available at runtime for mods depending on this mod
17+
* - annotationProcessor("g:n:v:c"): mostly for java compiler plugins, if you know you need this, use it, otherwise don't worry
18+
* - testCONFIG("g:n:v:c") - replace CONFIG by one of the above (except api), same as above but for the test sources instead of main
19+
*
20+
* - shadowImplementation("g:n:v:c"): effectively the same as API, but the dependency is included in your jar under a renamed package name
21+
* Requires you to enable usesShadowedDependencies in gradle.properties
22+
*
23+
* - compile("g:n:v:c"): deprecated, replace with "api" (works like the old "compile") or "implementation" (can be more efficient)
24+
*
25+
* You can exclude transitive dependencies (dependencies of the chosen dependency) by appending { transitive = false } if needed,
26+
* but use this sparingly as it can break using your mod as another mod's dependency if you're not careful.
27+
*
28+
* To depend on obfuscated jars you can use `devOnlyNonPublishable(rfg.deobf("dep:spec:1.2.3"))` to fetch an obfuscated jar from maven,
29+
* or `devOnlyNonPublishable(rfg.deobf(project.files("libs/my-mod-jar.jar")))` to use a file.
30+
*
31+
* Gradle names for some of the configuration can be misleading, compileOnlyApi and runtimeOnly both get published as dependencies in Maven, but compileOnly does not.
32+
* The buildscript adds runtimeOnlyNonPublishable to also have a runtime dependency that's not published.
33+
*
34+
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
35+
*/
36+
dependencies {
37+
api("com.github.GTNewHorizons:CTMLib:1.4.5:dev")
38+
compileOnly("com.github.GTNewHorizons:waila:1.7.3:dev")
39+
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.5.27-GTNH:dev")
40+
}

gradle.properties

+183
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
2+
# LOCAL to test local config updates.
3+
gtnh.settings.blowdryerTag = 0.2.2
4+
5+
# Human-readable mod name, available for mcmod.info population.
6+
modName = Chance Cubes
7+
8+
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
9+
# Conventionally lowercase.
10+
modId = chancecubes
11+
12+
# Root package of the mod, used to find various classes in other properties,
13+
# mcmod.info substitution, enabling assertions in run tasks, etc.
14+
modGroup = chanceCubes
15+
16+
# Whether to use modGroup as the maven publishing group.
17+
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
18+
useModGroupForPublishing = false
19+
20+
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
21+
autoUpdateBuildScript = false
22+
23+
# Version of Minecraft to target
24+
minecraftVersion = 1.7.10
25+
26+
# Version of Minecraft Forge to target
27+
forgeVersion = 10.13.4.1614
28+
29+
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
30+
channel = stable
31+
32+
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
33+
mappingsVersion = 12
34+
35+
# Defines other MCP mappings for dependency deobfuscation.
36+
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
37+
38+
# Select a default username for testing your mod. You can always override this per-run by running
39+
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
40+
developmentEnvironmentUserName = Developer
41+
42+
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
43+
# See https://github.com/bsideup/jabel for details on how this works.
44+
enableModernJavaSyntax = true
45+
46+
# Enables injecting missing generics into the decompiled source code for a better coding experience.
47+
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
48+
enableGenericInjection = true
49+
50+
# Generate a class with a String field for the mod version named as defined below.
51+
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
52+
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
53+
generateGradleTokenClass = chanceCubes.Tags
54+
55+
# Name of the token containing the project's current version to generate/replace.
56+
gradleTokenVersion = VERSION
57+
58+
# [DEPRECATED]
59+
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
60+
# public static final String VERSION = "GRADLETOKEN_VERSION";
61+
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
62+
# version in @Mod([...], version = VERSION, [...]).
63+
# Leave these properties empty to skip individual token replacements.
64+
replaceGradleTokenInFile =
65+
66+
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
67+
# leave this property empty.
68+
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
69+
apiPackage =
70+
71+
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
72+
# There can be multiple files in a space-separated list.
73+
# Example value: mymodid_at.cfg nei_at.cfg
74+
accessTransformersFile =
75+
76+
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
77+
usesMixins = false
78+
79+
# Adds some debug arguments like verbose output and class export.
80+
usesMixinDebug = false
81+
82+
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
83+
mixinPlugin =
84+
85+
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
86+
mixinsPackage =
87+
88+
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
89+
# This parameter is for legacy compatibility only
90+
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
91+
coreModClass =
92+
93+
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
94+
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
95+
containsMixinsAndOrCoreModOnly = false
96+
97+
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
98+
forceEnableMixins = false
99+
100+
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
101+
# responsibility to check the license and request permission for distribution if required.
102+
usesShadowedDependencies = false
103+
104+
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
105+
# their own classes, making the minimization unreliable.
106+
minimizeShadowedDependencies = true
107+
108+
# If disabled, won't rename the shadowed classes.
109+
relocateShadowedDependencies = true
110+
111+
# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories.
112+
includeWellKnownRepositories = true
113+
114+
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
115+
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
116+
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
117+
usesMavenPublishing = true
118+
119+
# Maven repository to publish the mod to.
120+
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
121+
122+
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
123+
#
124+
# The project's ID on Modrinth. Can be either the slug or the ID.
125+
# Leave this empty if you don't want to publish to Modrinth.
126+
modrinthProjectId =
127+
128+
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
129+
# Syntax: scope1-type1:name1;scope2-type2:name2;...
130+
# Where scope can be one of [required, optional, incompatible, embedded],
131+
# type can be one of [project, version],
132+
# and the name is the Modrinth project or version slug/id of the other mod.
133+
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
134+
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
135+
modrinthRelations =
136+
137+
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
138+
#
139+
# The project's numeric ID on CurseForge. You can find this in the About Project box.
140+
# Leave this empty if you don't want to publish on CurseForge.
141+
curseForgeProjectId =
142+
143+
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
144+
# Syntax: type1:name1;type2:name2;...
145+
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
146+
# and the name is the CurseForge project slug of the other mod.
147+
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
148+
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
149+
curseForgeRelations =
150+
151+
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
152+
# projects. New projects should not use this parameter.
153+
# customArchiveBaseName =
154+
155+
# Optional parameter to have the build automatically fail if an illegal version is used.
156+
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
157+
# The check is ONLY performed if the version is a git tag.
158+
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
159+
# versionPattern =
160+
161+
# Uncomment to prevent the source code from being published.
162+
# noPublishedSources = true
163+
164+
# Uncomment this to disable Spotless checks.
165+
# This should only be uncommented to keep it easier to sync with upstream/other forks.
166+
# That is, if there is no other active fork/upstream, NEVER change this.
167+
# disableSpotless = true
168+
169+
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
170+
# disableCheckstyle = true
171+
172+
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
173+
# (force use delegated build).
174+
# This is meant to be set in $HOME/.gradle/gradle.properties.
175+
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
176+
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
177+
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
178+
# ideaOverrideBuildType = idea
179+
180+
# Whether IDEA should run spotless checks when pressing the Build button.
181+
# This is meant to be set in $HOME/.gradle/gradle.properties.
182+
# ideaCheckSpotlessOnBuild = true
183+

gradle/wrapper/gradle-wrapper.jar

42.4 KB
Binary file not shown.
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)