Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
quentin452 authored Mar 18, 2023
0 parents commit 2a7e128
Show file tree
Hide file tree
Showing 29 changed files with 9,339 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew SetupCIWorkspace build
- uses: actions/upload-artifact@v2
with:
name: Package
path: build/libs
28 changes: 28 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# mac os
.DS_Store

# forge / gradle
.gradle
build/
out/
classes/
run/

# eclipse
*.launch
.settings
.classpath
.project
eclipse

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/
bin/
.classpath
28 changes: 28 additions & 0 deletions CREDITS-fml.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
This is Forge Mod Loader.

You can find the source code at all times at https://github.com/MinecraftForge/FML

This minecraft mod is a clean open source implementation of a mod loader for minecraft servers
and minecraft clients.

The code is authored by cpw.

It began by partially implementing an API defined by the client side ModLoader, authored by Risugami.
http://www.minecraftforum.net/topic/75440-
This support has been dropped as of Minecraft release 1.7, as Risugami no longer maintains ModLoader.

It also contains suggestions and hints and generous helpings of code from LexManos, author of MinecraftForge.
http://www.minecraftforge.net/

Additionally, it contains an implementation of topological sort based on that
published at http://keithschwarz.com/interesting/code/?dir=topological-sort

It also contains code from the Maven project for performing versioned dependency
resolution. http://maven.apache.org/

It also contains a partial repackaging of the javaxdelta library from http://sourceforge.net/projects/javaxdelta/
with credit to it's authors.

Forge Mod Loader downloads components from the Minecraft Coder Pack
(http://mcp.ocean-labs.de/index.php/Main_Page) with kind permission from the MCP team.

491 changes: 491 additions & 0 deletions LICENSE-fml.txt

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions MinecraftForge-Credits.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
* Eloraam *

* FlowerChild *

* Hawkye *

* MALfunction84 *

Submitted the sleep handler code for his mod (Somnia) and others to use.

* Scokeev9 *

Gave permission for ScotTools API to be integrated into MCF, and also supported the Forge by converting his mods to use it.

ScotTools Background: ScotTools was an API that enabled modders to add blocks to harvesting levels (and many other ease-of-use features to create new tools), and the first tool API that used block material for block breaking efficiency which allowed blocks from mods that didn't use ScotTools API to break with the correct speed.

* SpaceToad *

* LexManos *

* cpw *

* Minecraft Coder Pack (MCP) *
Forge Mod Loader and Minecraft Forge have permission to distribute and automatically download components of MCP and distribute MCP data files.
This permission is not transitive and others wishing to redistribute the Minecraft Forge source independently should seek permission of MCP or
remove the MCP data files and request their users to download MCP separately.
70 changes: 70 additions & 0 deletions MinecraftForge-License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
Minecraft Forge Public Licence
==============================

Version 1.0

0. Definitions
--------------

Minecraft: Denotes a copy of the Minecraft game licensed by Mojang AB

User: Anybody that interract with the software in one of the following ways:
- play
- decompile
- recompile or compile
- modify

Minecraft Forge: The Minecraft Forge code, in source form, class file form, as
obtained in a standalone fashion or as part of a wider distribution.

Dependency: Code required to have Minecraft Forge working properly. That can
include dependencies required to compile the code as well as modifications in
the Minecraft sources that are required to have Minecraft Forge working.

1. Scope
--------

The present license is granted to any user of Minecraft Forge, for all files included
unless stated otherwise in the file itself. As a prerequisite, a user of Minecraft
Forge must own a legally aquired copy of Minecraft.

2. Play rights
--------------

The user of Minecraft Forge is allowed to install the software on a client or
a server and to play it without restriction.

3. Modification rights
----------------------

The user has the right to decompile the source code, look at either the
decompiled version or the original source code, and to modify it.

4. Derivation rights
--------------------

The user has the rights to derive code from Minecraft Forge, that is to say to
write code that either extends Minecraft Forge class and interfaces,
instantiate the objects declared or calls the functions. This code is known as
"derived" code, and can be licensed with conditions different from Minecraft
Forge.


5. Distribution rights
----------------------

The user of Minecraft Forge is allowed to redistribute Minecraft Forge in
partially, in totallity, or included in a distribution. When distributing
binaries or class files, the user must provide means to obtain the sources of
the distributed version of Minecraft Forge at no costs. This includes the
files as well as any dependency that the code may rely on, including patches to
minecraft original sources.

Modification of Minecraft Forge as well as dependencies, including patches to
minecraft original sources, has to remain under the terms of the present
license.

The right to distribute Minecraft Forge does not extend to the right to distribute
MCP data files included within Minecraft Forge. These are the property of the MCP
project and should be removed from any customized distribution of Minecraft Forge
or permission sought separately from the MCP team.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# anatawa12's ForgeGradle 1.2 fork for Gradle 4.4.1+ - example project

This is an example mod using the [fork of ForgeGradle-1.2 made by anatawa12](https://github.com/anatawa12/ForgeGradle-1.2).
This fork supports Gradle 4.4.1 and later. This example project uses Gradle 5.6.4.

## How to use this example project

You can download this example project from [here](https://github.com/anatawa12/ForgeGradle-example/archive/master.zip), or use it as a template on Github.
This project can be used as a replacement for Forge's 1.7.10 MDK.

## How to replace ForgeGradle 1.2. with anatawa12's fork
Although this example project has some differences to Forge's 1.7.10 MDK, anatawa12's fork of ForgeGradle 1.2 can be used by most projects with only minimal changes to their Gradle build script.

Here is a list of changes to Forge's 1.7.10 MDK Gradle build script, to replace the official ForgeGradle 1.2 plugin with the fork. These changes are likely to work with most projects based on Forge's 1.7.10 MDK.

In the repositories block of the buildscript section, add jcenter, and switch the Forge maven to use HTTPS instead of HTTP:
```diff
repositories {
mavenCentral()
maven {
name = "forge"
- url = "http://files.minecraftforge.net/maven"
+ url = "https://maven.minecraftforge.net/"
}
```

Also in the dependencies block of the buildscript section, change the dependency on Forge's official ForgeGradle 1.2 to the fork:
```diff
dependencies {
- classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
+ classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
+ changing = true
+ }
}
```

The Gradle wrapper should also be changed to use Gradle 4.4.1 or higher. <!--Currently, the plugin [does not support Gradle 6.x](https://github.com/anatawa12/ForgeGradle-1.2/issues/9), although this may change in the future. As such, the latest version of Gradle this plugin supports is Gradle 5.6.4.-->
106 changes: 106 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "https://maven.minecraftforge.net/"
}
}
dependencies {
classpath ('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
changing = true
}
}
}

plugins {
id 'java-library'
id 'maven-publish'
}

apply plugin: 'forge'

// These settings allow you to choose what version of Java you want to be compatible with. Forge 1.7.10 runs on Java 6 to 8.
sourceCompatibility = 1.6
targetCompatibility = 1.6

version = project.version
group = project.group

minecraft {
version = project.minecraft_version + "-" + project.forge_version
runDir = "run"
}

dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"

// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env

// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}

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 values in only mcmod.info.
filesMatching('mcmod.info') {
// Replace version and mcversion.
expand 'version':project.version, 'mcversion':project.minecraft.version
}
}

