Skip to content

Commit

Permalink
Merge pull request #261 from GrowthcraftCE/development
Browse files Browse the repository at this point in the history
4.1.0 Release
  • Loading branch information
Alatyami authored Aug 24, 2019
2 parents a2c0ebb + b7ab086 commit 3f6a78a
Show file tree
Hide file tree
Showing 114 changed files with 1,944 additions and 1,216 deletions.
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ language: java
sudo: false
jdk:
- openjdk8
dist: trusty

addons:
sonarcloud:
organization: "growthcraftce"
token:
secure: "0dff37f87344985cef77db78d7736b3792bfbdc1"

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand All @@ -10,6 +17,9 @@ cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.sonar/cache
- $HOME/.m2/repositor
- .gradle

before_install:
# ensure we have ruby
Expand All @@ -20,9 +30,12 @@ install: ./gradlew setupCIWorkspace -S

script:
- ./gradlew build
- sonar-scanner
- ls -la build/libs

# Deploy the artifacts back to GitHub
git:
depth: false

deploy:
provider: releases
api_key: $GITHUB_OAUTH
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Growthcraft
===========
[![](http://cf.way2muchnoise.eu/versions/growthcraft-community-edition_latest.svg)](https://minecraft.curseforge.com/projects/growthcraft-community-edition/)
[![Growthcraft Version](https://img.shields.io/badge/Growthcraft-4.0.5.200-orange.svg)](https://github.com/GrowthcraftCE/Growthcraft-1.12)
[![Growthcraft Version](https://img.shields.io/badge/Growthcraft-4.1.0-orange.svg)](https://github.com/GrowthcraftCE/Growthcraft-1.12)
[![Forge Version](https://img.shields.io/badge/Minecraft%20Forge-14.23.4.2768-yellow.svg)](http://files.minecraftforge.net/maven/net/minecraftforge/forge/index_1.12.2.html)
[![Java Version](https://img.shields.io/badge/JAVA-8-blue.svg)](https://www.java.com/en/)
[![Build Status](https://travis-ci.org/GrowthcraftCE/Growthcraft-1.12.svg?branch=development)](https://travis-ci.org/GrowthcraftCE/Growthcraft-1.12)
Expand Down
18 changes: 16 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,22 @@ buildscript {
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'gradle.plugin.com.matthewprenger:CurseGradle:1.0.7'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7'
}
}

apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'com.matthewprenger.cursegradle'
apply plugin: 'org.sonarqube'
//apply plugin: "checkstyle"

sonarqube {
properties {
property "sonar.projectName" , "Growthcraft-1.12"
property "sonar.projectKey", "growthcraft:Growthcraft-1.12"
}
}

repositories {
mavenLocal()
maven {
Expand Down Expand Up @@ -165,12 +174,17 @@ dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
// deobfCompile "com.pam.harvestcraft:harvestcraft:1.12a"
deobfCompile "mcjty.theoneprobe:TheOneProbe-1.12:" + project.property('theoneprobe_version')

deobfProvided "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version') + ":api"

compile "rustic:Rustic:" + project.property('rustic_version')
compile "thaumcraft:Thaumcraft:" + project.property('minecraft_version') + ":" + project.property('thaumcraft_version')
runtime "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version')
deobfProvided "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version') + ":api"
compile "mcp.mobius.waila:Hwyla:" + project.property('hwyla_version')
compile "baubles:Baubles:" + project.property('minecraft_version_short') + ":" + project.property('baubles_version')

runtime "mezz.jei:jei_" + project.property('minecraft_version') + ":" + project.property('jei_version')

//LOCAL compile "erebus:Erebus:1.0.22"
//LOCAL compile "com.github.glitchfiend.biomesoplenty:SereneSeasons:1.12.2-1.2.15.100:universal"

Expand Down
Binary file added design/cheese-curds-v4.xcf
Binary file not shown.
Binary file added design/cheese_casu_marzu.xcf
Binary file not shown.
Binary file added design/cheese_gouda.xcf
Binary file not shown.
Binary file added design/cheese_provolone.xcf
Binary file not shown.
7 changes: 3 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx3G
org.gradle.logging.level=warn

# Growthcraft Version
mod_version=4.0.5.200
mod_version=4.1.0

# Minecraft Versions
minecraft_version=1.12.2
Expand All @@ -14,11 +14,10 @@ minecraft_version_short=1.12
forge_version=14.23.5.2768
mappings=snapshot_20171003

# Dependency Versions
# Dependency and Integration Versions
baubles_version=1.5.2
jei_version=4.15.0.268
hwyla_version=1.8.26-B41_1.12.2
rustic_version=1.1.0
# https://minecraft.curseforge.com/projects/rustic/files?filter-game-version=2020709689%3A6756
thaumcraft_version=6.1.BETA26
# https://minecraft.curseforge.com/projects/thaumcraft/files?filter-game-version=2020709689%3A6756
theoneprobe_version=1.12-1.4.28-17
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Mon Aug 07 21:02:26 EDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-all.zip
78 changes: 43 additions & 35 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,25 +1,43 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand All @@ -30,6 +48,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
Expand All @@ -40,31 +59,11 @@ case "`uname`" in
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
Expand All @@ -90,7 +89,7 @@ location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
Expand All @@ -114,6 +113,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
exec "$JAVACMD" "$@"
14 changes: 4 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

Expand Down Expand Up @@ -46,10 +46,9 @@ echo location of your Java installation.
goto fail

:init
@rem Get command-line arguments, handling Windowz variants
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.projectName=Growthcraft-1.12
sonar.projectKey=growthcraft:Growthcraft-1.12
sonar.java.binaries=build/libs
sonar.java.libraries=build/libs
2 changes: 2 additions & 0 deletions src/main/java/growthcraft/bees/common/Init.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ public static void registerItemOres() {
OreDictionary.registerOre("materialBeeswaxBlack", BeesWaxTypes.BLACK.asStack());
OreDictionary.registerOre("materialBeeswaxRed", BeesWaxTypes.RED.asStack());
OreDictionary.registerOre("materialBeeswaxBlue", BeesWaxTypes.BLUE.asStack());
OreDictionary.registerOre("materialBeeswaxWhite", BeesWaxTypes.WHITE.asStack());
OreDictionary.registerOre("materialBeeswaxNormal", BeesWaxTypes.NORMAL.asStack());
// OreDictionary.registerOre("beeQueen", GrowthcraftBeesItems.bee.getItem());
OreDictionary.registerOre("materialWaxcomb", GrowthcraftBeesItems.honeyCombEmpty.getItem());
OreDictionary.registerOre("beecomb", GrowthcraftBeesItems.honeyCombEmpty.getItem());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package growthcraft.bees.common.crafting.recipe;

import com.google.gson.JsonObject;
import growthcraft.core.shared.GrowthcraftLogger;
import growthcraft.core.shared.Reference;
import growthcraft.core.shared.crafting.recipe.UtilRecipeParser;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.JsonUtils;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.common.crafting.IRecipeFactory;
import net.minecraftforge.common.crafting.JsonContext;
import net.minecraftforge.oredict.ShapelessOreRecipe;

import javax.annotation.Nullable;

public class ShapelessRecipeWithBucket extends ShapelessOreRecipe {

public ShapelessRecipeWithBucket(@Nullable final ResourceLocation group, final NonNullList<Ingredient> input, final ItemStack result) {
super(group, input, result);
}

@Override
public String getGroup() {
return group == null ? "" : group.toString();
}

public static class Factory implements IRecipeFactory {
@Override
public IRecipe parse(final JsonContext context, final JsonObject json) {
final String group = JsonUtils.getString(json, "group", "");
final NonNullList<Ingredient> ingredients = UtilRecipeParser.parseShapeless(context, json);
final ItemStack result = CraftingHelper.getItemStack(JsonUtils.getJsonObject(json, "result"), context);
GrowthcraftLogger.getLogger(Reference.MODID).debug("Loading recipe for " + result.getItem().getRegistryName());
return new ShapelessRecipeWithBucket(group.isEmpty() ? null : new ResourceLocation(group), ingredients, result);
}
}

}
Loading

0 comments on commit 3f6a78a

Please sign in to comment.