Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-kirby committed May 6, 2020
0 parents commit f160d84
Show file tree
Hide file tree
Showing 14 changed files with 761 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java 8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew build
- name: Package
uses: actions/upload-artifact@v1
with:
name: SevPatches-${{ github.sha }}
path: build/libs
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Java 8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build
run: ./gradlew build
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/libs/sevpatches-${{ github.event.release.tag_name }}.${{ github.run_number }}.jar
asset_name: sevpatches-${{ github.event.release.tag_name }}.${{ github.run_number }}.jar
asset_content_type: application/java-archive
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# IntelliJ project files
.idea
*.iml
out

# Gradle files
.gradle

# Minecraft files
run

# Project Build files
build

# Compiled jars
*.jar
!gradle/wrapper/gradle-wrapper.jar

# System files
*.DS_Store
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SevPatches
A small coremod to patch some longstanding issues in SevTech Ages that either could not be resolved in another fashion,
or which have not been resolved in a timely manner.

## Patches
#### DarkPacks/SevTech-Ages#3829
Patches SimpleHarvest. Firing of HarvestDropsEvent moved to after the point at which the decision is taken to harvest.

Without this patch, SimpleHarvest fires the HarvestDropsEvent before deciding if it intends to break the block, allowing
mods such as AstralSorcery or IndustrialForegoing to consume the drops array before deciding not to take any action.

#### DarkPacks/SevTech-Ages#3847
Patches InControl. Changes the priority of InControl's LivingDropsEvent handler to LOW (was LOWEST). Whilst this change
can't be made to InControl due to compatibility issues in other contexts, no compatibility issues have yet been found in
SevTech.

This allows mods which wish to consume the drops array to do so after InControl has made the desired changes.

#### DarkPacks/SevTech-Ages#3732
Patches Immersive Engineering. This patch adds an additional check to the onEntityCollision handler of the metal press.
The metal press will no longer pick up 'EntityItem's, but will accept all derived classes.

This prevents the metal press from picking up from the temporary vanilla item entity before Real Drops replaces it with
its own entity.
112 changes: 112 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = "https://plugins.gradle.org/m2/" }
jcenter()
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
classpath 'com.wynprice.cursemaven:CurseMaven:2.1.1'
}
}

apply plugin: 'net.minecraftforge.gradle'
// Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'com.wynprice.cursemaven'

def buildnumber = System.getenv('GITHUB_RUN_NUMBER')
def suffix = buildnumber != null ? ".$buildnumber" : '-SNAPSHOT'
def displayName = 'SevPatches'

version = "1.0$suffix"
group = 'tv.darkosto.sevpatches' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'sevpatches'

sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

minecraft {
// The mappings can be changed at any time, and must be in the following format.
// snapshot_YYYYMMDD Snapshot are built nightly.
// stable_# Stables are built at the discretion of the MCP team.
// Use non-default mappings at your own risk. they may not always work.
// Simply re-run your setup task after changing the mappings to update your workspace.
//mappings channel: 'snapshot', version: '20171003-1.12'
mappings channel: 'stable', version: '39-1.12'
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.

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

// Default run configurations.
// These can be tweaked, removed, or duplicated as needed.
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'

jvmArg '-Dfml.coreMods.load=tv.darkosto.sevpatches.core.SevPatchesLoadingPlugin'
}

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'

jvmArg '-Dfml.coreMods.load=tv.darkosto.sevpatches.core.SevPatchesLoadingPlugin'
}
}
}

repositories {

}

dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2854'
}

// Example for how to get properties into the manifest for reading by the runtime..
jar {
manifest {
attributes([
"Specification-Title" : "examplemod",
"Specification-Vendor" : "examplemodsareus",
"Specification-Version" : "1", // We are version 1 of ourselves
"Implementation-Title" : project.name,
"Implementation-Version" : "${version}",
"Implementation-Vendor" : "examplemodsareus",
"Implementation-Timestamp" : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"FMLCorePluginContainsFMLMod": "true",
"FMLCorePlugin" : "tv.darkosto.sevpatches.core.SevPatchesLoadingPlugin"
])
}
}

// Example configuration to allow publishing using the maven-publish task
// This is the preferred method to reobfuscate your jar file
jar.finalizedBy('reobfJar')
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing
//publish.dependsOn('reobfJar')

publishing {
publications {
mavenJava(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file:///${project.projectDir}/mcmodsrepo"
}
}
}
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 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 added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
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 f160d84

Please sign in to comment.