Skip to content

Commit

Permalink
Add empty project of DynamicSpawnControl mod
Browse files Browse the repository at this point in the history
Co-authored-by: OldSerpskiStalker <ictopiar@gmail.com>
  • Loading branch information
acidicMercury8 and OldSerpskiStalker committed Sep 17, 2024
1 parent a1d4edd commit 0315f47
Show file tree
Hide file tree
Showing 27 changed files with 1,042 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/build-dynamicspawncontrol-1.12.2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: 'Build DynamicSpawnControl (1.12.2)'

on:
push:
branches:
- '**'
paths:
- '.github/workflows/build-dynamicspawncontrol-1.12.2.yml'
- 'dynamicspawncontrol-1.12.2/**'
- '!**/*.md'
- '!**/LICENSE*'

pull_request:
branches:
- '**'
paths:
- '.github/workflows/build-dynamicspawncontrol-1.12.2.yml'
- 'dynamicspawncontrol-1.12.2/**'
- '!**/*.md'
- '!**/LICENSE*'

defaults:
run:
shell: bash
working-directory: 'dynamicspawncontrol-1.12.2/'

jobs:
build-modification:
name: 'Build modification'

strategy:
matrix:
system:
- ubuntu-latest

runs-on: ${{ matrix.system }}

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'

- name: Build modification
run: ./gradlew build

- name: Upload modification
uses: actions/upload-artifact@v4
with:
name: dynamicspawncontrol-${{ github.sha }}
path: forge-1.12.2/build/libs/
13 changes: 13 additions & 0 deletions dynamicspawncontrol-1.12.2/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**/.git
**/.gradle
**/.vscode
**/bin
**/build
**/run
**/.dockerignore
**/Dockerfile*
**/*.dockerfile
**/*.sh
**/*.bat
**/*.ps1
**/*.md
14 changes: 14 additions & 0 deletions dynamicspawncontrol-1.12.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM openjdk:8-jdk-alpine AS build

WORKDIR /app

COPY . .

RUN \
./gradlew build

FROM scratch AS export

COPY --from=build \
/app/build/libs/*.jar \
/build/libs/
23 changes: 23 additions & 0 deletions dynamicspawncontrol-1.12.2/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
MIT License

Copyright (c) 2023-2024 ImeSense
Copyright (c) 2023-2024 acidicMercury8
Copyright (c) 2023-2024 OldSerpskiStalker

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
94 changes: 94 additions & 0 deletions dynamicspawncontrol-1.12.2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Minecraft Forge 1.12.2 MDK Template

<div>
<p>
<a href="./LICENSE">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License" />
</a>
<a href="https://github.com/imesense/minecraft-projects/actions/workflows/build-template-1.12.2.yml">
<img src="https://github.com/imesense/minecraft-projects/actions/workflows/build-template-1.12.2.yml/badge.svg" alt="Build template (1.12.2)" />
</a>
</p>
</div>

Template project of empty Minecraft Forge modification

## Requirements

For building:

- [JDK 8](https://github.com/adoptium/temurin8-binaries/releases/latest)
- [Git](https://git-scm.com/downloads)

For development:

- [Visual Studio Code](https://code.visualstudio.com/) or [IntelliJ IDEA](https://www.jetbrains.com/idea/download)
- [Git](https://git-scm.com/downloads)

## Building

- Download the repository:

```console
git clone https://github.com/imesense/minecraft-projects.git
```

### Console (Windows)

- Build modification:

```console
./gradlew.bat build
```

### Console (Linux/macOS)

- Build modification:

```sh
./gradlew build
```

### Visual Studio Code (Windows)

- Generate launch files:

```console
./gradlew.bat genVSCodeRuns
```

### Visual Studio Code (Linux/macOS)

- Generate launch files:

```sh
./gradlew genVSCodeRuns
```

### IntelliJ IDEA (Windows)

- Generate launch files:

```console
./gradlew.bat genIntellijRuns
```

### IntelliJ IDEA (Linux/macOS)

- Generate launch files:

```sh
./gradlew genIntellijRuns
```

### Docker

- Build modification:

```sh
docker build -f Dockerfile --output . .
```

## License

Contents of this project licensed under terms of the __MIT license__ unless otherwise specified. See [this](./LICENSE) file for details
2 changes: 2 additions & 0 deletions dynamicspawncontrol-1.12.2/build-mod.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:: Build modification
gradlew.bat build
4 changes: 4 additions & 0 deletions dynamicspawncontrol-1.12.2/build-mod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

# Build modification
./gradlew build
131 changes: 131 additions & 0 deletions dynamicspawncontrol-1.12.2/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
buildscript
{
repositories
{
maven
{
url = 'https://maven.minecraftforge.net/'
}
mavenCentral()
}

dependencies
{
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
}
}

apply plugin: 'net.minecraftforge.gradle'

apply plugin: 'eclipse'
apply plugin: 'maven-publish'

// File metadata
version = '0.1'
group = 'org.imesense.dynamicspawncontrol.modid'
archivesBaseName = 'dynamicspawncontrol'

// Java version
sourceCompatibility =
targetCompatibility =
compileJava.sourceCompatibility =
compileJava.targetCompatibility =
'1.8'

minecraft
{
// Mappings settings of Minecraft
mappings channel: 'snapshot', version: '20171003-1.12'

// Uncomment this to disable `Srg` named sources JAR by default
//makeObfSourceJar = false

//accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

// Default run configurations
runs
{
client
{
workingDirectory project.file('run')

// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
}

server
{
// Recommended logging data for a userdev environment
property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP'

// Recommended logging level for the console
property 'forge.logging.console.level', 'debug'
}
}
}

dependencies
{
// Specify the version of Minecraft to use
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'

// Optional dependencies that exist at compile-time but might not at runtime
//provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'

// Dependencies to get remapped to current MCP mappings
//deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
}

// Get properties into the manifest for reading by the runtime
jar
{
manifest
{
attributes([
"Specification-Title": "dynamicspawncontrol",
"Specification-Vendor": "imesense",
"Specification-Version": "1",
"Implementation-Title": project.name,
"Implementation-Version": "${version}",
"Implementation-Vendor" :"imesense",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

// Preferred method to reobfuscate JAR file
jar.finalizedBy('reobfJar')

// Delay the obfuscation
//publish.dependsOn('reobfJar')

publishing
{
publications
{
mavenJava(MavenPublication)
{
artifact jar
}
}

repositories
{
maven
{
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}

// Enable packaging of metadata and resources
sourceSets
{
main
{
output.resourcesDir = output.classesDir
}
}
2 changes: 2 additions & 0 deletions dynamicspawncontrol-1.12.2/generate-intellij.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:: Generate IntelliJ IDEA project
gradlew.bat genIntellijRuns
4 changes: 4 additions & 0 deletions dynamicspawncontrol-1.12.2/generate-intellij.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

# Generate IntelliJ IDEA project
./gradlew genIntellijRuns
2 changes: 2 additions & 0 deletions dynamicspawncontrol-1.12.2/generate-vscode.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
:: Generate Visual Studio Code project
gradlew.bat genVSCodeRuns
4 changes: 4 additions & 0 deletions dynamicspawncontrol-1.12.2/generate-vscode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh

# Generate Visual Studio Code project
./gradlew genVSCodeRuns
5 changes: 5 additions & 0 deletions dynamicspawncontrol-1.12.2/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Sets default memory used for gradle commands. Can be overridden by user or
# command line properties. This is required to provide enough memory for the
# Minecraft decompilation process
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
Loading

0 comments on commit 0315f47

Please sign in to comment.