mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-15 01:35:08 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d486b30dff | ||
|
|
1b9212786f | ||
|
|
d8bf61a44e | ||
|
|
bce6c26704 | ||
|
|
a9eb396b7e | ||
|
|
92211ddbf4 | ||
|
|
3c6ab0e052 | ||
|
|
16793c2385 | ||
|
|
9c820bd038 | ||
|
|
f12a75a356 | ||
|
|
74d8810684 | ||
|
|
87ccfb36c4 | ||
|
|
765dade9bd | ||
|
|
b535a7ca46 | ||
|
|
0ff171ba5e | ||
|
|
7946203545 | ||
|
|
a2366fee20 | ||
|
|
aeb03873d8 | ||
|
|
25241cb7e9 | ||
|
|
97e808394f | ||
|
|
3de24b0647 | ||
|
|
cf518d19fb | ||
|
|
7a3ef5ecb2 | ||
|
|
14459ad991 | ||
|
|
2c6273c2d9 | ||
|
|
186a136d9d | ||
|
|
05b0532c05 | ||
|
|
045b228020 | ||
|
|
0a08927302 | ||
|
|
ab0122dda2 | ||
|
|
c0bba17d08 | ||
|
|
28869a08df | ||
|
|
ec2bb33ea0 | ||
|
|
008d290136 | ||
|
|
08404a3dd2 | ||
|
|
5378ff34bf | ||
|
|
33573ba463 | ||
|
|
84b120e89d | ||
|
|
add9f4685d | ||
|
|
75d745b7a0 | ||
|
|
e5bf29dd95 | ||
|
|
de5d902139 | ||
|
|
f3c4551f8a | ||
|
|
00dfeac8cb | ||
|
|
e443efcc5a | ||
|
|
f3c067f503 | ||
|
|
46567817e8 | ||
|
|
23742eab03 | ||
|
|
958a76247d | ||
|
|
31803aa092 | ||
|
|
766c0d5fd3 | ||
|
|
6a411bb607 | ||
|
|
0aa95b495a | ||
|
|
86274906eb | ||
|
|
fc7dc2c14d | ||
|
|
807a8e24ed | ||
|
|
2e74ed4645 | ||
|
|
ebdb282c6b | ||
|
|
d60f070e75 | ||
|
|
0b2e47d88d | ||
|
|
6be0719a9f | ||
|
|
e9ad1bda8e | ||
|
|
a15d297f8a | ||
|
|
2883900b1e | ||
|
|
0444201f7a | ||
|
|
3e9965b750 | ||
|
|
e8d843eb89 | ||
|
|
555f44889d | ||
|
|
4bca0f042d | ||
|
|
dc288141ac | ||
|
|
d26f4816e1 | ||
|
|
79b8e3e6a4 | ||
|
|
5e21a29d3f | ||
|
|
f6e2eec09c | ||
|
|
031b077a4b | ||
|
|
49f4c84b5d | ||
|
|
09b4d5a207 | ||
|
|
68f226e07e | ||
|
|
da6ea7048a | ||
|
|
d721a7e98f | ||
|
|
ce050eaa63 | ||
|
|
0133d143f8 | ||
|
|
7cc917ae76 | ||
|
|
6f1d00e4f5 | ||
|
|
2aa0b9bb8c | ||
|
|
d5d8885850 | ||
|
|
cb6cb3a01f | ||
|
|
cd5c2b3406 | ||
|
|
b1b06753ad | ||
|
|
5846f59d64 | ||
|
|
ec790c9333 | ||
|
|
784fa0ad30 | ||
|
|
3bd8c53273 | ||
|
|
bc10e65feb | ||
|
|
3eaf99a4d1 | ||
|
|
7910cff956 |
No files matched your search
@@ -4,6 +4,7 @@
|
||||
/run
|
||||
/eclipse
|
||||
/out
|
||||
/classes
|
||||
.idea
|
||||
*.iml
|
||||
*.ipr
|
||||
@@ -16,3 +17,4 @@
|
||||
/usernamecache.json
|
||||
|
||||
changelog.html
|
||||
*.bat
|
||||
@@ -1,13 +1,46 @@
|
||||
## Binnie mods
|
||||
[Binnie mods](https://minecraft.curseforge.com/projects/binnies-mods/files)
|
||||
====================================
|
||||
|
||||
This is an official fork of mod.
|
||||
All builds can be found on [Jenkins](https://ci.bymarcin.com/job/Binnie-Mods-MC1.7.10/)
|
||||
### What is it?
|
||||
Binnie’s Mods is a suite of mods designed to expand the [Forestry](https://github.com/ForestryMC/ForestryMC) mod.
|
||||
It both extends the bee and tree breeding aspect by adding many new species with varied products,
|
||||
along with new features such as fully breedable flowers and genetic manipulation.
|
||||
|
||||
### Homepage
|
||||
|
||||
[Wiki](https://binnie.mods.wiki/wiki/Main_Page)
|
||||
|
||||
[Latest Builds for 1.7.10](https://ci.bymarcin.com/job/Binnie-Mods-MC1.7.10/)
|
||||
|
||||
### Mods
|
||||
|
||||
[](https://binnie.mods.wiki/wiki/Extra_Bees)
|
||||
|
||||
Extra Bees expands upon the bee breeding of Forestry by adding 107 new bee species to forestry. These bees cover a large spectrum of different effects and products, giving you the ability to produce everything from dyes to rare metal dusts purely from bees. It also adds the Apiarist Database, a tool to keep track of discovered species, mutations and traits. There are also new alveary components which help improve and streamline bee production.
|
||||
|
||||
|
||||
[](https://binnie.mods.wiki/wiki/Extra_Trees)
|
||||
|
||||
Extra Trees both increases the number of tree species and adds many new aesthetic uses. There are 96 new tree species, such as Banana, Brazil nut and Douglas-fir. This comes with many new fruits as well as 35 new wooden planks. Extra Trees allows these, as well as Forestry and vanilla planks, to be combined to give doors, gates and various designs of fences. The woodworker allows planks to be combined to give patterned tiles, allowing you to build beautiful wooden floors, and the same can be done with stained glass. A group of machines such as the brewery and distillery allow you to use the fruits you grow to make a variety of wines, ciders and spirits.
|
||||
|
||||
|
||||
[](https://binnie.mods.wiki/wiki/Botany)
|
||||
|
||||
Botany adds an entirely new breeding system to Forestry: flowers. There are 46 different species that can be bred, including both vanilla flowers and new ones such as Fuschia and Lilies. The colour of the flowers can be transferred and selectively bred, meaning that each flower can be one of a possible 80 different colours. These new flowers can be bred manually in small gardens using a trowel and fertiliser, with careful care taken to maintain the desired pH or moisture, or grown on the large scale in Forestry farms.
|
||||
|
||||
[](https://binnie.mods.wiki/wiki/Genetics)
|
||||
|
||||
Genetics is for those who want to eschew conventional breeding, and want to enter the realm of genetic manipulation. Here, genes can be isolated, sequenced and then inoculated back into different species, making it easier to obtain the perfect genome. Bees, trees, butterflies and flowers can all be manipulated in this way. They can also be acclimatised to different environments to build tolerance to hostile climates.
|
||||
|
||||
[](https://binnie.mods.wiki/wiki/Binnie_Core)
|
||||
|
||||
Binnie Core is a mod which contains a lot of the core functionality such as networking and GUI's for the other mods. The only in game features it currently contains are the Compartments
|
||||
|
||||
### Warning
|
||||
|
||||
Removed unused (unfinished) items and blocks: Honey Crystal, Alcohol, etc.
|
||||
|
||||
#### Build
|
||||
### Building
|
||||
|
||||
The master branch will always contain the latest released version with possibly some bug fixes for that version that will eventually be released.
|
||||
New versions will be created in branched named like {mc_version}-{mod_version}
|
||||
|
||||
+28
-5
@@ -3,7 +3,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
url = "https://files.minecraftforge.net/maven"
|
||||
}
|
||||
maven {
|
||||
name = "sonatype"
|
||||
@@ -19,15 +19,18 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.matthewprenger.cursegradle" version "1.0.6"
|
||||
}
|
||||
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "2.0.17"
|
||||
version = "2.0.27"
|
||||
if (System.getenv("BUILD_NUMBER") != null) {
|
||||
version = version + "-" + System.getenv("BUILD_NUMBER")
|
||||
version = version + "." + System.getenv("BUILD_NUMBER")
|
||||
}
|
||||
group = "binnie" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "binnie-mods-1.7.10"
|
||||
archivesBaseName = "binnie-mods-1.7.10-gtnh"
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
@@ -64,5 +67,25 @@ task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask
|
||||
untaggedName = "Current release ${project.version}"
|
||||
fromCommit = "dbc5c1a564c39e4a9c042411d1bdbe450985ce2c"
|
||||
toRef = "HEAD"
|
||||
templateContent = file('changelog.mustache').getText('UTF-8');
|
||||
templateContent = file('changelog.mustache').getText('UTF-8')
|
||||
}
|
||||
|
||||
curseforge {
|
||||
apiKey = project.hasProperty('curseforge_apikey') ? project.curseforge_apikey : '0'
|
||||
project {
|
||||
id = '223525'
|
||||
changelog = file('changelog.html')
|
||||
changelogType = 'html'
|
||||
releaseType = 'release'
|
||||
relations {
|
||||
requiredLibrary 'forestry'
|
||||
incompatible 'binnie-fix'
|
||||
incompatible 'binniepatcher'
|
||||
incompatible 'more-binnie-fixes'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
tasks.curseforge223525.dependsOn.add(gitChangelogTask)
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+1
-2
@@ -1,6 +1,5 @@
|
||||
#Wed Jul 02 15:54:47 CDT 2014
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -6,47 +6,6 @@
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=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"
|
||||
@@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
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 () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
@@ -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
|
||||
@@ -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`
|
||||
@@ -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 "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# 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" "$@"
|
||||
Vendored
+84
-90
@@ -1,90 +1,84 @@
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@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 Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz 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.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
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
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
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
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -68,7 +68,7 @@ public class CircuitGarden extends BinnieCircuit {
|
||||
if (info.length() > 0) {
|
||||
info = " (" + info + EnumChatFormatting.RESET + ")";
|
||||
}
|
||||
addTooltipString("Flowers" + info);
|
||||
addTooltipString(I18N.localise("botany.circuit.flowers") + info);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -89,10 +89,28 @@ public class GardenLogic extends FarmLogic {
|
||||
return stack.getItem() == Item.getItemFromBlock(Blocks.dirt);
|
||||
}
|
||||
|
||||
private boolean maintainSoil(int x2, int y2, int z2, FarmDirection direction, int extent) {
|
||||
private boolean maintainSoil(int x, int y, int z, FarmDirection direction, int extent) {
|
||||
for (int i = 0; i < extent; ++i) {
|
||||
Vect position = translateWithOffset(x2, y2, z2, direction, i);
|
||||
if (fertilised && Gardening.isSoil(world.getBlock(position.x, position.y, position.z))) {
|
||||
Vect position = translateWithOffset(x, y, z, direction, i);
|
||||
boolean isSoil = Gardening.isSoil(world.getBlock(position.x, position.y, position.z));
|
||||
|
||||
// remove unnecessary blocks
|
||||
if (!isManual && !isSoil && !isAirBlock(position)) {
|
||||
Block block = world.getBlock(position.x, position.y, position.z);
|
||||
if (moisture == EnumMoisture.DAMP) {
|
||||
if (block != Blocks.water) {
|
||||
dropBlockAsProduction(position);
|
||||
}
|
||||
} else if (moisture == EnumMoisture.DRY) {
|
||||
if (block != Blocks.sand) {
|
||||
dropBlockAsProduction(position);
|
||||
}
|
||||
} else {
|
||||
dropBlockAsProduction(position);
|
||||
}
|
||||
}
|
||||
|
||||
if (fertilised && isSoil) {
|
||||
IBlockSoil soil = (IBlockSoil) world.getBlock(position.x, position.y, position.z);
|
||||
if (soil.fertilise(world, position.x, position.y, position.z, EnumSoilType.FLOWERBED)) {
|
||||
continue;
|
||||
@@ -101,55 +119,56 @@ public class GardenLogic extends FarmLogic {
|
||||
|
||||
if (world.getBlock(position.x, position.y + 1, position.z) == Botany.plant) {
|
||||
world.setBlockToAir(position.x, position.y + 1, position.z);
|
||||
} else {
|
||||
if (acidity != null && Gardening.isSoil(world.getBlock(position.x, position.y, position.z))) {
|
||||
IBlockSoil soil = (IBlockSoil) world.getBlock(position.x, position.y, position.z);
|
||||
EnumAcidity pH = soil.getPH(world, position.x, position.y, position.z);
|
||||
if (pH.ordinal() < acidity.ordinal()) {
|
||||
ItemStack stack = getAvailableAlkaline();
|
||||
if (stack != null && soil.setPH(world, position.x, position.y, position.z, EnumAcidity.values()[pH.ordinal() + 1])) {
|
||||
housing.getFarmInventory().removeResources(new ItemStack[]{stack});
|
||||
continue;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (pH.ordinal() > acidity.ordinal()) {
|
||||
ItemStack stack = getAvailableAcid();
|
||||
if (stack != null && soil.setPH(world, position.x, position.y, position.z, EnumAcidity.values()[pH.ordinal() - 1])) {
|
||||
housing.getFarmInventory().removeResources(new ItemStack[]{stack});
|
||||
continue;
|
||||
}
|
||||
if (acidity != null && isSoil) {
|
||||
IBlockSoil soil = (IBlockSoil) world.getBlock(position.x, position.y, position.z);
|
||||
EnumAcidity pH = soil.getPH(world, position.x, position.y, position.z);
|
||||
if (pH.ordinal() < acidity.ordinal()) {
|
||||
ItemStack stack = getAvailableAlkaline();
|
||||
if (stack != null && soil.setPH(world, position.x, position.y, position.z, EnumAcidity.values()[pH.ordinal() + 1])) {
|
||||
housing.getFarmInventory().removeResources(new ItemStack[]{stack});
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isAirBlock(position) && !world.getBlock(position.x, position.y, position.z).isReplaceable(world, position.x, position.y, position.z)) {
|
||||
ItemStack block = getAsItemStack(position);
|
||||
ItemStack loam = getAvailableLoam();
|
||||
if (isWaste(block) && loam != null) {
|
||||
produce.addAll(Blocks.dirt.getDrops(world, position.x, position.y, position.z, block.getItemDamage(), 0));
|
||||
setBlock(position, Blocks.air, 0);
|
||||
return trySetSoil(position, loam);
|
||||
if (pH.ordinal() > acidity.ordinal()) {
|
||||
ItemStack stack = getAvailableAcid();
|
||||
if (stack != null && soil.setPH(world, position.x, position.y, position.z, EnumAcidity.values()[pH.ordinal() - 1])) {
|
||||
housing.getFarmInventory().removeResources(new ItemStack[]{stack});
|
||||
continue;
|
||||
}
|
||||
} else if (!isManual) {
|
||||
if (!isWaterBlock(position)) {
|
||||
if (i % 2 == 0) {
|
||||
return trySetSoil(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FarmDirection cclock = FarmDirection.EAST;
|
||||
if (direction == FarmDirection.EAST) {
|
||||
cclock = FarmDirection.SOUTH;
|
||||
} else if (direction == FarmDirection.SOUTH) {
|
||||
cclock = FarmDirection.EAST;
|
||||
} else if (direction == FarmDirection.WEST) {
|
||||
cclock = FarmDirection.SOUTH;
|
||||
}
|
||||
if (!isAirBlock(position) && !world.getBlock(position.x, position.y, position.z).isReplaceable(world, position.x, position.y, position.z)) {
|
||||
ItemStack block = getAsItemStack(position);
|
||||
ItemStack loam = getAvailableLoam();
|
||||
if (isWaste(block) && loam != null) {
|
||||
produce.addAll(Blocks.dirt.getDrops(world, position.x, position.y, position.z, block.getItemDamage(), 0));
|
||||
setBlock(position, Blocks.air, 0);
|
||||
return trySetSoil(position, loam);
|
||||
}
|
||||
} else if (!isManual) {
|
||||
if (!isWaterBlock(position)) {
|
||||
if (i % 2 == 0) {
|
||||
return trySetSoil(position);
|
||||
}
|
||||
|
||||
Vect previous = translateWithOffset(position.x, position.y, position.z, cclock, 1);
|
||||
ItemStack soil2 = getAsItemStack(previous);
|
||||
if (!Gardening.isSoil(soil2.getItem())) {
|
||||
trySetSoil(position);
|
||||
}
|
||||
FarmDirection cclock = FarmDirection.EAST;
|
||||
if (direction == FarmDirection.EAST) {
|
||||
cclock = FarmDirection.SOUTH;
|
||||
} else if (direction == FarmDirection.SOUTH) {
|
||||
cclock = FarmDirection.EAST;
|
||||
} else if (direction == FarmDirection.WEST) {
|
||||
cclock = FarmDirection.SOUTH;
|
||||
}
|
||||
|
||||
Vect previous = translateWithOffset(position.x, position.y, position.z, cclock, 1);
|
||||
ItemStack soil2 = getAsItemStack(previous);
|
||||
if (!Gardening.isSoil(soil2.getItem())) {
|
||||
trySetSoil(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -278,10 +297,19 @@ public class GardenLogic extends FarmLogic {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void dropBlockAsProduction(Vect position) {
|
||||
ItemStack stack = new ItemStack(world.getBlock(position.x, position.y, position.z));
|
||||
if (stack.getItem() == null) {
|
||||
return;
|
||||
}
|
||||
produce.add(stack);
|
||||
world.setBlockToAir(position.x, position.y, position.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAcceptedGermling(ItemStack itemstack) {
|
||||
public boolean isAcceptedGermling(ItemStack stack) {
|
||||
for (IFarmable farmable : farmables) {
|
||||
if (farmable.isGermling(itemstack)) {
|
||||
if (farmable.isGermling(stack)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -340,7 +368,7 @@ public class GardenLogic extends FarmLogic {
|
||||
|
||||
try {
|
||||
IOwnable housing2 = (IOwnable) housing;
|
||||
GameProfile prof = (GameProfile) IOwnable.class.getMethod("getOwnerProfile", new Class[0]).invoke(housing2);
|
||||
GameProfile prof = (GameProfile) IOwnable.class.getMethod("getOwnerProfile", new Class[0]).invoke(housing2);
|
||||
((TileEntityFlower) tile).setOwner(prof);
|
||||
} catch (Exception ex) {
|
||||
// ignored
|
||||
|
||||
@@ -36,6 +36,12 @@ public class BlockFlower extends BlockContainer {
|
||||
setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, f * 3.0f, 0.5f + f);
|
||||
setTickRandomly(true);
|
||||
setBlockName("flower");
|
||||
setStepSound(Block.soundTypeGrass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
return "botany.flower";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -217,4 +223,10 @@ public class BlockFlower extends BlockContainer {
|
||||
}
|
||||
return hasBeenBroken;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int meta, int side) {
|
||||
return Blocks.yellow_flower.getIcon(0, 0);
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ public class ItemInsulatedTube extends Item {
|
||||
icons = new IIcon[3];
|
||||
setUnlocalizedName("insulatedTube");
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public static ItemStack getInsulateStack(ItemStack stack) {
|
||||
@@ -52,9 +53,9 @@ public class ItemInsulatedTube extends Item {
|
||||
if (pass == 0) {
|
||||
return 0xffffff;
|
||||
}
|
||||
return (pass == 1) ?
|
||||
Material.get(stack.getItemDamage()).getColor() :
|
||||
Insulate.get(stack.getItemDamage()).getColor();
|
||||
return (pass == 1)
|
||||
? Material.get(stack.getItemDamage()).getColor()
|
||||
: Insulate.get(stack.getItemDamage()).getColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,7 @@ public class BlockPlant extends BlockBush {
|
||||
setBlockName("plant");
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setTickRandomly(true);
|
||||
setStepSound(Block.soundTypeGrass);
|
||||
}
|
||||
|
||||
public static boolean isWeed(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ModuleGardening implements IInitializable {
|
||||
if (fertilised) {
|
||||
insulate += 3;
|
||||
}
|
||||
new CircuitGarden(moist, null, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 0 + 128 * insulate), icon);
|
||||
new CircuitGarden(moist, null, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 128 * insulate), icon);
|
||||
new CircuitGarden(moist, EnumAcidity.ACID, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 1 + 128 * insulate), icon);
|
||||
new CircuitGarden(moist, EnumAcidity.NEUTRAL, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 2 + 128 * insulate), icon);
|
||||
new CircuitGarden(moist, EnumAcidity.ALKALINE, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 3 + 128 * insulate), icon);
|
||||
@@ -132,6 +132,13 @@ public class ModuleGardening implements IInitializable {
|
||||
}
|
||||
}
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.soil, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.loam, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.flowerbed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.soilNoWeed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.loamNoWeed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.flowerbedNoWeed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
Botany.trowelWood,
|
||||
new Object[]{
|
||||
@@ -193,6 +200,7 @@ public class ModuleGardening implements IInitializable {
|
||||
new ItemStack(Items.wheat_seeds),
|
||||
new ItemStack(Items.wheat_seeds)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(BotanyItems.AshPowder.get(4), Mods.forestry.stack("ash"));
|
||||
GameRegistry.addShapelessRecipe(BotanyItems.MulchPowder.get(4), Mods.forestry.stack("mulch"));
|
||||
GameRegistry.addShapelessRecipe(BotanyItems.CompostPowder.get(4), Mods.forestry.stack("fertilizerBio"));
|
||||
@@ -202,6 +210,7 @@ public class ModuleGardening implements IInitializable {
|
||||
BotanyItems.SulphurPowder.get(4),
|
||||
new Object[]{"dustSulphur"}
|
||||
));
|
||||
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(
|
||||
new ItemStack(Botany.pigment, 2, EnumFlowerColor.BLACK.ordinal()),
|
||||
new Object[]{
|
||||
@@ -210,6 +219,7 @@ public class ModuleGardening implements IInitializable {
|
||||
"dyeBlack"
|
||||
}
|
||||
));
|
||||
|
||||
ModuleGardening.queuedAcidFertilisers.put(BotanyItems.SulphurPowder.get(1), 1);
|
||||
ModuleGardening.queuedAcidFertilisers.put(BotanyItems.MulchPowder.get(1), 1);
|
||||
ModuleGardening.queuedAcidFertilisers.put(new ItemStack(GameRegistry.findItem("Forestry", "mulch")), 2);
|
||||
@@ -245,6 +255,7 @@ public class ModuleGardening implements IInitializable {
|
||||
'c', Items.clay_ball,
|
||||
'g', Blocks.gravel
|
||||
);
|
||||
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
ItemStack clay = new ItemStack(Botany.clay, 1, c.ordinal());
|
||||
ItemStack pigment = new ItemStack(Botany.pigment, 1, c.ordinal());
|
||||
@@ -252,8 +263,14 @@ public class ModuleGardening implements IInitializable {
|
||||
GameRegistry.addSmelting(clay, TileEntityMetadata.getItemStack(Botany.ceramic, c.ordinal()), 0.0f);
|
||||
ItemStack glass = TileEntityMetadata.getItemStack(Botany.stained, c.ordinal());
|
||||
glass.stackSize = 4;
|
||||
GameRegistry.addShapedRecipe(glass, " g ", "gpg", " g ", 'g', Blocks.glass, 'p', pigment);
|
||||
GameRegistry.addShapedRecipe(
|
||||
glass,
|
||||
" g ", "gpg", " g ",
|
||||
'g', Blocks.glass,
|
||||
'p', pigment
|
||||
);
|
||||
}
|
||||
|
||||
GameRegistry.addRecipe(new PigmentRecipe());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import binnie.core.block.MultipassBlockRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.craftgui.minecraft.ModuleCraftGUI;
|
||||
@@ -24,6 +23,7 @@ import binnie.core.network.IPacketID;
|
||||
import binnie.core.proxy.BinnieProxy;
|
||||
import binnie.core.proxy.IBinnieProxy;
|
||||
import binnie.core.triggers.ModuleTrigger;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
|
||||
@@ -74,12 +74,8 @@ public class TileEntityMetadata extends TileEntity {
|
||||
}
|
||||
|
||||
public static ItemStack getItemStack(Block block, int damage) {
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
tag.setInteger("meta", damage);
|
||||
|
||||
ItemStack item = new ItemStack(block, 1, 0);
|
||||
item.setItemDamage((damage < 16387) ? damage : 16387);
|
||||
item.setTagCompound(tag);
|
||||
item.setItemDamage(Math.min(damage, 16387));
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
@@ -305,7 +305,7 @@ public class Widget implements IWidget {
|
||||
}
|
||||
|
||||
onUpdateClient();
|
||||
List<IWidget> deletedWidgets = new ArrayList<IWidget>();
|
||||
List<IWidget> deletedWidgets = new ArrayList<>();
|
||||
for (IWidget widget : getWidgets()) {
|
||||
if (widget.hasAttribute(WidgetAttribute.NEEDS_DELETION)) {
|
||||
deletedWidgets.add(widget);
|
||||
|
||||
@@ -213,6 +213,10 @@ public class WindowFieldKit extends Window {
|
||||
super.onWindowInventoryChanged();
|
||||
if (isServer()) {
|
||||
ItemStack kit = getPlayer().getHeldItem();
|
||||
if(kit == null || !kit.getItem().equals(BinnieCore.fieldKit)) {
|
||||
return;
|
||||
}
|
||||
|
||||
int sheets = 64 - kit.getItemDamage();
|
||||
int size = (getWindowInventory().getStackInSlot(1) == null) ? 0 : getWindowInventory().getStackInSlot(1).stackSize;
|
||||
if (sheets != size) {
|
||||
@@ -274,7 +278,12 @@ public class WindowFieldKit extends Window {
|
||||
return;
|
||||
}
|
||||
|
||||
getWindowInventory().setInventorySlotContents(0, Analyser.analyse(getWindowInventory().getStackInSlot(0)));
|
||||
ItemStack stack = getWindowInventory().getStackInSlot(0);
|
||||
if (stack == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
getWindowInventory().setInventorySlotContents(0, Analyser.analyse(stack));
|
||||
getWindowInventory().decrStackSize(1, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ControlListBox<T> extends ControlScrollableContent<ControlList<T>>
|
||||
|
||||
@Override
|
||||
public void initialise() {
|
||||
setScrollableContent(new ControlList<T>(this, 1.0f, 1.0f, w() - 2.0f - scrollBarSize, h() - 2.0f));
|
||||
setScrollableContent(new ControlList<>(this, 1.0f, 1.0f, w() - 2.0f - scrollBarSize, h() - 2.0f));
|
||||
addEventHandler(new EventKey.Down.Handler() {
|
||||
@Override
|
||||
public void onEvent(EventKey.Down event) {
|
||||
|
||||
@@ -93,11 +93,8 @@ public class ControlDatabaseIndividualDisplay extends ControlItemDisplay impleme
|
||||
|
||||
switch (discovered) {
|
||||
case SHOW:
|
||||
tooltip.add(species.getName());
|
||||
break;
|
||||
|
||||
case DISCOVERED:
|
||||
tooltip.add(I18N.localise("binniecore.gui.database.discovered.discovered"));
|
||||
tooltip.add(species.getName());
|
||||
break;
|
||||
|
||||
case UNDISCOVERED:
|
||||
|
||||
@@ -31,11 +31,11 @@ public class PageBreeder extends ControlPage<DatabaseTab> {
|
||||
);
|
||||
new ControlTextCentered(this, 75.0f, I18N.localise("binniecore.gui.database.species.count", system.discoveredSpeciesCount, system.totalSpeciesCount));
|
||||
new ControlBreedingProgress(this, 20, 87, 102, 14, system, system.discoveredSpeciesPercentage);
|
||||
new ControlTextCentered(this, 75.0f, I18N.localise("binniecore.gui.database.branch.count", system.discoveredBranchCount, system.totalBranchCount));
|
||||
new ControlTextCentered(this, 115.0f, I18N.localise("binniecore.gui.database.branch.count", system.discoveredBranchCount, system.totalBranchCount));
|
||||
new ControlBreedingProgress(this, 20, 127, 102, 14, system, system.discoveredBranchPercentage);
|
||||
|
||||
if (system.discoveredSecretCount > 0) {
|
||||
new ControlTextCentered(this, 75.0f, I18N.localise("binniecore.gui.database.species.secretCount", system.discoveredSecretCount, system.totalSecretCount));
|
||||
new ControlTextCentered(this, 155.0f, I18N.localise("binniecore.gui.database.species.secretCount", system.discoveredSecretCount, system.totalSecretCount));
|
||||
}
|
||||
|
||||
new ControlTextCentered(this, 32.0f, player.getName());
|
||||
|
||||
@@ -119,7 +119,7 @@ public abstract class WindowAbstractDatabase extends Window {
|
||||
widgets.listBox.setValidator(new IValidator<IWidget>() {
|
||||
@Override
|
||||
public boolean isValid(IWidget object) {
|
||||
return event.getValue() == "" || ((ControlTextOption) object).getText().toLowerCase().contains(event.getValue().toLowerCase());
|
||||
return event.getValue().isEmpty() || ((ControlTextOption) object).getText().toLowerCase().contains(event.getValue().toLowerCase());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -393,9 +393,9 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
if (rotating) {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GuiScreen.itemRender.renderItemOverlayIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y(), null);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GuiScreen.itemRender.renderItemOverlayIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y(), null);
|
||||
GL11.glClear(256);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class ListMap<T> implements List<T> {
|
||||
private LinkedHashMap<Integer, T> map;
|
||||
|
||||
ListMap() {
|
||||
map = new LinkedHashMap<Integer, T>();
|
||||
map = new LinkedHashMap<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -92,7 +92,7 @@ public class CraftGUIResourceManager implements IResourceManagerReloadListener {
|
||||
throw new RuntimeException("Parameter must have between one and four numbers");
|
||||
}
|
||||
|
||||
List<Float> f = new ArrayList<Float>();
|
||||
List<Float> f = new ArrayList<>();
|
||||
for (String string : split) {
|
||||
f.add(Float.parseFloat(string));
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public class CraftGUIResourceManager implements IResourceManagerReloadListener {
|
||||
if (split.length < 1 || split.length > 4) {
|
||||
throw new RuntimeException("Parameter must have between one and four numbers");
|
||||
}
|
||||
List<Float> f = new ArrayList<Float>();
|
||||
List<Float> f = new ArrayList<>();
|
||||
for (String string : split) {
|
||||
f.add(Float.parseFloat(string));
|
||||
}
|
||||
|
||||
@@ -207,10 +207,10 @@ public class ManagerGenetics extends ManagerBase {
|
||||
throw new NullPointerException("Allele is null!");
|
||||
}
|
||||
if (o1 instanceof IAlleleFloat && o2 instanceof IAlleleFloat) {
|
||||
return Float.valueOf(((IAlleleFloat) o1).getValue()).compareTo(Float.valueOf(((IAlleleFloat) o2).getValue()));
|
||||
return Float.valueOf(((IAlleleFloat) o1).getValue()).compareTo(((IAlleleFloat) o2).getValue());
|
||||
}
|
||||
if (o1 instanceof IAlleleInteger && o2 instanceof IAlleleInteger && !(o1 instanceof AlleleColor)) {
|
||||
return Integer.valueOf(((IAlleleInteger) o1).getValue()).compareTo(Integer.valueOf(((IAlleleInteger) o2).getValue()));
|
||||
return Integer.valueOf(((IAlleleInteger) o1).getValue()).compareTo(((IAlleleInteger) o2).getValue());
|
||||
}
|
||||
if (o1.getName() != null && o2.getName() != null) {
|
||||
return o1.getName().compareTo(o2.getName());
|
||||
|
||||
@@ -226,7 +226,7 @@ public class TreeBreedingSystem extends BreedingSystem {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
Collection<IAlleleSpecies> set = nei ? getAllSpecies() : getDiscoveredSpecies(world, player);
|
||||
List<IAlleleSpecies> found = new ArrayList<IAlleleSpecies>();
|
||||
List<IAlleleSpecies> found = new ArrayList<>();
|
||||
for (IAlleleSpecies species : set) {
|
||||
IAlleleTreeSpecies tSpecies = (IAlleleTreeSpecies) species;
|
||||
ITreeGenome genome = TreeManager.treeRoot.templateAsGenome(TreeManager.treeRoot.getTemplate(tSpecies.getUID()));
|
||||
|
||||
@@ -3,11 +3,11 @@ package binnie.core.item;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.flower.TileEntityFlower;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import binnie.botany.network.PacketID;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.IInitializable;
|
||||
import binnie.core.network.packet.MessageNBT;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
@@ -24,13 +24,16 @@ public class MachineComponent implements INBTTagable {
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public Class[] getComponentInterfaces() {
|
||||
@@ -38,6 +41,7 @@ public class MachineComponent implements INBTTagable {
|
||||
}
|
||||
|
||||
public void onInventoryUpdate() {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public MachinePayload getPayload() {
|
||||
|
||||
@@ -164,9 +164,9 @@ public class MachineUtil {
|
||||
return machine.getInterface(IProcess.class);
|
||||
}
|
||||
|
||||
public List<ItemStack> getNonNullStacks(int[] slotAcclimatiser) {
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
for (ItemStack stack : getStacks(slotAcclimatiser)) {
|
||||
public List<ItemStack> getNonNullStacks(int[] slot) {
|
||||
List<ItemStack> stacks = new ArrayList<>();
|
||||
for (ItemStack stack : getStacks(slot)) {
|
||||
if (stack != null) {
|
||||
stacks.add(stack);
|
||||
}
|
||||
|
||||
@@ -46,8 +46,8 @@ public class ManagerMachine extends ManagerBase {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<Class<?>> interfaces = new HashSet<Class<?>>();
|
||||
for (Class<?> currentClass = component; currentClass != null; currentClass = null) {
|
||||
Set<Class<?>> interfaces = new HashSet<>();
|
||||
for (Class<?> currentClass = component; currentClass != null; currentClass = currentClass.getSuperclass()) {
|
||||
Collections.addAll(interfaces, currentClass.getInterfaces());
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class SidedAccess {
|
||||
}
|
||||
|
||||
public AccessDirection getAccess(ForgeDirection side) {
|
||||
return accesses.containsKey(side) ? accesses.get(side) : base;
|
||||
return accesses.getOrDefault(side, base);
|
||||
}
|
||||
|
||||
public boolean canInsert(ForgeDirection side) {
|
||||
|
||||
@@ -25,10 +25,10 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
|
||||
|
||||
public ComponentProcessIndefinate(IMachine machine, float energyPerTick) {
|
||||
super(machine);
|
||||
this.energyPerTick = energyPerTick;
|
||||
actionPauseProcess = 0.0f;
|
||||
actionCancelTask = 0.0f;
|
||||
clientEnergyPerSecond = 0;
|
||||
this.energyPerTick = energyPerTick;
|
||||
}
|
||||
|
||||
protected IPoweredMachine getPower() {
|
||||
@@ -52,6 +52,7 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
|
||||
} else if (isInProgress()) {
|
||||
onCancelTask();
|
||||
}
|
||||
|
||||
if (actionPauseProcess > 0.0f) {
|
||||
actionPauseProcess--;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -142,7 +141,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
@Override
|
||||
public void onEvent(EventValueChanged event) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
int i = ((Integer) event.getValue()).intValue();
|
||||
int i = (Integer) event.getValue();
|
||||
nbt.setByte("i", (byte) i);
|
||||
Window.get(tab).sendClientAction("tab-change", nbt);
|
||||
currentTab = i;
|
||||
@@ -150,10 +149,10 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
}.setOrigin(EventHandler.Origin.DirectChild, tab));
|
||||
x += 24;
|
||||
|
||||
ControlPages<Integer> compartmentPages = new ControlPages<Integer>(controlCompartment, 24.0f, 0.0f, compartmentPageWidth, compartmentPageHeight);
|
||||
ControlPages<Integer> compartmentPages = new ControlPages<>(controlCompartment, 24.0f, 0.0f, compartmentPageWidth, compartmentPageHeight);
|
||||
ControlPage[] page = new ControlPage[inv.getTabNumber()];
|
||||
for (int p = 0; p < inv.getTabNumber(); ++p) {
|
||||
page[p] = new ControlPage(compartmentPages, Integer.valueOf(p));
|
||||
page[p] = new ControlPage(compartmentPages, p);
|
||||
}
|
||||
CraftGUIUtil.linkWidgets(tab, compartmentPages);
|
||||
int i = 0;
|
||||
@@ -210,7 +209,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
@Override
|
||||
public void onEvent(EventValueChanged event) {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
int i = ((Integer) event.getValue()).intValue();
|
||||
int i = (Integer) event.getValue();
|
||||
nbt.setByte("i", (byte) i);
|
||||
Window.get(tab).sendClientAction("tab-change", nbt);
|
||||
currentTab = i;
|
||||
@@ -374,7 +373,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
|
||||
if (sortByName) {
|
||||
List<Entry<Integer, String>> list = new LinkedList(slotIds.entrySet());
|
||||
Collections.sort(list, new Comparator<Entry<Integer, String>>() {
|
||||
list.sort(new Comparator<Entry<Integer, String>>() {
|
||||
@Override
|
||||
public int compare(Entry<Integer, String> o1, Entry<Integer, String> o2) {
|
||||
return -o2.getValue().compareTo(o1.getValue());
|
||||
|
||||
@@ -32,30 +32,32 @@ public enum BinnieCorePacketID implements IPacketID {
|
||||
((INetworkedEntity) tile).readFromPacket(packet.payload);
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.TileMetadata) {
|
||||
MessageMetadata packet2 = new MessageMetadata(message);
|
||||
TileEntity tile = packet2.getTileEntity(BinnieCore.proxy.getWorld());
|
||||
MessageMetadata packet = new MessageMetadata(message);
|
||||
TileEntity tile = packet.getTileEntity(BinnieCore.proxy.getWorld());
|
||||
if (tile instanceof TileEntityMetadata) {
|
||||
((TileEntityMetadata) tile).setTileMetadata(packet2.meta, true);
|
||||
((TileEntityMetadata) tile).setTileMetadata(packet.meta, true);
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.CraftGUIAction && context.side == Side.CLIENT) {
|
||||
MessageCraftGUI packet3 = new MessageCraftGUI(message);
|
||||
EntityPlayer player = BinnieCore.proxy.getPlayer();
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet3.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.CLIENT, player, packet3.getTagCompound());
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.CraftGUIAction && context.side == Side.SERVER && context.netHandler instanceof NetHandlerPlayServer) {
|
||||
MessageCraftGUI packet3 = new MessageCraftGUI(message);
|
||||
EntityPlayer player = ((NetHandlerPlayServer) context.netHandler).playerEntity;
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet3.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.SERVER, player, packet3.getTagCompound());
|
||||
} else if (this == BinnieCorePacketID.CraftGUIAction) {
|
||||
if (context.side == Side.CLIENT) {
|
||||
MessageCraftGUI packet = new MessageCraftGUI(message);
|
||||
EntityPlayer player = BinnieCore.proxy.getPlayer();
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.CLIENT, player, packet.getTagCompound());
|
||||
}
|
||||
} else if (context.netHandler instanceof NetHandlerPlayServer) {
|
||||
MessageCraftGUI packet = new MessageCraftGUI(message);
|
||||
EntityPlayer player = ((NetHandlerPlayServer) context.netHandler).playerEntity;
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.SERVER, player, packet.getTagCompound());
|
||||
}
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.TileDescriptionSync && context.side == Side.CLIENT) {
|
||||
MessageTileNBT packet4 = new MessageTileNBT(message);
|
||||
TileEntity tile = packet4.getTarget(BinnieCore.proxy.getWorld());
|
||||
if (tile != null && packet4.getTagCompound() != null) {
|
||||
MessageTileNBT packet = new MessageTileNBT(message);
|
||||
TileEntity tile = packet.getTarget(BinnieCore.proxy.getWorld());
|
||||
if (tile != null && packet.getTagCompound() != null) {
|
||||
IMachine machine = Machine.getMachine(tile);
|
||||
if (machine != null && machine instanceof INetwork.TilePacketSync) {
|
||||
((INetwork.TilePacketSync) machine).syncFromNBT(packet4.getTagCompound());
|
||||
((INetwork.TilePacketSync) machine).syncFromNBT(packet.getTagCompound());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,11 +69,6 @@ public class ComponentBeeModifier extends MachineComponent implements IBeeModifi
|
||||
// ignored
|
||||
}
|
||||
|
||||
// TODO unused method?
|
||||
public void onPostQueenDeath(IBee queen) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
// TODO unused method?
|
||||
public boolean onEggLaid(IBee queen) {
|
||||
return false;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ItemHiveFrame extends Item implements IHiveFrame, IBeeModifier {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack par1ItemStack) {
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return frame.getName();
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,6 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements
|
||||
public void onMachineBroken() {
|
||||
min = null;
|
||||
max = null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -93,13 +92,11 @@ public class TileExtraBeeAlveary extends TileEntityMachine implements
|
||||
@Override
|
||||
public void updateClient(int arg0) {
|
||||
super.updateEntity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateServer(int arg0) {
|
||||
super.updateEntity();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,6 +18,6 @@ public class FrameSlotValidator extends SlotValidator {
|
||||
|
||||
@Override
|
||||
public String getTooltip() {
|
||||
return I18N.localise("extrabees.achine.alveay.frame.tooltip");
|
||||
return I18N.localise("extrabees.machine.alveay.frame.tooltip");
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package binnie.extrabees.apiary.machine.mutator;
|
||||
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.extrabees.apiary.ComponentBeeModifier;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeListener;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
@@ -23,7 +22,7 @@ public class MutatorModifierComponent extends ComponentBeeModifier implements IB
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPostQueenDeath(IBee queen) {
|
||||
public void onQueenDeath() {
|
||||
getUtil().decreaseStack(AlvearyMutator.SLOT_MUTATOR, 1);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class TransmissionModifierComponent extends ComponentBeeModifier implemen
|
||||
}
|
||||
|
||||
TileExtraBeeAlveary tile = (TileExtraBeeAlveary) getMachine().getTileEntity();
|
||||
List<IEnergyHandler> handlers = new ArrayList<IEnergyHandler>();
|
||||
List<IEnergyHandler> handlers = new ArrayList<>();
|
||||
for (TileEntity alvearyTile : tile.getAlvearyBlocks()) {
|
||||
if (alvearyTile instanceof IEnergyHandler && alvearyTile != tile) {
|
||||
handlers.add((IEnergyHandler) alvearyTile);
|
||||
|
||||
@@ -71,7 +71,7 @@ public enum ExtraBeesFlowers implements IFlowerProvider, IAlleleFlowers, IChromo
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return I18N.localise("extrabees.flowers." + name().toString().toLowerCase() + ".name");
|
||||
return I18N.localise("extrabees.flowers." + name().toLowerCase() + ".name");
|
||||
}
|
||||
|
||||
public void register() {
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package binnie.extrabees.products;
|
||||
|
||||
import binnie.core.IInitializable;
|
||||
import binnie.core.Mods;
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class ModuleProducts implements IInitializable {
|
||||
|
||||
@@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
public class HiveDrop implements IHiveDrop {
|
||||
private IAllele[] template;
|
||||
@@ -27,9 +28,7 @@ public class HiveDrop implements IHiveDrop {
|
||||
}
|
||||
this.template = template;
|
||||
this.chance = chance;
|
||||
for (ItemStack stack : bonus) {
|
||||
additional.add(stack);
|
||||
}
|
||||
Collections.addAll(additional, bonus);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,7 +47,7 @@ public class HiveDrop implements IHiveDrop {
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getAdditional(World world, int x, int y, int z, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
ArrayList<ItemStack> ret = new ArrayList<>();
|
||||
for (ItemStack stack : additional) {
|
||||
ret.add(stack.copy());
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ public class ExtraTrees extends AbstractMod {
|
||||
public static Block blockLog;
|
||||
public static BlockCarpentry blockCarpentry;
|
||||
public static Block blockPlanks;
|
||||
public static Block blockShrubLeaves;
|
||||
public static Block blockMachine;
|
||||
public static Block blockFence;
|
||||
public static BlockCarpentry blockPanel;
|
||||
public static Block blockKitchen;
|
||||
public static Block blockSlab;
|
||||
public static Block blockDoubleSlab;
|
||||
public static Item itemHammer;
|
||||
|
||||
@@ -128,7 +128,11 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise("extratrees.block.log.name", ILogType.ExtraTreeLog.values()[meta].getName());
|
||||
ILogType.ExtraTreeLog[] logs= ILogType.ExtraTreeLog.values();
|
||||
if(meta < 0 || meta >= logs.length) {
|
||||
meta = 0;
|
||||
}
|
||||
return I18N.localise("extratrees.block.log.name", logs[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import forestry.arboriculture.blocks.BlockForestryLeaves;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockShrubLeaves extends BlockForestryLeaves {
|
||||
public BlockShrubLeaves() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beginLeavesDecay(World world, int x, int y, int z) {
|
||||
// ignored, no able decay
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import forestry.api.arboriculture.EnumWoodType;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.arboriculture.worldgen.BlockTypeLog;
|
||||
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.api.IDesignMaterial;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.arboriculture.EnumWoodType;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.arboriculture.worldgen.BlockTypeLog;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public interface ILogType {
|
||||
void placeBlock(World p0, int p1, int p2, int p3);
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.world.World;
|
||||
public class ItemETDoor extends ItemMetadata {
|
||||
public ItemETDoor(Block block) {
|
||||
super(block);
|
||||
maxStackSize = 1;
|
||||
maxStackSize = 8;
|
||||
setCreativeTab(CreativeTabs.tabRedstone);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,12 +40,14 @@ public class ModuleBlocks implements IInitializable {
|
||||
ExtraTrees.blockPlanks = new BlockETPlanks();
|
||||
ExtraTrees.blockFence = new BlockFence();
|
||||
ExtraTrees.blockLog = new BlockETLog();
|
||||
ExtraTrees.blockShrubLeaves = new BlockShrubLeaves();
|
||||
ExtraTrees.blockGate = new BlockGate();
|
||||
ExtraTrees.blockDoor = new BlockETDoor();
|
||||
ExtraTrees.blockMultiFence = new BlockMultiFence();
|
||||
ExtraTrees.blockSlab = new BlockETSlab(false);
|
||||
ExtraTrees.blockDoubleSlab = new BlockETSlab(true);
|
||||
ExtraTrees.blockStairs = new BlockETStairs(ExtraTrees.blockPlanks);
|
||||
|
||||
GameRegistry.registerBlock(ExtraTrees.blockPlanks, ItemMetadata.class, "planks");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockFence, ItemMetadata.class, "fence");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockMultiFence, ItemMetadata.class, "multifence");
|
||||
@@ -56,6 +58,7 @@ public class ModuleBlocks implements IInitializable {
|
||||
GameRegistry.registerBlock(ExtraTrees.blockDoubleSlab, ItemETSlab.class, "doubleSlab");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockDoor, ItemETDoor.class, "door");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockStairs, ItemETStairs.class, "stairs");
|
||||
|
||||
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockStairs), new StairItemRenderer());
|
||||
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockGate), new GateItemRenderer());
|
||||
for (ILogType plank : ILogType.ExtraTreeLog.values()) {
|
||||
|
||||
@@ -31,41 +31,41 @@ public class PlankType {
|
||||
}
|
||||
|
||||
public enum ExtraTreePlanks implements IPlankType, IFenceProvider {
|
||||
Fir(12815444),
|
||||
Cedar(14181940),
|
||||
Hemlock(13088108),
|
||||
Cypress(16169052),
|
||||
Fig(13142058),
|
||||
Beech(14784849),
|
||||
Alder(12092755),
|
||||
Hazel(13480341),
|
||||
Hornbeam(12818528),
|
||||
Box(16511430),
|
||||
Butternut(15510138),
|
||||
Hickory(14333070),
|
||||
Whitebeam(13222585),
|
||||
Elm(15772004),
|
||||
Apple(6305064),
|
||||
Yew(14722426),
|
||||
Pear(12093805),
|
||||
Hawthorn(13402978),
|
||||
Rowan(13610394),
|
||||
Elder(12489337),
|
||||
Maclura(15970862),
|
||||
Syzgium(15123393),
|
||||
Brazilwood(7487063),
|
||||
Logwood(10762028),
|
||||
Iroko(7681024),
|
||||
Locust(12816736),
|
||||
Eucalyptus(16165771),
|
||||
Purpleheart(5970991),
|
||||
Ash(16107368),
|
||||
Holly(16512743),
|
||||
Olive(11578760),
|
||||
Sweetgum(13997656),
|
||||
Rosewood(7738624),
|
||||
Gingko(16050106),
|
||||
PinkIvory(15502496);
|
||||
Fir(0xc38c54),
|
||||
Cedar(0xd86634),
|
||||
Hemlock(0xc7b56c),
|
||||
Cypress(0xf6b85c),
|
||||
Fig(0xc8882a),
|
||||
Beech(0xe19951),
|
||||
Alder(0xb88553),
|
||||
Hazel(0xcdb195),
|
||||
Hornbeam(0xc39860),
|
||||
Box(0xfbf1c6),
|
||||
Butternut(0xecaa7a),
|
||||
Hickory(0xdab48e),
|
||||
Whitebeam(0xc9c2b9),
|
||||
Elm(0xf0a964),
|
||||
Apple(0x603528),
|
||||
Yew(0xe0a57a),
|
||||
Pear(0xb8896d),
|
||||
Hawthorn(0xcc8362),
|
||||
Rowan(0xcfad9a),
|
||||
Elder(0xbe9279),
|
||||
Maclura(0xf3b22e),
|
||||
Syzgium(0xe6c3c1),
|
||||
Brazilwood(0x723e57),
|
||||
Logwood(0xa4372c),
|
||||
Iroko(0x753400),
|
||||
Locust(0xc39160),
|
||||
Eucalyptus(0xf6ab8b),
|
||||
Purpleheart(0x5b1c2f),
|
||||
Ash(0xf5c768),
|
||||
Holly(0xfbf6e7),
|
||||
Olive(0xb0ad88),
|
||||
Sweetgum(0xd59658),
|
||||
Rosewood(0x761500),
|
||||
Gingko(0xf4e7ba),
|
||||
PinkIvory(0xec8ca0);
|
||||
|
||||
protected int color;
|
||||
protected IIcon icon;
|
||||
@@ -109,7 +109,7 @@ public class PlankType {
|
||||
}
|
||||
}
|
||||
|
||||
public enum VanillaPlanks implements IPlankType {
|
||||
public enum VanillaPlanks implements IPlankType, IFenceProvider {
|
||||
OAK(0xb4905a),
|
||||
SPRUCE(0x805e36),
|
||||
BIRCH(0xd7c185),
|
||||
@@ -149,6 +149,11 @@ public class PlankType {
|
||||
Block block = Blocks.planks;
|
||||
return block.getIcon(2, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getFence() {
|
||||
return TileEntityMetadata.getItemStack(ExtraTrees.blockFence, WoodManager.getPlankTypeIndex(this));
|
||||
}
|
||||
}
|
||||
|
||||
public enum ForestryPlanks implements IPlankType, IFenceProvider {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extratrees.block.decor;
|
||||
|
||||
import binnie.core.Mods;
|
||||
import binnie.core.block.BlockMetadata;
|
||||
import binnie.core.block.IBlockMetadata;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
@@ -19,7 +18,6 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -41,20 +39,17 @@ public class BlockFence extends net.minecraft.block.BlockFence implements IBlock
|
||||
setStepSound(Block.soundTypeWood);
|
||||
}
|
||||
|
||||
public static boolean canConnect(Block block) {
|
||||
return block == ((ItemBlock) Mods.forestry.item("fences")).field_150939_a
|
||||
|| block == Blocks.fence
|
||||
|| block == Blocks.fence_gate
|
||||
|| block == Blocks.nether_brick_fence
|
||||
|| block instanceof IBlockFence
|
||||
|| block == ExtraTrees.blockGate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
for (IFenceProvider type : PlankType.ExtraTreePlanks.values()) {
|
||||
list.add(type.getFence());
|
||||
}
|
||||
|
||||
for (IFenceProvider type : PlankType.VanillaPlanks.values()) {
|
||||
if (type != PlankType.VanillaPlanks.OAK) {
|
||||
list.add(type.getFence());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,16 +135,10 @@ public class BlockFence extends net.minecraft.block.BlockFence implements IBlock
|
||||
|
||||
@Override
|
||||
public boolean canConnectFenceTo(IBlockAccess world, int x, int y, int z) {
|
||||
if (!isFence(world, x, y, z)) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
return block != null && block.getMaterial().isOpaque() && block.renderAsNormalBlock();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isFence(IBlockAccess world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
return canConnect(block);
|
||||
Material material = block.getMaterial();
|
||||
return IBlockFence.isFence(block) && material == this.blockMaterial
|
||||
|| material.isOpaque() && block.renderAsNormalBlock() && material != Material.gourd;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,10 +29,6 @@ public class BlockHedge extends Block implements IBlockFence {
|
||||
setBlockName("hedge");
|
||||
}
|
||||
|
||||
public static boolean func_149825_a(Block block) {
|
||||
return BlockFence.canConnect(block);
|
||||
}
|
||||
|
||||
public static int getColor(int meta) {
|
||||
LeafType type = LeafType.values()[meta % 6];
|
||||
if (type == LeafType.CONIFER) {
|
||||
@@ -130,11 +126,11 @@ public class BlockHedge extends Block implements IBlockFence {
|
||||
return ModuleBlocks.hedgeRenderID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectFenceTo(IBlockAccess world, int x, int y, int z) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
return block == this
|
||||
|| block == Blocks.fence_gate
|
||||
|| func_149825_a(block)
|
||||
|| IBlockFence.isFence(block)
|
||||
|| block.isLeaves(world, x, y, z)
|
||||
|| (block.getMaterial().isOpaque() && block.renderAsNormalBlock() && block.getMaterial() != Material.gourd);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class FenceType {
|
||||
}
|
||||
|
||||
public static Collection<FenceType> values() {
|
||||
List<FenceType> list = new ArrayList<FenceType>();
|
||||
List<FenceType> list = new ArrayList<>();
|
||||
for (int size = 0; size < 3; ++size) {
|
||||
for (boolean solid : new boolean[]{false, true}) {
|
||||
for (boolean embedded : new boolean[]{false, true}) {
|
||||
|
||||
@@ -1,4 +1,26 @@
|
||||
package binnie.extratrees.block.decor;
|
||||
|
||||
import binnie.core.Mods;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFence;
|
||||
import net.minecraft.block.BlockFenceGate;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public interface IBlockFence {
|
||||
|
||||
/**
|
||||
* Test if the specified block is a fence
|
||||
*
|
||||
* @param block the block to test
|
||||
* @return {@code true} if the specified block is a fence
|
||||
*/
|
||||
static boolean isFence(Block block) {
|
||||
return block == ((ItemBlock) Mods.forestry.item("fences")).field_150939_a
|
||||
|| block instanceof BlockFence && block != Blocks.nether_brick_fence
|
||||
|| block instanceof BlockFenceGate;
|
||||
}
|
||||
|
||||
boolean canConnectFenceTo(IBlockAccess world, int x, int y, int z);
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public class MultiFenceRecipeSize implements IRecipe {
|
||||
@Override
|
||||
public boolean matches(InventoryCrafting inv, World world) {
|
||||
StringBuilder pattern = new StringBuilder();
|
||||
List<IPlankType> types = new ArrayList<IPlankType>();
|
||||
List<IPlankType> types = new ArrayList<>();
|
||||
for (int i = 0; i < inv.getSizeInventory(); ++i) {
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
IPlankType type = (stack == null) ? null : WoodManager.get(stack);
|
||||
|
||||
@@ -60,7 +60,7 @@ public class NBTShapedRecipe implements IRecipe {
|
||||
for (int i2 = 0; i2 < j * k; ++i2) {
|
||||
char c0 = s.charAt(i2);
|
||||
if (hashmap.containsKey(c0)) {
|
||||
aitemstack[i2] = ((ItemStack) hashmap.get(Character.valueOf(c0))).copy();
|
||||
aitemstack[i2] = ((ItemStack) hashmap.get(c0)).copy();
|
||||
} else {
|
||||
aitemstack[i2] = null;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
|
||||
tooltip.add(I18N.localise(
|
||||
"extratrees.block.tooltip.twoColors",
|
||||
"extratrees.block.tooltip.twoMaterials",
|
||||
block.getPrimaryMaterial().getName(),
|
||||
block.getSecondaryMaterial().getName()
|
||||
));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package binnie.extratrees.carpentry;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -11,6 +12,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockStainedDesign extends BlockDesign {
|
||||
@@ -60,4 +62,18 @@ public class BlockStainedDesign extends BlockDesign {
|
||||
public String getBlockName(DesignBlock design) {
|
||||
return I18N.localise("extratrees.block.stainedglass.name", design.getDesign().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
|
||||
tooltip.add(I18N.localise(
|
||||
"extratrees.block.tooltip.twoColors",
|
||||
block.getPrimaryMaterial().getName(),
|
||||
block.getSecondaryMaterial().getName()
|
||||
));
|
||||
} else {
|
||||
tooltip.add(block.getPrimaryMaterial().getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class CarpentryInterface implements ICarpentryInterface {
|
||||
|
||||
@Override
|
||||
public Collection<IDesignCategory> getAllDesignCategories() {
|
||||
List<IDesignCategory> categories = new ArrayList<IDesignCategory>();
|
||||
List<IDesignCategory> categories = new ArrayList<>();
|
||||
for (IDesignCategory category : CarpentryInterface.designCategories.values()) {
|
||||
if (category.getDesigns().size() > 0) {
|
||||
categories.add(category);
|
||||
@@ -92,7 +92,7 @@ public class CarpentryInterface implements ICarpentryInterface {
|
||||
|
||||
@Override
|
||||
public List<IDesign> getSortedDesigns() {
|
||||
List<IDesign> designs = new ArrayList<IDesign>();
|
||||
List<IDesign> designs = new ArrayList<>();
|
||||
for (IDesignCategory category : getAllDesignCategories()) {
|
||||
designs.addAll(category.getDesigns());
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import binnie.core.craftgui.minecraft.control.ControlItemDisplay;
|
||||
import binnie.core.genetics.BreedingSystem;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.FakeWorld;
|
||||
import binnie.extratrees.craftgui.ControlBlockIconDisplay;
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleTreeSpecies;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
@@ -117,7 +116,7 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
new ControlText(contents, new IArea(0.0f, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.FERTILITY) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new IArea(w2, y, w3, th), genome.getFertility() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
List<ItemStack> fruits = new ArrayList<ItemStack>();
|
||||
List<ItemStack> fruits = new ArrayList<>();
|
||||
Collections.addAll(fruits, genome.getFruitProvider().getProducts());
|
||||
|
||||
if (!fruits.isEmpty()) {
|
||||
|
||||
@@ -313,7 +313,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return I18N.localise("extratrees.item.food." + name().toLowerCase());
|
||||
return "extratrees.item.food." + name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -375,7 +375,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
|
||||
float modeYieldMod = 1.0f;
|
||||
for (Map.Entry<ItemStack, Float> entry2 : products.entrySet()) {
|
||||
if (world.rand.nextFloat() <= genome.getYield() * modeYieldMod * entry2.getValue() * 5.0f * stage) {
|
||||
if (world.rand.nextFloat() <= genome.getYield() * modeYieldMod * entry2.getValue() * stage) {
|
||||
product2.add(entry2.getKey().copy());
|
||||
}
|
||||
}
|
||||
@@ -418,7 +418,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return getDescription();
|
||||
return I18N.localise("for." + getDescription());
|
||||
}
|
||||
|
||||
public String getNameOfFruit() {
|
||||
|
||||
@@ -6,28 +6,64 @@ import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.ILogType;
|
||||
import binnie.extratrees.worldgen.DefaultTreeGenerator;
|
||||
import binnie.extratrees.worldgen.WorldGenAlder;
|
||||
import binnie.extratrees.worldgen.WorldGenApple;
|
||||
import binnie.extratrees.worldgen.WorldGenAsh;
|
||||
import binnie.extratrees.worldgen.WorldGenAcornOak;
|
||||
import binnie.extratrees.worldgen.WorldGenAspen;
|
||||
import binnie.extratrees.worldgen.WorldGenBalsamFir;
|
||||
import binnie.extratrees.worldgen.WorldGenBanana;
|
||||
import binnie.extratrees.worldgen.WorldGenBeech;
|
||||
import binnie.extratrees.worldgen.WorldGenConifer;
|
||||
import binnie.extratrees.worldgen.WorldGenBox;
|
||||
import binnie.extratrees.worldgen.WorldGenBrazilNut;
|
||||
import binnie.extratrees.worldgen.WorldGenBrazilwood;
|
||||
import binnie.extratrees.worldgen.WorldGenButternut;
|
||||
import binnie.extratrees.worldgen.WorldGenCedar;
|
||||
import binnie.extratrees.worldgen.WorldGenClove;
|
||||
import binnie.extratrees.worldgen.WorldGenCoconut;
|
||||
import binnie.extratrees.worldgen.WorldGenCoffee;
|
||||
import binnie.extratrees.worldgen.WorldGenCommonAlder;
|
||||
import binnie.extratrees.worldgen.WorldGenCommonAsh;
|
||||
import binnie.extratrees.worldgen.WorldGenCommonBeech;
|
||||
import binnie.extratrees.worldgen.WorldGenCopperBeech;
|
||||
import binnie.extratrees.worldgen.WorldGenCypress;
|
||||
import binnie.extratrees.worldgen.WorldGenDefault;
|
||||
import binnie.extratrees.worldgen.WorldGenEucalyptus;
|
||||
import binnie.extratrees.worldgen.WorldGenFir;
|
||||
import binnie.extratrees.worldgen.WorldGenDouglasFir;
|
||||
import binnie.extratrees.worldgen.WorldGenElder;
|
||||
import binnie.extratrees.worldgen.WorldGenElm;
|
||||
import binnie.extratrees.worldgen.WorldGenFloweringCrabapple;
|
||||
import binnie.extratrees.worldgen.WorldGenGingko;
|
||||
import binnie.extratrees.worldgen.WorldGenHawthorn;
|
||||
import binnie.extratrees.worldgen.WorldGenHazel;
|
||||
import binnie.extratrees.worldgen.WorldGenHolly;
|
||||
import binnie.extratrees.worldgen.WorldGenJungle;
|
||||
import binnie.extratrees.worldgen.WorldGenHornbeam;
|
||||
import binnie.extratrees.worldgen.WorldGenIroko;
|
||||
import binnie.extratrees.worldgen.WorldGenLazy;
|
||||
import binnie.extratrees.worldgen.WorldGenMaple;
|
||||
import binnie.extratrees.worldgen.WorldGenPalm;
|
||||
import binnie.extratrees.worldgen.WorldGenPoplar;
|
||||
import binnie.extratrees.worldgen.WorldGenLoblollyPine;
|
||||
import binnie.extratrees.worldgen.WorldGenLocust;
|
||||
import binnie.extratrees.worldgen.WorldGenLogwood;
|
||||
import binnie.extratrees.worldgen.WorldGenMango;
|
||||
import binnie.extratrees.worldgen.WorldGenMonkeyPuzzle;
|
||||
import binnie.extratrees.worldgen.WorldGenOldFustic;
|
||||
import binnie.extratrees.worldgen.WorldGenOlive;
|
||||
import binnie.extratrees.worldgen.WorldGenOrchardApple;
|
||||
import binnie.extratrees.worldgen.WorldGenOsangeOsange;
|
||||
import binnie.extratrees.worldgen.WorldGenPear;
|
||||
import binnie.extratrees.worldgen.WorldGenPecan;
|
||||
import binnie.extratrees.worldgen.WorldGenPrairieCrabapple;
|
||||
import binnie.extratrees.worldgen.WorldGenPurpleheart;
|
||||
import binnie.extratrees.worldgen.WorldGenRainbowGum;
|
||||
import binnie.extratrees.worldgen.WorldGenRedMaple;
|
||||
import binnie.extratrees.worldgen.WorldGenRoseGum;
|
||||
import binnie.extratrees.worldgen.WorldGenRosewood;
|
||||
import binnie.extratrees.worldgen.WorldGenRowan;
|
||||
import binnie.extratrees.worldgen.WorldGenSallow;
|
||||
import binnie.extratrees.worldgen.WorldGenShrub;
|
||||
import binnie.extratrees.worldgen.WorldGenSorbus;
|
||||
import binnie.extratrees.worldgen.WorldGenSilverFir;
|
||||
import binnie.extratrees.worldgen.WorldGenSwampGum;
|
||||
import binnie.extratrees.worldgen.WorldGenSweetCrabapple;
|
||||
import binnie.extratrees.worldgen.WorldGenSweetgum;
|
||||
import binnie.extratrees.worldgen.WorldGenSycamore;
|
||||
import binnie.extratrees.worldgen.WorldGenTree;
|
||||
import binnie.extratrees.worldgen.WorldGenTree2;
|
||||
import binnie.extratrees.worldgen.WorldGenTree3;
|
||||
import binnie.extratrees.worldgen.WorldGenTropical;
|
||||
import binnie.extratrees.worldgen.WorldGenWalnut;
|
||||
import binnie.extratrees.worldgen.WorldGenWesternHemlock;
|
||||
import binnie.extratrees.worldgen.WorldGenWhitebeam;
|
||||
import binnie.extratrees.worldgen.WorldGenYew;
|
||||
import binnie.genetics.genetics.AlleleHelper;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -71,10 +107,10 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGermlingIconProvider {
|
||||
OrchardApple("malus", "domestica", 0x648830, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Apple, WorldGenApple.OrchardApple.class),
|
||||
SweetCrabapple("malus", "coronaria", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.SweetCrabapple.class),
|
||||
FloweringCrabapple("malus", "hopa", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.FloweringCrabapple.class),
|
||||
PrairieCrabapple("malus", "ioensis", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.PrairieCrabapple.class),
|
||||
OrchardApple("malus", "domestica", 0x648830, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Apple, WorldGenOrchardApple.class),
|
||||
SweetCrabapple("malus", "coronaria", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenSweetCrabapple.class),
|
||||
FloweringCrabapple("malus", "hopa", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenFloweringCrabapple.class),
|
||||
PrairieCrabapple("malus", "ioensis", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenPrairieCrabapple.class),
|
||||
Blackthorn("prunus", "spinosa ", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.Blackthorn),
|
||||
CherryPlum("prunus", "cerasifera", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.CherryPlum),
|
||||
Peach("prunus", "persica", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.Peach),
|
||||
@@ -99,75 +135,75 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
Banana("musa", "sinensis", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.Banana, WorldGenBanana.class),
|
||||
RedBanana("musa", "rubra", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.RedBanana, WorldGenBanana.class),
|
||||
Plantain("musa", "paradisiaca", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.Plantain, WorldGenBanana.class),
|
||||
Butternut("juglans", "cinerea", 0x82b58c, ILogType.ExtraTreeLog.Butternut, ExtraTreeFruitGene.Butternut, WorldGenWalnut.Butternut.class),
|
||||
Rowan("sorbus", "aucuparia", 0x9ec79b, ILogType.ExtraTreeLog.Rowan, null, WorldGenSorbus.Rowan.class),
|
||||
Hemlock("tsuga", "heterophylla", 0x5cac72, ILogType.ExtraTreeLog.Hemlock, null, WorldGenConifer.WesternHemlock.class),
|
||||
Ash("fraxinus", "excelsior", 0x488e2b, ILogType.ExtraTreeLog.Ash, null, WorldGenAsh.CommonAsh.class),
|
||||
Alder("alnus", "glutinosa", 0x698a33, ILogType.ExtraTreeLog.Alder, null, WorldGenAlder.CommonAlder.class),
|
||||
Beech("fagus", "sylvatica", 0x83a04c, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenBeech.CommonBeech.class),
|
||||
CopperBeech("fagus", "purpurea", 0x801318, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenBeech.CopperBeech.class),
|
||||
Aspen("populus", "tremula", 0x8acc37, ILogType.ForestryLog.POPLAR, null, WorldGenPoplar.Aspen.class),
|
||||
Yew("taxus", "baccata", 0x948a4d, ILogType.ExtraTreeLog.Yew, null, WorldGenConifer.Yew.class),
|
||||
Cypress("chamaecyparis", "lawsoniana", 0x89c9a7, ILogType.ExtraTreeLog.Cypress, null, WorldGenConifer.Cypress.class),
|
||||
DouglasFir("pseudotsuga", "menziesii", 0x99b582, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.DouglasFir.class),
|
||||
Hazel("Corylus", "avellana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenTree3.Hazel.class),
|
||||
Sycamore("ficus", "sycomorus", 0xa0a52f, ILogType.ExtraTreeLog.Fig, ExtraTreeFruitGene.Fig, WorldGenTree3.Sycamore.class),
|
||||
Whitebeam("sorbus", "aria", 0xbace99, ILogType.ExtraTreeLog.Whitebeam, null, WorldGenSorbus.Whitebeam.class),
|
||||
Hawthorn("crataegus", "monogyna", 0x6ba84a, ILogType.ExtraTreeLog.Hawthorn, null, WorldGenTree3.Hawthorn.class),
|
||||
Pecan("carya", "illinoinensis", 0x85b674, ILogType.ExtraTreeLog.Hickory, ExtraTreeFruitGene.Pecan, WorldGenTree3.Pecan.class),
|
||||
Elm("ulmus", "procera", 0x7c9048, ILogType.ExtraTreeLog.Elm, null, WorldGenTree3.Elm.class),
|
||||
Elder("sambucus", "nigra", 0xaeb873, ILogType.ExtraTreeLog.Elder, ExtraTreeFruitGene.Elderberry, WorldGenTree3.Elder.class),
|
||||
Holly("ilex", "aquifolium", 0x254b4c, ILogType.ExtraTreeLog.Holly, null, WorldGenHolly.Holly.class),
|
||||
Hornbeam("carpinus", "betulus", 0x96a71b, ILogType.ExtraTreeLog.Hornbeam, null, WorldGenTree3.Hornbeam.class),
|
||||
Sallow("salix", "caprea", 0xaeb323, ILogType.ForestryLog.WILLOW, null, WorldGenTree3.Sallow.class),
|
||||
AcornOak("quercus", "robur", 0x66733e, ILogType.VanillaLog.Oak, ExtraTreeFruitGene.Acorn, WorldGenTree3.AcornOak.class),
|
||||
Fir("abies", "alba", 0x6f7c20, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.SilverFir.class),
|
||||
Cedar("cedrus", "libani", 0x95a370, ILogType.ExtraTreeLog.Cedar, null, WorldGenConifer.Cedar.class),
|
||||
Olive("olea", "europaea", 0x3c4834, ILogType.ExtraTreeLog.Olive, ExtraTreeFruitGene.Olive, WorldGenTree2.Olive.class),
|
||||
RedMaple("acer", "ubrum", 0xe82e17, ILogType.ForestryLog.MAPLE, null, WorldGenMaple.RedMaple.class),
|
||||
BalsamFir("abies", "balsamea", 0x74a07c, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.BalsamFir.class),
|
||||
LoblollyPine("pinus", "taeda", 0x6f8a47, ILogType.ForestryLog.PINE, null, WorldGenConifer.LoblollyPine.class),
|
||||
Sweetgum("liquidambar", "styraciflua", 0x8b8762, ILogType.ExtraTreeLog.Sweetgum, null, WorldGenTree2.Sweetgum.class),
|
||||
Locust("robinia", "pseudoacacia", 0x887300, ILogType.ExtraTreeLog.Locust, null, WorldGenTree2.Locust.class),
|
||||
Pear("pyrus", "communis", 0x5e8826, ILogType.ExtraTreeLog.Pear, ExtraTreeFruitGene.Pear, WorldGenTree2.Pear.class),
|
||||
OsangeOsange("maclura", "pomifera", 0x687a50, ILogType.ExtraTreeLog.Maclura, ExtraTreeFruitGene.OsangeOsange, WorldGenJungle.OsangeOsange.class),
|
||||
OldFustic("maclura", "tinctoria", 0x687a50, ILogType.ExtraTreeLog.Maclura, null, WorldGenJungle.OldFustic.class),
|
||||
Brazilwood("caesalpinia", "echinata", 0x607459, ILogType.ExtraTreeLog.Brazilwood, null, WorldGenJungle.Brazilwood.class),
|
||||
Logwood("haematoxylum", "campechianum", 0x889f6b, ILogType.ExtraTreeLog.Logwood, null, WorldGenJungle.Logwood.class),
|
||||
Rosewood("dalbergia", "latifolia", 0x879b22, ILogType.ExtraTreeLog.Rosewood, null, WorldGenJungle.Rosewood.class),
|
||||
Purpleheart("peltogyne", "spp.", 0x778f55, ILogType.ExtraTreeLog.Purpleheart, null, WorldGenJungle.Purpleheart.class),
|
||||
Iroko("milicia", "excelsa", 0xafc86c, ILogType.ExtraTreeLog.Iroko, null, WorldGenTree2.Iroko.class),
|
||||
Gingko("ginkgo", "biloba", 0x719651, ILogType.ExtraTreeLog.Gingko, ExtraTreeFruitGene.GingkoNut, WorldGenTree2.Gingko.class),
|
||||
Brazilnut("bertholletia", "excelsa", 0x7c8f7b, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.BrazilNut, WorldGenJungle.BrazilNut.class),
|
||||
RoseGum("eucalyptus", "grandis", 0x9ca258, ILogType.ExtraTreeLog.Eucalyptus, null, WorldGenEucalyptus.RoseGum.class),
|
||||
SwampGum("eucalyptus", "grandis", 0xa2c686, ILogType.ExtraTreeLog.Eucalyptus2, null, WorldGenEucalyptus.SwampGum.class),
|
||||
Box("boxus", "sempervirens", 0x72996d, ILogType.ExtraTreeLog.Box, null, WorldGenTree2.Box.class),
|
||||
Clove("syzygium", "aromaticum", 0x7a821f, ILogType.ExtraTreeLog.Syzgium, ExtraTreeFruitGene.Clove, WorldGenTree2.Clove.class),
|
||||
Coffee("coffea", "arabica", 0x6f9065, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coffee, WorldGenJungle.Coffee.class),
|
||||
MonkeyPuzzle("araucaria", "araucana", 0x576158, ILogType.ForestryLog.PINE, null, WorldGenConifer.MonkeyPuzzle.class),
|
||||
RainbowGum("eucalyptus", "deglupta", 0xb7f025, ILogType.ExtraTreeLog.Eucalyptus3, null, WorldGenEucalyptus.RainbowGum.class),
|
||||
Butternut("juglans", "cinerea", 0x82b58c, ILogType.ExtraTreeLog.Butternut, ExtraTreeFruitGene.Butternut, WorldGenButternut.class),
|
||||
Rowan("sorbus", "aucuparia", 0x9ec79b, ILogType.ExtraTreeLog.Rowan, null, WorldGenRowan.class),
|
||||
Hemlock("tsuga", "heterophylla", 0x5cac72, ILogType.ExtraTreeLog.Hemlock, null, WorldGenWesternHemlock.class),
|
||||
Ash("fraxinus", "excelsior", 0x488e2b, ILogType.ExtraTreeLog.Ash, null, WorldGenCommonAsh.class),
|
||||
Alder("alnus", "glutinosa", 0x698a33, ILogType.ExtraTreeLog.Alder, null, WorldGenCommonAlder.class),
|
||||
Beech("fagus", "sylvatica", 0x83a04c, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenCommonBeech.class),
|
||||
CopperBeech("fagus", "purpurea", 0x801318, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenCopperBeech.class),
|
||||
Aspen("populus", "tremula", 0x8acc37, ILogType.ForestryLog.POPLAR, null, WorldGenAspen.class),
|
||||
Yew("taxus", "baccata", 0x948a4d, ILogType.ExtraTreeLog.Yew, null, WorldGenYew.class),
|
||||
Cypress("chamaecyparis", "lawsoniana", 0x89c9a7, ILogType.ExtraTreeLog.Cypress, null, WorldGenCypress.class),
|
||||
DouglasFir("pseudotsuga", "menziesii", 0x99b582, ILogType.ExtraTreeLog.Fir, null, WorldGenDouglasFir.class),
|
||||
Hazel("Corylus", "avellana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenHazel.class),
|
||||
Sycamore("ficus", "sycomorus", 0xa0a52f, ILogType.ExtraTreeLog.Fig, ExtraTreeFruitGene.Fig, WorldGenSycamore.class),
|
||||
Whitebeam("sorbus", "aria", 0xbace99, ILogType.ExtraTreeLog.Whitebeam, null, WorldGenWhitebeam.class),
|
||||
Hawthorn("crataegus", "monogyna", 0x6ba84a, ILogType.ExtraTreeLog.Hawthorn, null, WorldGenHawthorn.class),
|
||||
Pecan("carya", "illinoinensis", 0x85b674, ILogType.ExtraTreeLog.Hickory, ExtraTreeFruitGene.Pecan, WorldGenPecan.class),
|
||||
Elm("ulmus", "procera", 0x7c9048, ILogType.ExtraTreeLog.Elm, null, WorldGenElm.class),
|
||||
Elder("sambucus", "nigra", 0xaeb873, ILogType.ExtraTreeLog.Elder, ExtraTreeFruitGene.Elderberry, WorldGenElder.class),
|
||||
Holly("ilex", "aquifolium", 0x254b4c, ILogType.ExtraTreeLog.Holly, null, WorldGenHolly.class),
|
||||
Hornbeam("carpinus", "betulus", 0x96a71b, ILogType.ExtraTreeLog.Hornbeam, null, WorldGenHornbeam.class),
|
||||
Sallow("salix", "caprea", 0xaeb323, ILogType.ForestryLog.WILLOW, null, WorldGenSallow.class),
|
||||
AcornOak("quercus", "robur", 0x66733e, ILogType.VanillaLog.Oak, ExtraTreeFruitGene.Acorn, WorldGenAcornOak.class),
|
||||
Fir("abies", "alba", 0x6f7c20, ILogType.ExtraTreeLog.Fir, null, WorldGenSilverFir.class),
|
||||
Cedar("cedrus", "libani", 0x95a370, ILogType.ExtraTreeLog.Cedar, null, WorldGenCedar.class),
|
||||
Olive("olea", "europaea", 0x3c4834, ILogType.ExtraTreeLog.Olive, ExtraTreeFruitGene.Olive, WorldGenOlive.class),
|
||||
RedMaple("acer", "ubrum", 0xe82e17, ILogType.ForestryLog.MAPLE, null, WorldGenRedMaple.class),
|
||||
BalsamFir("abies", "balsamea", 0x74a07c, ILogType.ExtraTreeLog.Fir, null, WorldGenBalsamFir.class),
|
||||
LoblollyPine("pinus", "taeda", 0x6f8a47, ILogType.ForestryLog.PINE, null, WorldGenLoblollyPine.class),
|
||||
Sweetgum("liquidambar", "styraciflua", 0x8b8762, ILogType.ExtraTreeLog.Sweetgum, null, WorldGenSweetgum.class),
|
||||
Locust("robinia", "pseudoacacia", 0x887300, ILogType.ExtraTreeLog.Locust, null, WorldGenLocust.class),
|
||||
Pear("pyrus", "communis", 0x5e8826, ILogType.ExtraTreeLog.Pear, ExtraTreeFruitGene.Pear, WorldGenPear.class),
|
||||
OsangeOsange("maclura", "pomifera", 0x687a50, ILogType.ExtraTreeLog.Maclura, ExtraTreeFruitGene.OsangeOsange, WorldGenOsangeOsange.class),
|
||||
OldFustic("maclura", "tinctoria", 0x687a50, ILogType.ExtraTreeLog.Maclura, null, WorldGenOldFustic.class),
|
||||
Brazilwood("caesalpinia", "echinata", 0x607459, ILogType.ExtraTreeLog.Brazilwood, null, WorldGenBrazilwood.class),
|
||||
Logwood("haematoxylum", "campechianum", 0x889f6b, ILogType.ExtraTreeLog.Logwood, null, WorldGenLogwood.class),
|
||||
Rosewood("dalbergia", "latifolia", 0x879b22, ILogType.ExtraTreeLog.Rosewood, null, WorldGenRosewood.class),
|
||||
Purpleheart("peltogyne", "spp.", 0x778f55, ILogType.ExtraTreeLog.Purpleheart, null, WorldGenPurpleheart.class),
|
||||
Iroko("milicia", "excelsa", 0xafc86c, ILogType.ExtraTreeLog.Iroko, null, WorldGenIroko.class),
|
||||
Gingko("ginkgo", "biloba", 0x719651, ILogType.ExtraTreeLog.Gingko, ExtraTreeFruitGene.GingkoNut, WorldGenGingko.class),
|
||||
Brazilnut("bertholletia", "excelsa", 0x7c8f7b, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.BrazilNut, WorldGenBrazilNut.class),
|
||||
RoseGum("eucalyptus", "grandis", 0x9ca258, ILogType.ExtraTreeLog.Eucalyptus, null, WorldGenRoseGum.class),
|
||||
SwampGum("eucalyptus", "grandis", 0xa2c686, ILogType.ExtraTreeLog.Eucalyptus2, null, WorldGenSwampGum.class),
|
||||
Box("boxus", "sempervirens", 0x72996d, ILogType.ExtraTreeLog.Box, null, WorldGenBox.class),
|
||||
Clove("syzygium", "aromaticum", 0x7a821f, ILogType.ExtraTreeLog.Syzgium, ExtraTreeFruitGene.Clove, WorldGenClove.class),
|
||||
Coffee("coffea", "arabica", 0x6f9065, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coffee, WorldGenCoffee.class),
|
||||
MonkeyPuzzle("araucaria", "araucana", 0x576158, ILogType.ForestryLog.PINE, null, WorldGenMonkeyPuzzle.class),
|
||||
RainbowGum("eucalyptus", "deglupta", 0xb7f025, ILogType.ExtraTreeLog.Eucalyptus3, null, WorldGenRainbowGum.class),
|
||||
PinkIvory("berchemia", "zeyheri", 0x7c9159, ILogType.ExtraTreeLog.PinkIvory, null, WorldGenTree.class),
|
||||
Blackcurrant("ribes", "nigrum", 0xa6da5c, null, ExtraTreeFruitGene.Blackcurrant, WorldGenShrub.Shrub.class),
|
||||
Redcurrant("ribes", "rubrum", 0x74ac00, null, ExtraTreeFruitGene.Redcurrant, WorldGenShrub.Shrub.class),
|
||||
Blackberry("rubus", "fruticosus", 0x92c15b, null, ExtraTreeFruitGene.Blackberry, WorldGenShrub.Shrub.class),
|
||||
Raspberry("rubus", "idaeus", 0x83b96e, null, ExtraTreeFruitGene.Raspberry, WorldGenShrub.Shrub.class),
|
||||
Blueberry("vaccinium", "corymbosum", 0x72c750, null, ExtraTreeFruitGene.Blueberry, WorldGenShrub.Shrub.class),
|
||||
Cranberry("vaccinium", "oxycoccos", 0x96d179, null, ExtraTreeFruitGene.Cranberry, WorldGenShrub.Shrub.class),
|
||||
Juniper("juniperus", "communis", 0x90b149, null, ExtraTreeFruitGene.Juniper, WorldGenShrub.Shrub.class),
|
||||
Gooseberry("ribes", "grossularia", 0x79bb00, null, ExtraTreeFruitGene.Gooseberry, WorldGenShrub.Shrub.class),
|
||||
GoldenRaspberry("rubus", "occidentalis", 0x83b96e, null, ExtraTreeFruitGene.GoldenRaspberry, WorldGenShrub.Shrub.class),
|
||||
Cinnamon("cinnamomum", "cassia", 0x738e0b, ILogType.ExtraTreeLog.Cinnamon, null, WorldGenLazy.Tree.class),
|
||||
Coconut("cocous", "nucifera", 0x649923, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coconut, WorldGenPalm.Coconut.class),
|
||||
Cashew("anacardium", "occidentale", 0xabb962, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Cashew, WorldGenLazy.Tree.class),
|
||||
Avacado("persea", "americana", 0x96a375, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Avacado, WorldGenLazy.Tree.class),
|
||||
Nutmeg("myristica", "fragrans", 0x488d4c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Nutmeg, WorldGenLazy.Tree.class),
|
||||
Allspice("pimenta", "dioica", 0x7c9724, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Allspice, WorldGenLazy.Tree.class),
|
||||
Chilli("capsicum", "annuum", 0x2a9f01, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Chilli, WorldGenLazy.Tree.class),
|
||||
StarAnise("illicium", "verum", 0x7fc409, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.StarAnise, WorldGenLazy.Tree.class),
|
||||
Mango("mangifera", "indica", 0x87b574, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Mango, WorldGenTropical.Mango.class),
|
||||
Starfruit("averrhoa", "carambola", 0x6da92d, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Starfruit, WorldGenLazy.Tree.class),
|
||||
Candlenut("aleurites", "moluccana", 0x8aa36c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Candlenut, WorldGenLazy.Tree.class),
|
||||
DwarfHazel("Corylus", "americana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenShrub.Shrub.class);
|
||||
Blackcurrant("ribes", "nigrum", 0xa6da5c, null, ExtraTreeFruitGene.Blackcurrant, WorldGenShrub.class),
|
||||
Redcurrant("ribes", "rubrum", 0x74ac00, null, ExtraTreeFruitGene.Redcurrant, WorldGenShrub.class),
|
||||
Blackberry("rubus", "fruticosus", 0x92c15b, null, ExtraTreeFruitGene.Blackberry, WorldGenShrub.class),
|
||||
Raspberry("rubus", "idaeus", 0x83b96e, null, ExtraTreeFruitGene.Raspberry, WorldGenShrub.class),
|
||||
Blueberry("vaccinium", "corymbosum", 0x72c750, null, ExtraTreeFruitGene.Blueberry, WorldGenShrub.class),
|
||||
Cranberry("vaccinium", "oxycoccos", 0x96d179, null, ExtraTreeFruitGene.Cranberry, WorldGenShrub.class),
|
||||
Juniper("juniperus", "communis", 0x90b149, null, ExtraTreeFruitGene.Juniper, WorldGenShrub.class),
|
||||
Gooseberry("ribes", "grossularia", 0x79bb00, null, ExtraTreeFruitGene.Gooseberry, WorldGenShrub.class),
|
||||
GoldenRaspberry("rubus", "occidentalis", 0x83b96e, null, ExtraTreeFruitGene.GoldenRaspberry, WorldGenShrub.class),
|
||||
Cinnamon("cinnamomum", "cassia", 0x738e0b, ILogType.ExtraTreeLog.Cinnamon, null, WorldGenLazy.class),
|
||||
Coconut("cocous", "nucifera", 0x649923, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coconut, WorldGenCoconut.class),
|
||||
Cashew("anacardium", "occidentale", 0xabb962, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Cashew, WorldGenLazy.class),
|
||||
Avacado("persea", "americana", 0x96a375, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Avacado, WorldGenLazy.class),
|
||||
Nutmeg("myristica", "fragrans", 0x488d4c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Nutmeg, WorldGenLazy.class),
|
||||
Allspice("pimenta", "dioica", 0x7c9724, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Allspice, WorldGenLazy.class),
|
||||
Chilli("capsicum", "annuum", 0x2a9f01, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Chilli, WorldGenLazy.class),
|
||||
StarAnise("illicium", "verum", 0x7fc409, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.StarAnise, WorldGenLazy.class),
|
||||
Mango("mangifera", "indica", 0x87b574, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Mango, WorldGenMango.class),
|
||||
Starfruit("averrhoa", "carambola", 0x6da92d, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Starfruit, WorldGenLazy.class),
|
||||
Candlenut("aleurites", "moluccana", 0x8aa36c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Candlenut, WorldGenLazy.class),
|
||||
DwarfHazel("Corylus", "americana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenShrub.class);
|
||||
|
||||
public ILogType wood;
|
||||
|
||||
@@ -1169,6 +1205,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
try {
|
||||
return gen.getConstructor(ITreeGenData.class).newInstance(tree);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
@@ -1179,11 +1216,9 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
leafType = type;
|
||||
if (leafType == LeafType.CONIFER) {
|
||||
saplingType = SaplingType.CONIFER;
|
||||
}
|
||||
if (leafType == LeafType.JUNGLE) {
|
||||
} else if (leafType == LeafType.JUNGLE) {
|
||||
saplingType = SaplingType.JUNGLE;
|
||||
}
|
||||
if (leafType == LeafType.PALM) {
|
||||
} else if (leafType == LeafType.PALM) {
|
||||
saplingType = SaplingType.PALM;
|
||||
}
|
||||
return this;
|
||||
@@ -1247,7 +1282,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLeafColour(ITree tree) {
|
||||
public int getLeafColor(ITree tree) {
|
||||
return color;
|
||||
}
|
||||
|
||||
@@ -1359,14 +1394,14 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
public int getGermlingColour(EnumGermlingType type, int renderPass) {
|
||||
if (type == EnumGermlingType.SAPLING) {
|
||||
if (renderPass == 0) {
|
||||
return getLeafColour(null);
|
||||
return getLeafColor(null);
|
||||
}
|
||||
if (getLog() == null) {
|
||||
return 0xffffff;
|
||||
}
|
||||
return getLog().getColour();
|
||||
}
|
||||
return getLeafColour(null);
|
||||
return getLeafColor(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ModuleGenetics implements IInitializable {
|
||||
|
||||
private void generateBranches() {
|
||||
for (String hierarchy : branches) {
|
||||
List<String> set = new ArrayList<String>();
|
||||
List<String> set = new ArrayList<>();
|
||||
for (String string : hierarchy.split(" ", 0)) {
|
||||
set.add(string.toLowerCase());
|
||||
}
|
||||
|
||||
@@ -89,7 +89,6 @@ public enum Food implements IItemMisc {
|
||||
ores = new ArrayList<>();
|
||||
this.hunger = hunger;
|
||||
}
|
||||
|
||||
public static void registerOreDictionary() {
|
||||
Food.Crabapple.ore("Apple").ore("Crabapple");
|
||||
Food.Orange.ore("Orange");
|
||||
@@ -131,6 +130,25 @@ public enum Food implements IItemMisc {
|
||||
Food.Coffee.ore("Coffee");
|
||||
Food.OsangeOrange.ore("OsangeOrange");
|
||||
Food.Clove.ore("Clove");
|
||||
Food.Papayimar.ore("Papayimar");
|
||||
Food.Blackcurrant.ore("Blackcurrant");
|
||||
Food.Redcurrant.ore("Redcurrant");
|
||||
Food.Blackberry.ore("Blackberry");
|
||||
Food.Raspberry.ore("Raspberry");
|
||||
Food.Blueberry.ore("Blueberry");
|
||||
Food.Cranberry.ore("Cranberry");
|
||||
Food.Juniper.ore("Juniper");
|
||||
Food.Gooseberry.ore("Gooseberry");
|
||||
Food.GoldenRaspberry.ore("GoldenRaspberry");
|
||||
Food.Coconut.ore("Coconut");
|
||||
Food.Cashew.ore("Cashew");
|
||||
Food.Avacado.ore("Avacado");
|
||||
Food.Nutmeg.ore("Nutmeg");
|
||||
Food.Chilli.ore("Chilli");
|
||||
Food.StarAnise.ore("StarAnise");
|
||||
Food.Mango.ore("Mango");
|
||||
Food.Starfruit.ore("Starfruit");
|
||||
Food.Candlenut.ore("Candlenut");
|
||||
}
|
||||
|
||||
public boolean isEdible() {
|
||||
@@ -148,7 +166,7 @@ public enum Food implements IItemMisc {
|
||||
|
||||
@Override
|
||||
public String getName(ItemStack itemStack) {
|
||||
return I18N.localise("extratrees.item.food." + name().toLowerCase());
|
||||
return I18N.localise("for.extratrees.item.food." + name().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import binnie.core.Mods;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockTypeLeaf extends BlockType {
|
||||
public BlockTypeLeaf() {
|
||||
super(Mods.forestry.block("leaves"), 0);
|
||||
public BlockTypeLeaf(boolean decay) {
|
||||
super(decay ? Mods.forestry.block("leaves") : ExtraTrees.blockShrubLeaves, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,8 +24,9 @@ public class DefaultTreeGenerator implements ITreeGenerator {
|
||||
|
||||
@Override
|
||||
public void setLogBlock(ITreeGenome genome, World world, int x, int y, int z, ForgeDirection direction) {
|
||||
if (extraTreeSpecies.wood != null)
|
||||
if (extraTreeSpecies.wood != null) {
|
||||
extraTreeSpecies.wood.placeBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAcornOak extends WorldGenTree {
|
||||
public WorldGenAcornOak(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = 3.0f;
|
||||
float width = height * randBetween(0.45f, 0.5f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.4f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.7f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.2f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAlder {
|
||||
public static class CommonAlder extends WorldGenTree {
|
||||
public CommonAlder(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(1, 2);
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
}
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenApple {
|
||||
public static class OrchardApple extends WorldGenTree {
|
||||
public OrchardApple(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
while (leafSpawn > 2) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 6);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class SweetCrabapple extends WorldGenTree {
|
||||
public SweetCrabapple(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 4);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FloweringCrabapple extends WorldGenTree {
|
||||
public FloweringCrabapple(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.0f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 6);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class PrairieCrabapple extends WorldGenTree {
|
||||
public PrairieCrabapple(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 4);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAsh {
|
||||
public static class CommonAsh extends WorldGenTree {
|
||||
public CommonAsh(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.35f, 0.45f);
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
|
||||
}
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAspen extends WorldGenTree {
|
||||
public WorldGenAspen(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = randBetween(height / 2, height / 2 + 1) + 1;
|
||||
float width = height * randBetween(0.25f, 0.35f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.5f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBalsamFir extends WorldGenTree {
|
||||
public WorldGenBalsamFir(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = 1.0f;
|
||||
float width = height / randBetween(2.0f, 2.5f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
radius *= width;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,10 @@ public class WorldGenBanana extends WorldGenTree {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height + 1;
|
||||
float width = height / randBetween(1.8f, 2.0f);
|
||||
int bottom = randBetween(3, 4);
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.9f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.9f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
|
||||
public class WorldGenBeech {
|
||||
public static class CommonBeech extends WorldGenTree {
|
||||
public CommonBeech(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.47f, 0.5f);
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CopperBeech extends CommonBeech {
|
||||
public CopperBeech(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBox extends WorldGenTree {
|
||||
public WorldGenBox(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 0.0f;
|
||||
float width = 1.5f;
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBrazilNut extends WorldGenTree {
|
||||
public WorldGenBrazilNut(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = height - 3;
|
||||
float width = height * randBetween(0.25f, 0.3f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(7, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBrazilwood extends WorldGenTree {
|
||||
public WorldGenBrazilwood(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.15f, 0.2f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.8f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenButternut extends WorldGenTree {
|
||||
public WorldGenButternut(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height + 1;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
|
||||
}
|
||||
if (rand.nextBoolean()) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 4.0f, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCedar extends WorldGenTree {
|
||||
public WorldGenCedar(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 3;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.7f, 0.75f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), girth, 1, leaf, false);
|
||||
}
|
||||
|
||||
for (leafSpawn = height + 3; leafSpawn > bottom; leafSpawn += 1 + rand.nextInt(2)) {
|
||||
float cone = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
cone *= 2.0f - cone;
|
||||
|
||||
float radius = (0.7f + rand.nextFloat() * 0.3f) * width;
|
||||
radius *= cone;
|
||||
if (radius < 2.0f) {
|
||||
radius = 2.0f;
|
||||
}
|
||||
|
||||
float xOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
|
||||
xOffset *= cone;
|
||||
if (xOffset > radius / 2.0f) {
|
||||
xOffset = radius / 2.0f;
|
||||
}
|
||||
|
||||
float yOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
|
||||
yOffset *= cone;
|
||||
if (yOffset > radius / 2.0f) {
|
||||
yOffset = radius / 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), 0.7f * radius, 1, leaf, false);
|
||||
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), radius, 1, leaf, false);
|
||||
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), 0.5f * radius, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenClove extends WorldGenTree {
|
||||
public WorldGenClove(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 2.0f;
|
||||
float width = height * randBetween(0.25f, 0.3f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.6f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCoconut extends WorldGenTree {
|
||||
public WorldGenCoconut(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float width = height * randBetween(0.35f, 0.4f);
|
||||
if (width < 1.2) {
|
||||
width = 1.55f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.6f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCoffee extends WorldGenTree {
|
||||
public WorldGenCoffee(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.25f, 0.3f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.3f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCommonAlder extends WorldGenTree {
|
||||
public WorldGenCommonAlder(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(1, 2);
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.3f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCommonAsh extends WorldGenTree {
|
||||
public WorldGenCommonAsh(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.35f, 0.45f);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCommonBeech extends WorldGenTree {
|
||||
public WorldGenCommonBeech(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.47f, 0.5f);
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
@@ -1,273 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenConifer {
|
||||
public static class WesternHemlock extends WorldGenTree {
|
||||
public WesternHemlock(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 6;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height / randBetween(2.0f, 2.5f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
radius *= width;
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(7, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Cypress extends WorldGenTree {
|
||||
public Cypress(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.15f, 0.2f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
radius *= width - 1.0f;
|
||||
++radius;
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Yew extends WorldGenTree {
|
||||
public Yew(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = randBetween(1, 2);
|
||||
float width = height * randBetween(0.7f, 0.75f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
radius *= 2.0f - radius;
|
||||
radius *= width;
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Cedar extends WorldGenTree {
|
||||
public Cedar(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 3;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.7f, 0.75f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), girth, 1, leaf, false);
|
||||
}
|
||||
for (leafSpawn = height + 3; leafSpawn > bottom; leafSpawn += 1 + rand.nextInt(2)) {
|
||||
float cone = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
float radius = (0.7f + rand.nextFloat() * 0.3f) * width;
|
||||
float xOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
|
||||
float yOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
|
||||
cone *= 2.0f - cone;
|
||||
xOffset *= cone;
|
||||
yOffset *= cone;
|
||||
radius *= cone;
|
||||
if (radius < 2.0f) {
|
||||
radius = 2.0f;
|
||||
}
|
||||
if (xOffset > radius / 2.0f) {
|
||||
xOffset = radius / 2.0f;
|
||||
}
|
||||
if (yOffset > radius / 2.0f) {
|
||||
yOffset = radius / 2.0f;
|
||||
}
|
||||
float f2 = xOffset;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, yOffset), 0.7f * radius, 1, leaf, false);
|
||||
float f3 = xOffset;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, yOffset), radius, 1, leaf, false);
|
||||
float f4 = xOffset;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, yOffset), 0.5f * radius, 1, leaf, false);
|
||||
}
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class LoblollyPine extends WorldGenTree {
|
||||
public LoblollyPine(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = height * randBetween(0.65f, 0.7f);
|
||||
float width = height * randBetween(0.25f, 0.3f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.6f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class MonkeyPuzzle extends WorldGenTree {
|
||||
public MonkeyPuzzle(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.35f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.55f * width, 1, leaf, false);
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.75f * width, 1, leaf, false);
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), 0.9f * width, 1, leaf, false);
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), 1.0f * width, 1, leaf, false);
|
||||
float f6 = 0.0f;
|
||||
float h6 = leafSpawn;
|
||||
leafSpawn = h6 - 1.0f;
|
||||
generateCylinder(new Vector(f6, h6, 0.0f), 0.5f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(9, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCopperBeech extends WorldGenCommonBeech {
|
||||
public WorldGenCopperBeech(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCypress extends WorldGenTree {
|
||||
public WorldGenCypress(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.15f, 0.2f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = (1.0f - (leafSpawn - bottom) / coneHeight) * (width - 1.0f) + 1;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,6 @@ public class WorldGenDefault extends WorldGenTree {
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockType getLeaf() {
|
||||
return new BlockTypeLeaf();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockType getWood() {
|
||||
return new BlockTypeLog(((ExtraTreeSpecies) treeGen.getGenome().getPrimary()).getLog());
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenDouglasFir extends WorldGenTree {
|
||||
public WorldGenDouglasFir(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float patchyBottom = height / 2;
|
||||
float bottom = randBetween(3, 4);
|
||||
float width = height * randBetween(0.35f, 0.4f);
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
bushiness = 0.1f;
|
||||
while (leafSpawn > patchyBottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
bushiness = 0.5f;
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.7f, 1.0f) * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.3f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(7, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenElder extends WorldGenTree {
|
||||
public WorldGenElder(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = 3.0f;
|
||||
float width = height * randBetween(0.55f, 0.6f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenElm extends WorldGenTree {
|
||||
public WorldGenElm(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.45f, 0.5f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import binnie.extratrees.block.ILogType;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenEucalyptus {
|
||||
public static class SwampGum extends WorldGenTree {
|
||||
public SwampGum(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float weakerBottm = randBetween(0.5f, 0.6f) * height;
|
||||
float bottom = randBetween(0.4f, 0.5f) * height;
|
||||
float width = height * randBetween(0.15f, 0.2f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
bushiness = 0.3f;
|
||||
while (leafSpawn > weakerBottm) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.9f, 1.0f) * width, 1, leaf, false);
|
||||
}
|
||||
bushiness = 0.6f;
|
||||
while (leafSpawn > bottom) {
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), randBetween(0.8f, 0.9f) * width, 1, leaf, false);
|
||||
}
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), 0.5f * width, 1, leaf, false);
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
float f6 = randBetween(-1, 1);
|
||||
float h6 = leafSpawn;
|
||||
leafSpawn = h6 - 1.0f;
|
||||
generateSphere(new Vector(f6, h6, randBetween(-1, 1)), randBetween(1, 2), leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(14, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class RoseGum extends WorldGenTree {
|
||||
public RoseGum(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int offset = (girth - 1) / 2;
|
||||
for (int x = 0; x < girth; ++x) {
|
||||
for (int y = 0; y < girth; ++y) {
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
addBlock(x - offset, i, y - offset, new BlockTypeLog(ILogType.ExtraTreeLog.Eucalyptus2), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = randBetween(0.4f, 0.5f) * height;
|
||||
float width = height * randBetween(0.05f, 0.1f);
|
||||
if (width < 1.5f) {
|
||||
width = 1.5f;
|
||||
}
|
||||
bushiness = 0.5f;
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
bushiness = 0.1f;
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(9, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class RainbowGum extends WorldGenTree {
|
||||
public RainbowGum(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = randBetween(0.5f, 0.6f) * height;
|
||||
float width = height * randBetween(0.15f, 0.2f);
|
||||
if (width < 1.5f) {
|
||||
width = 1.5f;
|
||||
}
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(7, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,137 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenFir {
|
||||
public static class DouglasFir extends WorldGenTree {
|
||||
public DouglasFir(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float patchyBottom = height / 2;
|
||||
float bottom = randBetween(3, 4);
|
||||
float width = height * randBetween(0.35f, 0.4f);
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
bushiness = 0.1f;
|
||||
while (leafSpawn > patchyBottom) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
|
||||
}
|
||||
bushiness = 0.5f;
|
||||
while (leafSpawn > bottom) {
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), randBetween(0.7f, 1.0f) * width, 1, leaf, false);
|
||||
}
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
float f6 = 0.0f;
|
||||
float h6 = leafSpawn;
|
||||
leafSpawn = h6 - 1.0f;
|
||||
generateCylinder(new Vector(f6, h6, 0.0f), 0.3f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(7, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class SilverFir extends WorldGenTree {
|
||||
public SilverFir(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height / randBetween(2.5f, 3.0f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
radius *= width;
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(7, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class BalsamFir extends WorldGenTree {
|
||||
public BalsamFir(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = 1.0f;
|
||||
float width = height / randBetween(2.0f, 2.5f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
radius *= width;
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenFloweringCrabapple extends WorldGenTree {
|
||||
public WorldGenFloweringCrabapple(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 6);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenGingko extends WorldGenTree {
|
||||
public WorldGenGingko(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = 2.0f;
|
||||
float width = height * randBetween(0.55f, 0.6f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 2.0f, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom * 2.0f + 1.0f) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.9f, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.9f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenHawthorn extends WorldGenTree {
|
||||
public WorldGenHawthorn(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(1, 2);
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
if (width < 1.5f) {
|
||||
width = 1.5f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenHazel extends WorldGenTree {
|
||||
public WorldGenHazel(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = 3.0f;
|
||||
float width = height * randBetween(0.45f, 0.5f);
|
||||
if (width < 2.5f) {
|
||||
width = 2.5f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.3f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.6f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.2f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -2,45 +2,34 @@ package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenHolly {
|
||||
public static class Holly extends WorldGenTree {
|
||||
public Holly(ITreeGenData tree) {
|
||||
super(tree);
|
||||
public class WorldGenHolly extends WorldGenTree {
|
||||
public WorldGenHolly(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
if (width < 1.5f) {
|
||||
width = 1.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
if (width < 1.5f) {
|
||||
width = 1.5f;
|
||||
}
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), width = 1.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 1.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
Loaded 100 of 170 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user