// Ensures that the encoding of source files is set to UTF-8, see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

// This task creates a .jar file containing the source code of this mod.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}

// This task creates a .jar file containing a deobfuscated version of this mod, for other developers to use in a development environment.
task devJar(type: Jar) {
classifier = "dev"
from sourceSets.main.output
}

// Creates the listed artifacts on building the mod.
artifacts {
archives sourcesJar
archives devJar
}

// This block configures any maven publications you want to make.
publishing {
publications {
mavenJava(MavenPublication) {
// Add any other artifacts here that you would like to publish!
artifact(jar) {
builtBy build
}
artifact(sourcesJar) {
builtBy sourcesJar
}
artifact(devJar) {
builtBy devJar
}
}
}

// This block selects the repositories you want to publish to.
repositories {
// Add the repositories you want to publish to here.
}
}
Empty file.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#Sun Jun 05 18:58:07 CEST 2011
version=1
eclipse.preferences.version=1
refresh.enabled=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#Sun Jun 05 19:03:53 CEST 2011
eclipse.preferences.version=1
org.eclipse.debug.ui.UseContextualLaunch=false
Console.highWaterMark=88000
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.ui.console.ConsoleView">\r\n<perspective id\="org.eclipse.jdt.ui.JavaPerspective" userAction\="opened"/>\r\n</view>\r\n</viewBindings>\r\n
StringVariablePreferencePage=130,107,107,86,
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Sun Jun 05 18:58:07 CEST 2011
eclipse.preferences.version=1
org.eclipse.epp.usagedata.gathering.enabled=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#Sun Sep 18 16:44:39 NZST 2011
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.source=1.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#Sun Jun 05 18:58:05 CEST 2011
spacesForTabs=true
eclipse.preferences.version=1
overviewRuler_migration=migrated_3.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#Sun Jun 05 18:58:07 CEST 2011
IMPORT_FILES_AND_FOLDERS_MODE=prompt
IMPORT_FILES_AND_FOLDERS_VIRTUAL_FOLDER_MODE=prompt
SAVE_ALL_BEFORE_BUILD=true
eclipse.preferences.version=1
tipsAndTricks=true
platformState=1287081747687
quickStart=false
PROBLEMS_FILTERS_MIGRATE=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#Sun Jun 05 18:50:08 CEST 2011
eclipse.preferences.version=1
showIntro=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/Minecraft/lib/net/minecraft/launchwrapper/1.8/launchwrapper-1.8.jar"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="GradleStart"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Minecraft"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xincgc -Xmx1024M -Xms1024M"/>
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
</launchConfiguration>
Loading

0 comments on commit 2a7e128

Please sign in to comment.