mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 14:34:44 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24e473018e | ||
|
|
d635a7a406 | ||
|
|
f82ed6358a | ||
|
|
1ed50ed660 | ||
|
|
f38854d65e | ||
|
|
53d085d292 | ||
|
|
4345981958 | ||
|
|
1dd3f7342e | ||
|
|
f88d1f8c96 | ||
|
|
59aa1ce79c | ||
|
|
d571f64b14 | ||
|
|
f3cf6407cf | ||
|
|
e3460d5dbc | ||
|
|
d9a7759c49 | ||
|
|
7c38b1101a | ||
|
|
9ce571f464 | ||
|
|
f881470241 | ||
|
|
d4bd32c67b | ||
|
|
60607bc521 | ||
|
|
2e7e1a3efc | ||
|
|
0bd57ed988 | ||
|
|
eccceab233 | ||
|
|
e5d696f210 | ||
|
|
0f59e8b4ef | ||
|
|
7248bac5d0 | ||
|
|
81cb972fff | ||
|
|
9589da0f00 | ||
|
|
b5cf82b574 | ||
|
|
c4cb9a19c6 | ||
|
|
8fb3407357 | ||
|
|
001f1b27f6 | ||
|
|
6429eea5d6 | ||
|
|
3ff6e91053 | ||
|
|
cdf3046e61 | ||
|
|
05476997e1 | ||
|
|
c2cafd4a98 | ||
|
|
e9606af217 | ||
|
|
c3abd86907 | ||
|
|
ddac6aeb67 | ||
|
|
31c130ebae | ||
|
|
77d5bcf6d1 | ||
|
|
b43e100d6f | ||
|
|
3483b613aa | ||
|
|
9919f54cc8 | ||
|
|
c4835b735a | ||
|
|
e035bdb914 | ||
|
|
dcaf57b506 | ||
|
|
6b34a53afa | ||
|
|
e990776988 | ||
|
|
53e83a0c1a | ||
|
|
3c39529c6f | ||
|
|
774defd118 | ||
|
|
6b5b6b0efe | ||
|
|
41a0528d2a | ||
|
|
eb05b5c1eb | ||
|
|
2f1bd92b33 | ||
|
|
3be904d27d | ||
|
|
08b1b9b456 | ||
|
|
6467ba4612 | ||
|
|
09dc0657ef | ||
|
|
dcfa448af3 | ||
|
|
786cb01b94 | ||
|
|
f6f4a988af | ||
|
|
5a823658ea | ||
|
|
8770492524 | ||
|
|
322203ac6a | ||
|
|
1e5c8db826 | ||
|
|
ef47b1863a | ||
|
|
c3dac80d44 | ||
|
|
f2beaae45c | ||
|
|
3a4e4dce04 | ||
|
|
99c3cb68eb | ||
|
|
38bc8a151c | ||
|
|
a64bd5f437 | ||
|
|
fb43f46bb8 | ||
|
|
9d2c667c35 | ||
|
|
67dfeb7daa | ||
|
|
e2080bc542 | ||
|
|
b0116884f1 | ||
|
|
a9948fcf26 | ||
|
|
828231c3c4 | ||
|
|
aed51fbd9a | ||
|
|
9bae32761c | ||
|
|
25c04cedcb | ||
|
|
cfe1cad9e8 | ||
|
|
766a440429 | ||
|
|
428bfb04f8 | ||
|
|
9fb5e3d8fb | ||
|
|
3da4083bba | ||
|
|
9d36165259 | ||
|
|
573c089b96 | ||
|
|
b82ce5e15f | ||
|
|
4f5358bea6 | ||
|
|
df0761c9af | ||
|
|
b5165b3e58 | ||
|
|
12f8ed9435 | ||
|
|
edf3ff7423 | ||
|
|
06571c1eb4 | ||
|
|
4823e44793 | ||
|
|
f55a9f7643 | ||
|
|
65b698face | ||
|
|
123ff12302 | ||
|
|
6e6cbbab48 | ||
|
|
b965d50bbc | ||
|
|
fb98d686fb | ||
|
|
ff20b5f600 | ||
|
|
2ade3e5705 | ||
|
|
b7a928bb06 | ||
|
|
ec4491994c | ||
|
|
89acb72f0b | ||
|
|
fc9ebd66d9 | ||
|
|
4c64395e21 | ||
|
|
121fe1c0a9 | ||
|
|
906b97064e | ||
|
|
ae736770fb | ||
|
|
27ea81cd09 | ||
|
|
aa25a5086d | ||
|
|
ac68e40b9f | ||
|
|
2935df3409 | ||
|
|
98c0810820 | ||
|
|
af2d06aa7b | ||
|
|
e88eb1756c | ||
|
|
b19979e88b | ||
|
|
974e459311 | ||
|
|
f366dcdfc6 | ||
|
|
e7e5292526 | ||
|
|
c79503d669 | ||
|
|
6529e7245d | ||
|
|
29e72ed7fc | ||
|
|
02c7fc7613 | ||
|
|
7416d21f6f | ||
|
|
d3ad57a622 | ||
|
|
0578441707 | ||
|
|
07a987151e | ||
|
|
c23401e45c | ||
|
|
e03d4da989 | ||
|
|
4c47f77214 | ||
|
|
bdd76306bb | ||
|
|
ae246d87eb | ||
|
|
c8aaeba7cb | ||
|
|
7345669405 | ||
|
|
5e912b69bd | ||
|
|
481c22a19d | ||
|
|
4103ce72e5 | ||
|
|
116e3610e6 | ||
|
|
702a02e943 | ||
|
|
b200f3006a | ||
|
|
322b8d0944 | ||
|
|
b5e1046904 | ||
|
|
f0f51be20e | ||
|
|
c3b0378096 | ||
|
|
baf9f915e5 | ||
|
|
0d97d836a3 | ||
|
|
f777cf976d | ||
|
|
bd6887c598 | ||
|
|
acf2525801 | ||
|
|
054bf8f329 | ||
|
|
418a322378 | ||
|
|
dcf47bb393 | ||
|
|
5ca5c11fc9 | ||
|
|
991c4fff5e | ||
|
|
137784f76d | ||
|
|
bde910d708 | ||
|
|
befd485d39 | ||
|
|
e56e056c5d | ||
|
|
ce4f1880ca | ||
|
|
520d2e09e1 | ||
|
|
870eafbbe4 | ||
|
|
d9ef30fe32 | ||
|
|
0112a7f104 | ||
|
|
9724d519e8 | ||
|
|
3d562d0052 | ||
|
|
9f17d8ceff | ||
|
|
614acf5114 | ||
|
|
b338d97517 | ||
|
|
2870e06387 | ||
|
|
96514b1aff | ||
|
|
f85900d9a8 | ||
|
|
66b1f3e075 | ||
|
|
e053b019af | ||
|
|
5dfa179c87 | ||
|
|
966e4ba2f2 | ||
|
|
1cbe881ae3 | ||
|
|
b0b38a472a | ||
|
|
5f56b46e00 | ||
|
|
83b0bfc504 | ||
|
|
fe56288c72 | ||
|
|
ff25ec619c | ||
|
|
c4ef06b027 | ||
|
|
0b6c1cc345 | ||
|
|
0efc169ef7 | ||
|
|
d83a0cc775 | ||
|
|
02afe5dbc8 | ||
|
|
951f5a1ad5 | ||
|
|
1cbc997be3 | ||
|
|
f3d3a0a2df | ||
|
|
fa10e888dc | ||
|
|
fdc1301b43 | ||
|
|
756b186db4 | ||
|
|
639c53a01d | ||
|
|
309a9c0818 | ||
|
|
2c547e3851 | ||
|
|
79d0283901 | ||
|
|
918ec20739 | ||
|
|
2ea0a44429 | ||
|
|
8f919fc688 | ||
|
|
c47b50b617 | ||
|
|
764fda0985 | ||
|
|
8412246e3e | ||
|
|
1391dd3ed6 | ||
|
|
cf6536c17f | ||
|
|
fddc31a8f5 | ||
|
|
840771f5f4 | ||
|
|
b76b77d4a3 | ||
|
|
5e5a80fb5c | ||
|
|
66c5bdf2ca | ||
|
|
a64ae86853 | ||
|
|
d612f8c520 | ||
|
|
806c326b62 | ||
|
|
c31726001b | ||
|
|
c209ef59fb | ||
|
|
98fd7c1e19 | ||
|
|
5b4aaf50f4 | ||
|
|
17768a1300 | ||
|
|
9f1642fd5b | ||
|
|
c3fcb6fc28 | ||
|
|
bc963b0d7e | ||
|
|
80c1c4d5da | ||
|
|
3afee4f553 | ||
|
|
1e0c7d3c5e | ||
|
|
9b21be0eb5 | ||
|
|
3a0d9352b1 | ||
|
|
108a11c119 | ||
|
|
e90b40159c | ||
|
|
61398d3139 | ||
|
|
e1d289bc48 | ||
|
|
75db1329ea | ||
|
|
32ffe03aa3 | ||
|
|
138e8d9c40 | ||
|
|
6c6b690d57 | ||
|
|
726831399d | ||
|
|
87ec6c63eb | ||
|
|
ef4359835a | ||
|
|
b9292af3d9 | ||
|
|
77936b6dab | ||
|
|
e24a94f0ba | ||
|
|
1d4a52c3af | ||
|
|
c7c47b9a1b | ||
|
|
e12eda73fc | ||
|
|
2b1e179eeb | ||
|
|
dbc4b23821 | ||
|
|
f5dc54e1fb | ||
|
|
500adb0357 | ||
|
|
7df6221e0b | ||
|
|
2d78a84df1 | ||
|
|
729908b1b0 | ||
|
|
e5cea4e3dd | ||
|
|
c17c2f3746 | ||
|
|
951df8a632 | ||
|
|
bdb7a53b96 | ||
|
|
e5f0fc2368 | ||
|
|
702cffe458 | ||
|
|
72b71021de | ||
|
|
0149c34d1d | ||
|
|
caca6a6329 | ||
|
|
6bd5cc24d3 | ||
|
|
4bef945c4e | ||
|
|
6fe4436226 | ||
|
|
0f7363c756 | ||
|
|
afa16af645 | ||
|
|
4ce1caa37e | ||
|
|
e565d86ed9 | ||
|
|
f1069a91f1 | ||
|
|
32411450d3 | ||
|
|
49ef624bd4 | ||
|
|
189d305a31 | ||
|
|
97a45e8e0a | ||
|
|
8c72b75e0e | ||
|
|
2cca9de690 | ||
|
|
6523fb0a1d | ||
|
|
8833aab1f1 | ||
|
|
7e9a54ced2 | ||
|
|
14a712260b | ||
|
|
d993c90c3e | ||
|
|
e73f5a841e | ||
|
|
9fcf50b61a | ||
|
|
337d8692c6 | ||
|
|
8cf54bb10f | ||
|
|
854ae94be6 | ||
|
|
aea52904d4 | ||
|
|
4704d4c18c | ||
|
|
2abb28bd8e | ||
|
|
011a5767a7 | ||
|
|
9fa67a8426 | ||
|
|
fb65570ce9 | ||
|
|
0901392f11 | ||
|
|
1359133050 | ||
|
|
b12577b506 | ||
|
|
b787d693b9 | ||
|
|
1f19dc2f5e | ||
|
|
4e638db2a7 | ||
|
|
db7d6ab7a2 | ||
|
|
1db58409ec | ||
|
|
ff9e54760a | ||
|
|
a15b899913 | ||
|
|
68a2880877 | ||
|
|
913c4e5d00 | ||
|
|
51f161c2e8 | ||
|
|
a49128337b | ||
|
|
4903f97de6 | ||
|
|
f87a689045 | ||
|
|
987d7c2b11 | ||
|
|
3550fe23d4 | ||
|
|
237abd6cef | ||
|
|
5e86d62433 | ||
|
|
4c71e42dd6 | ||
|
|
de793aa5fc | ||
|
|
58439c0936 | ||
|
|
ef76ab40e3 | ||
|
|
d2a3b91fe0 | ||
|
|
a370c61948 | ||
|
|
04ea5e8862 | ||
|
|
b411fec0c1 | ||
|
|
82368a06bf | ||
|
|
58a9fa9e0f | ||
|
|
bcb38e8718 | ||
|
|
59d2f6bdb0 | ||
|
|
989bb6f917 | ||
|
|
9c044ffc9a | ||
|
|
ce32e21597 | ||
|
|
2375121778 | ||
|
|
5e2543027d | ||
|
|
74afd10913 | ||
|
|
1ef16b4dba | ||
|
|
c1cc32b2f6 | ||
|
|
6c28a687ab |
No files matched your search
@@ -0,0 +1,19 @@
|
|||||||
|
# This is the universal Text Editor Configuration
|
||||||
|
# for all GTNewHorizons projects
|
||||||
|
# See: https://editorconfig.org/
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{bat,ini}]
|
||||||
|
end_of_line = crlf
|
||||||
|
|
||||||
|
[*.{dtd,json,info,mcmeta,md,sh,svg,xml,xsd,xsl,yaml,yml}]
|
||||||
|
indent_size = 2
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Ignore spotlessApply reformat
|
||||||
|
f1069a91f1b2ea9469775696c097dd6fb484e6e8
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
* text eol=lf
|
||||||
|
|
||||||
|
*.[jJ][aA][rR] binary
|
||||||
|
|
||||||
|
*.[pP][nN][gG] binary
|
||||||
|
*.[jJ][pP][gG] binary
|
||||||
|
*.[jJ][pP][eE][gG] binary
|
||||||
|
*.[gG][iI][fF] binary
|
||||||
|
*.[tT][iI][fF] binary
|
||||||
|
*.[tT][iI][fF][fF] binary
|
||||||
|
*.[iI][cC][oO] binary
|
||||||
|
*.[sS][vV][gG] text
|
||||||
|
*.[eE][pP][sS] binary
|
||||||
|
*.[xX][cC][fF] binary
|
||||||
|
|
||||||
|
*.[kK][aA][rR] binary
|
||||||
|
*.[mM]4[aA] binary
|
||||||
|
*.[mM][iI][dD] binary
|
||||||
|
*.[mM][iI][dD][iI] binary
|
||||||
|
*.[mM][pP]3 binary
|
||||||
|
*.[oO][gG][gG] binary
|
||||||
|
*.[rR][aA] binary
|
||||||
|
|
||||||
|
*.7[zZ] binary
|
||||||
|
*.[gG][zZ] binary
|
||||||
|
*.[tT][aA][rR] binary
|
||||||
|
*.[tT][gG][zZ] binary
|
||||||
|
*.[zZ][iI][pP] binary
|
||||||
|
|
||||||
|
*.[tT][cC][nN] binary
|
||||||
|
*.[sS][oO] binary
|
||||||
|
*.[dD][lL][lL] binary
|
||||||
|
*.[dD][yY][lL][iI][bB] binary
|
||||||
|
*.[pP][sS][dD] binary
|
||||||
|
*.[tT][tT][fF] binary
|
||||||
|
*.[oO][tT][fF] binary
|
||||||
|
|
||||||
|
*.[pP][aA][tT][cC][hH] -text
|
||||||
|
|
||||||
|
*.[bB][aA][tT] text eol=crlf
|
||||||
|
*.[cC][mM][dD] text eol=crlf
|
||||||
|
*.[pP][sS]1 text eol=crlf
|
||||||
|
|
||||||
|
*[aA][uU][tT][oO][gG][eE][nN][eE][rR][aA][tT][eE][dD]* binary
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
name: Build and test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ master, main, release/** ]
|
||||||
|
push:
|
||||||
|
branches: [ master, main, release/** ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-test:
|
||||||
|
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
|
||||||
|
secrets: inherit
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
name: Optimize images
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [ master, main, release/** ]
|
||||||
|
paths:
|
||||||
|
- "**/*.png"
|
||||||
|
|
||||||
|
push:
|
||||||
|
branches: [ master, main, release/** ]
|
||||||
|
paths:
|
||||||
|
- "**/*.png"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
optimize-images:
|
||||||
|
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||||
|
secrets: inherit
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
name: Release tagged build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: [ '*' ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-tags:
|
||||||
|
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
|
||||||
|
secrets: inherit
|
||||||
+28
-99
@@ -1,103 +1,32 @@
|
|||||||
# IntelliJ IDEA Files
|
.gradle
|
||||||
|
.settings
|
||||||
|
/.idea/
|
||||||
|
/run/
|
||||||
|
/build/
|
||||||
|
/eclipse/
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
/bin/
|
||||||
|
/config/
|
||||||
|
/crash-reports/
|
||||||
|
/logs/
|
||||||
|
options.txt
|
||||||
|
/saves/
|
||||||
|
usernamecache.json
|
||||||
|
banned-ips.json
|
||||||
|
banned-players.json
|
||||||
|
eula.txt
|
||||||
|
ops.json
|
||||||
|
server.properties
|
||||||
|
servers.dat
|
||||||
|
usercache.json
|
||||||
|
whitelist.json
|
||||||
|
/out/
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
*.ipr
|
||||||
*.iws
|
*.iws
|
||||||
out/
|
src/main/resources/mixins.*.json
|
||||||
.idea/
|
|
||||||
|
|
||||||
# Eclipse Project Files
|
|
||||||
.classpath
|
|
||||||
.project
|
|
||||||
.settings/
|
|
||||||
eclipse/
|
|
||||||
|
|
||||||
# Gradle
|
|
||||||
.gradle
|
|
||||||
gradle/
|
|
||||||
build/
|
|
||||||
debug/
|
|
||||||
bin/
|
|
||||||
config/
|
|
||||||
crash-reports/
|
|
||||||
logs/
|
|
||||||
mods/
|
|
||||||
saves/
|
|
||||||
usernamecache.json
|
|
||||||
options.txt
|
|
||||||
asm
|
|
||||||
Thumbs.db
|
|
||||||
|
|
||||||
## Windows
|
|
||||||
Thumbs.db
|
|
||||||
|
|
||||||
## gradle
|
|
||||||
/.gradle
|
|
||||||
/build
|
|
||||||
|
|
||||||
## ForgeGradle
|
|
||||||
/run
|
|
||||||
|
|
||||||
## eclipse
|
|
||||||
/.settings
|
|
||||||
/.metadata
|
|
||||||
/.classpath
|
|
||||||
/.project
|
|
||||||
/eclipse
|
|
||||||
/bin
|
|
||||||
|
|
||||||
## intellij
|
|
||||||
/out
|
|
||||||
/.idea
|
|
||||||
/atlassian-ide-plugin.xml
|
|
||||||
/*.ipr
|
|
||||||
/*.iws
|
|
||||||
/*.iml
|
|
||||||
|
|
||||||
## Private Stuffs
|
|
||||||
/private.properties
|
|
||||||
|
|
||||||
## Jars
|
|
||||||
*.jar
|
|
||||||
!/gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|
||||||
### OSX (adds a lot of garbage)###
|
|
||||||
.DS_Store
|
|
||||||
.AppleDouble
|
|
||||||
.LSOverride
|
|
||||||
|
|
||||||
# Icon must end with two \r
|
|
||||||
# Icon
|
|
||||||
|
|
||||||
|
|
||||||
# Thumbnails
|
|
||||||
._*
|
|
||||||
|
|
||||||
# Files that might appear in the root of a volume
|
|
||||||
.DocumentRevisions-V100
|
|
||||||
.fseventsd
|
|
||||||
.Spotlight-V100
|
|
||||||
.TemporaryItems
|
|
||||||
.Trashes
|
|
||||||
.VolumeIcon.icns
|
|
||||||
|
|
||||||
# Directories potentially created on remote AFP share
|
|
||||||
.AppleDB
|
|
||||||
.AppleDesktop
|
|
||||||
Network Trash Folder
|
|
||||||
Temporary Items
|
|
||||||
.apdisk
|
|
||||||
|
|
||||||
*.bat
|
*.bat
|
||||||
LICENSE*
|
*.DS_Store
|
||||||
forge*
|
!gradlew.bat
|
||||||
CREDITS*
|
layout.json
|
||||||
MinecraftForge*
|
|
||||||
README.txt
|
|
||||||
*.psd
|
|
||||||
*.pdn
|
|
||||||
|
|
||||||
/src/main/resources/assets/thaumcraft
|
|
||||||
|
|
||||||
##API
|
|
||||||
/src/api
|
|
||||||
/models
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
[submodule "src/api/java/thaumcraft/api"]
|
|
||||||
path = src/api/java/thaumcraft/api
|
|
||||||
url = https://github.com/Azanor/thaumcraft-api
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Any Github changes require admin approval
|
||||||
|
/.github/** @GTNewHorizons/admin
|
||||||
|
|
||||||
+3
-93
@@ -1,95 +1,5 @@
|
|||||||
buildscript {
|
//version: 1707058017
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
maven {
|
|
||||||
name = "forge"
|
|
||||||
url = "http://files.minecraftforge.net/maven"
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name = "sonatype"
|
|
||||||
url = "https://oss.sonatype.org/content/repositories/snapshots/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dependencies {
|
|
||||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
plugins {
|
||||||
maven {
|
id 'com.gtnewhorizons.gtnhconvention'
|
||||||
name = "forestry"
|
|
||||||
url = "http://maven.ic2.player.to/"
|
|
||||||
}
|
|
||||||
ivy {
|
|
||||||
name "Thaumcraft"
|
|
||||||
artifactPattern "https://dl.dropboxusercontent.com/u/47135879/[module]-deobf-${project.version_mc}-[revision].[ext]"
|
|
||||||
}
|
|
||||||
//ivy {
|
|
||||||
// name "Botania"
|
|
||||||
// artifactPattern "http://botaniamod.net/files/deobf/[module] [revision]-deobf.[ext]"
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'forge'
|
|
||||||
|
|
||||||
ext.version_mod = "${project.version_major}.${project.version_minor}.${project.version_rev}"
|
|
||||||
version = project.version_mc + "-" + project.version_mod
|
|
||||||
group= "magicbees" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
|
||||||
archivesBaseName = "magicbees"
|
|
||||||
|
|
||||||
sourceCompatibility = 1.6
|
|
||||||
targetCompatibility = 1.6
|
|
||||||
|
|
||||||
minecraft {
|
|
||||||
version = project.version_mc + "-" + project.version_forge
|
|
||||||
runDir = "."
|
|
||||||
|
|
||||||
replace '@VERSION@', project.version_mod
|
|
||||||
replace '@MCVERSION@', project.version_mc
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile "net.sengir.forestry:forestry_${project.version_mc}:${project.version_forestry}:api"
|
|
||||||
runtime "net.sengir.forestry:forestry_${project.version_mc}:${project.version_forestry}:dev"
|
|
||||||
//compile name: 'Botania', version: "${project.version_botania}", ext: 'jar'
|
|
||||||
//compile name: 'Baubles', version: "${project.version_baubles}", ext: 'jar'
|
|
||||||
//compile name: 'Thaumcraft', version: "${project.version_thaumcraft}", ext: 'jar'
|
|
||||||
}
|
|
||||||
|
|
||||||
processResources
|
|
||||||
{
|
|
||||||
// this will ensure that this task is redone when the versions change.
|
|
||||||
inputs.property "version", project.version
|
|
||||||
inputs.property "mcversion", project.minecraft.version
|
|
||||||
|
|
||||||
// replace stuff in mcmod.info, nothing else
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
|
||||||
include 'mcmod.info'
|
|
||||||
|
|
||||||
// replace version and mcversion
|
|
||||||
expand 'version':project.version, 'mcversion':project.minecraft.version
|
|
||||||
}
|
|
||||||
|
|
||||||
// copy everything else, thats not the mcmod.info
|
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
|
||||||
exclude 'mcmod.info'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
idea {
|
|
||||||
module {
|
|
||||||
inheritOutputDirs = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
task deobfJar(type: Jar) { // Generate deobfuscated
|
|
||||||
from sourceSets.main.output
|
|
||||||
classifier = 'deobf'
|
|
||||||
}
|
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives deobfJar
|
|
||||||
}
|
|
||||||
|
|
||||||
task fullBuild(dependsOn: ['build', 'deobfJar']) {
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// Add your dependencies here
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api('com.github.GTNewHorizons:ForestryMC:4.12.1:dev')
|
||||||
|
|
||||||
|
compileOnly('com.github.GTNewHorizons:BloodMagic:1.10.0:dev')
|
||||||
|
compileOnly('com.github.GTNewHorizons:ThaumicHorizons:1.9.0:dev')
|
||||||
|
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.3.0-GTNH:dev') {transitive = false}
|
||||||
|
compileOnly('com.github.GTNewHorizons:Botania:1.14.1-GTNH:api') {transitive = false}
|
||||||
|
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive = false}
|
||||||
|
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.55.13:dev')
|
||||||
|
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.8.0-GTNH:dev')
|
||||||
|
|
||||||
|
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:Baubles-Expanded:2.3.0-GTNH:dev') {transitive = false}
|
||||||
|
//runtimeOnlyNonPublishable('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive = false}
|
||||||
|
//runtimeOnlyNonPublishable('com.github.GTNewHorizons:GT5-Unofficial:5.09.55.13:dev')
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
2.4.3
|
|
||||||
false
|
|
||||||
Fixes a crash with EE3 integration.
|
|
||||||
+236
-9
@@ -1,11 +1,238 @@
|
|||||||
version_major=2
|
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
|
||||||
version_minor=5
|
# LOCAL to test local config updates.
|
||||||
version_rev=2
|
gtnh.settings.blowdryerTag = 0.2.0
|
||||||
|
|
||||||
version_forestry=4.2.+
|
# Human-readable mod name, available for mcmod.info population.
|
||||||
version_botania=r1.8-248
|
modName = Magic Bees
|
||||||
version_baubles=1.0.1.10
|
|
||||||
version_thaumcraft=4.2.3.5
|
|
||||||
|
|
||||||
version_mc=1.7.10
|
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||||
version_forge=10.13.4.1614-1.7.10
|
# Conventionally lowercase.
|
||||||
|
modId = MagicBees
|
||||||
|
|
||||||
|
# Root package of the mod, used to find various classes in other properties,
|
||||||
|
# mcmod.info substitution, enabling assertions in run tasks, etc.
|
||||||
|
modGroup = magicbees
|
||||||
|
|
||||||
|
# Whether to use modGroup as the maven publishing group.
|
||||||
|
# When false, com.github.GTNewHorizons is used.
|
||||||
|
useModGroupForPublishing = false
|
||||||
|
|
||||||
|
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||||
|
autoUpdateBuildScript = false
|
||||||
|
|
||||||
|
# Version of Minecraft to target
|
||||||
|
minecraftVersion = 1.7.10
|
||||||
|
|
||||||
|
# Version of Minecraft Forge to target
|
||||||
|
forgeVersion = 10.13.4.1614
|
||||||
|
|
||||||
|
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
|
||||||
|
channel = stable
|
||||||
|
|
||||||
|
# Specify an MCP mappings version for dependency deobfuscation and the deobfParams task.
|
||||||
|
mappingsVersion = 12
|
||||||
|
|
||||||
|
# Defines other MCP mappings for dependency deobfuscation.
|
||||||
|
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
|
||||||
|
|
||||||
|
# Select a default username for testing your mod. You can always override this per-run by running
|
||||||
|
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||||
|
developmentEnvironmentUserName = Developer
|
||||||
|
|
||||||
|
# Enables modern Java syntax support. Valid values:
|
||||||
|
# - false: No modern syntax, Java 8 only
|
||||||
|
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
||||||
|
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
||||||
|
# - modern: Native modern Java bytecode, no downgrading
|
||||||
|
enableModernJavaSyntax = false
|
||||||
|
|
||||||
|
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||||
|
# and should *not* be used in most situations. -1 disables this.
|
||||||
|
# forceToolchainVersion = -1
|
||||||
|
|
||||||
|
# Target JVM version for JVM Downgrader bytecode downgrading.
|
||||||
|
# Only used when enableModernJavaSyntax = jvmDowngrader
|
||||||
|
# downgradeTargetVersion = 8
|
||||||
|
|
||||||
|
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
|
||||||
|
# Classes will be available in META-INF/versions/N/ for each version N in this list.
|
||||||
|
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
|
||||||
|
# jvmDowngraderMultiReleaseVersions = 21,25
|
||||||
|
|
||||||
|
# Specifies how JVM Downgrader API stubs are provided. Options:
|
||||||
|
# - shade: Shade minimized stubs into the jar
|
||||||
|
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
|
||||||
|
# - external: Another dependency provides stubs (no constraint, no warning)
|
||||||
|
# - (empty): Warning reminding you to configure stubs
|
||||||
|
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
|
||||||
|
# jvmDowngraderStubsProvider =
|
||||||
|
|
||||||
|
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||||
|
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||||
|
enableGenericInjection = false
|
||||||
|
|
||||||
|
# Generate a class with a String field for the mod version named as defined below.
|
||||||
|
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
|
||||||
|
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
|
||||||
|
generateGradleTokenClass = magicbees.Tags
|
||||||
|
|
||||||
|
# Name of the token containing the project's current version to generate/replace.
|
||||||
|
gradleTokenVersion = VERSION
|
||||||
|
|
||||||
|
# [DEPRECATED] Mod ID replacement token.
|
||||||
|
gradleTokenModId =
|
||||||
|
|
||||||
|
# [DEPRECATED] Mod name replacement token.
|
||||||
|
gradleTokenModName =
|
||||||
|
|
||||||
|
# [DEPRECATED] Mod Group replacement token.
|
||||||
|
gradleTokenGroupName =
|
||||||
|
|
||||||
|
# [DEPRECATED]
|
||||||
|
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
|
||||||
|
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||||
|
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||||
|
# version in @Mod([...], version = VERSION, [...]).
|
||||||
|
# Leave these properties empty to skip individual token replacements.
|
||||||
|
replaceGradleTokenInFile =
|
||||||
|
|
||||||
|
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||||
|
# leave this property empty.
|
||||||
|
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
|
||||||
|
apiPackage = api
|
||||||
|
|
||||||
|
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
|
||||||
|
# There can be multiple files in a space-separated list.
|
||||||
|
# Example value: mymodid_at.cfg nei_at.cfg
|
||||||
|
accessTransformersFile =
|
||||||
|
|
||||||
|
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||||
|
usesMixins = false
|
||||||
|
|
||||||
|
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||||
|
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||||
|
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||||
|
separateMixinSourceSet =
|
||||||
|
|
||||||
|
# Adds some debug arguments like verbose output and class export.
|
||||||
|
usesMixinDebug = false
|
||||||
|
|
||||||
|
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||||
|
mixinPlugin =
|
||||||
|
|
||||||
|
# Specify the package that contains all of your Mixins. The package must exist or
|
||||||
|
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||||
|
# it must match with this or the build will fail.
|
||||||
|
mixinsPackage =
|
||||||
|
|
||||||
|
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||||
|
# This parameter is for legacy compatibility only
|
||||||
|
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
|
||||||
|
coreModClass =
|
||||||
|
|
||||||
|
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
|
||||||
|
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||||
|
containsMixinsAndOrCoreModOnly = false
|
||||||
|
|
||||||
|
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
|
||||||
|
forceEnableMixins = false
|
||||||
|
|
||||||
|
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated into your jar. It is your
|
||||||
|
# responsibility to check the license and request permission for distribution if required.
|
||||||
|
usesShadowedDependencies = false
|
||||||
|
|
||||||
|
# If disabled, won't remove unused classes from shadowed dependencies. Some libraries use reflection to access
|
||||||
|
# their own classes, making the minimization unreliable.
|
||||||
|
minimizeShadowedDependencies = true
|
||||||
|
|
||||||
|
# If disabled, won't rename the shadowed classes.
|
||||||
|
relocateShadowedDependencies = true
|
||||||
|
|
||||||
|
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||||
|
includeWellKnownRepositories = true
|
||||||
|
|
||||||
|
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||||
|
# list of strings, with the acceptable keys being(case does not matter):
|
||||||
|
# cursemaven
|
||||||
|
# modrinth
|
||||||
|
excludeWellKnownRepositories =
|
||||||
|
|
||||||
|
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||||
|
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||||
|
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||||
|
usesMavenPublishing = true
|
||||||
|
|
||||||
|
# Maven repository to publish the mod to.
|
||||||
|
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/
|
||||||
|
|
||||||
|
# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
|
||||||
|
#
|
||||||
|
# The project's ID on Modrinth. Can be either the slug or the ID.
|
||||||
|
# Leave this empty if you don't want to publish to Modrinth.
|
||||||
|
modrinthProjectId =
|
||||||
|
|
||||||
|
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
|
||||||
|
# Syntax: scope1-type1:name1;scope2-type2:name2;...
|
||||||
|
# Where scope can be one of [required, optional, incompatible, embedded],
|
||||||
|
# type can be one of [project, version],
|
||||||
|
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||||
|
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||||
|
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||||
|
modrinthRelations =
|
||||||
|
|
||||||
|
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||||
|
#
|
||||||
|
# The project's numeric ID on CurseForge. You can find this in the About Project box.
|
||||||
|
# Leave this empty if you don't want to publish on CurseForge.
|
||||||
|
curseForgeProjectId =
|
||||||
|
|
||||||
|
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||||
|
# Syntax: type1:name1;type2:name2;...
|
||||||
|
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
|
||||||
|
# and the name is the CurseForge project slug of the other mod.
|
||||||
|
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
|
||||||
|
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||||
|
curseForgeRelations =
|
||||||
|
|
||||||
|
# Optional parameter to customize the produced artifacts. Use this to preserve artifact naming when migrating older
|
||||||
|
# projects. New projects should not use this parameter.
|
||||||
|
customArchiveBaseName = magicbees
|
||||||
|
|
||||||
|
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||||
|
# runClientWorkingDirectory = run/client
|
||||||
|
|
||||||
|
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||||
|
# runServerWorkingDirectory = run/server
|
||||||
|
|
||||||
|
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||||
|
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||||
|
# The check is ONLY performed if the version is a git tag.
|
||||||
|
# Note: the specified string must be escaped, so e.g. 1\\.1\\.\\d+ instead of 1\.1\.\d+
|
||||||
|
# versionPattern =
|
||||||
|
|
||||||
|
# Uncomment to prevent the source code from being published.
|
||||||
|
# noPublishedSources = true
|
||||||
|
|
||||||
|
# Uncomment this to disable Spotless checks.
|
||||||
|
# This should only be uncommented to keep it easier to sync with upstream/other forks.
|
||||||
|
# That is, if there is no other active fork/upstream, NEVER change this.
|
||||||
|
# disableSpotless = true
|
||||||
|
|
||||||
|
# Uncomment this to disable Checkstyle checks (currently wildcard import check).
|
||||||
|
# disableCheckstyle = true
|
||||||
|
|
||||||
|
# Override the IDEA build type. Valid values are: "" (leave blank, do not override), "idea" (force use native IDEA build), "gradle"
|
||||||
|
# (force use delegated build).
|
||||||
|
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||||
|
# e.g. add "systemProp.org.gradle.project.ideaOverrideBuildType=idea" will override the build type to be native build.
|
||||||
|
# WARNING: If you do use this option, it will overwrite whatever you have in your existing projects. This might not be what you want!
|
||||||
|
# Usually there is no need to uncomment this here as other developers do not necessarily use the same build type as you.
|
||||||
|
# ideaOverrideBuildType = idea
|
||||||
|
|
||||||
|
# Whether IDEA should run spotless checks when pressing the Build button.
|
||||||
|
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||||
|
# ideaCheckSpotlessOnBuild = true
|
||||||
|
|
||||||
|
# Non-GTNH properties
|
||||||
|
org.gradle.configuration-cache = true
|
||||||
|
org.gradle.parallel = true
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#This file is generated by updateDaemonJvm
|
||||||
|
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||||
|
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||||
|
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||||
|
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||||
|
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/d4fd992c9557644e637ebe98263e0ae7/redirect
|
||||||
|
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
|
||||||
|
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||||
|
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/cd495626d2ee49a75447e3fdc6afb287/redirect
|
||||||
|
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3689d0bcdd77ac01674ba3c9dbbe94d0/redirect
|
||||||
|
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/8e1d9ee5d0f13e442218f6884a306da1/redirect
|
||||||
|
toolchainVersion=25
|
||||||
Vendored
BIN
Binary file not shown.
+3
-2
@@ -1,6 +1,7 @@
|
|||||||
#Wed Jul 02 15:54:47 CDT 2014
|
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip
|
|
||||||
@@ -1,79 +1,128 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
#
|
||||||
## Gradle start up script for UN*X
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
##
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Attempt to set APP_HOME
|
||||||
DEFAULT_JVM_OPTS=""
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
# Resolve links: $0 may be a link
|
||||||
APP_BASE_NAME=`basename "$0"`
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD=maximum
|
||||||
|
|
||||||
warn () {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
case "`uname`" in
|
nonstop=false
|
||||||
CYGWIN* )
|
case "$( uname )" in #(
|
||||||
cygwin=true
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
;;
|
Darwin* ) darwin=true ;; #(
|
||||||
Darwin* )
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
darwin=true
|
NONSTOP* ) nonstop=true ;;
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
|
||||||
if $cygwin ; then
|
|
||||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
PRG="$0"
|
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
|
||||||
ls=`ls -ld "$PRG"`
|
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
|
||||||
PRG="$link"
|
|
||||||
else
|
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >&-
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >&-
|
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
else
|
else
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
@@ -82,83 +131,118 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD="java"
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
case $MAX_FD in #(
|
||||||
if [ $? -eq 0 ] ; then
|
max*)
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
ulimit -n $MAX_FD
|
warn "Could not query maximum file descriptor limit"
|
||||||
if [ $? -ne 0 ] ; then
|
esac
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
case $MAX_FD in #(
|
||||||
fi
|
'' | soft) :;; #(
|
||||||
else
|
*)
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
fi
|
# shellcheck disable=SC2039,SC3045
|
||||||
fi
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
# For Darwin, add options to specify how the application appears in the dock
|
|
||||||
if $darwin; then
|
|
||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Cygwin, switch paths to Windows format before running java
|
|
||||||
if $cygwin ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
SEP=""
|
|
||||||
for dir in $ROOTDIRSRAW ; do
|
|
||||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
||||||
SEP="|"
|
|
||||||
done
|
|
||||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
||||||
# Add a user-defined pattern to the cygpath arguments
|
|
||||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
||||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
||||||
fi
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
i=0
|
|
||||||
for arg in "$@" ; do
|
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
||||||
else
|
|
||||||
eval `echo args$i`="\"$arg\""
|
|
||||||
fi
|
|
||||||
i=$((i+1))
|
|
||||||
done
|
|
||||||
case $i in
|
|
||||||
(0) set -- ;;
|
|
||||||
(1) set -- "$args0" ;;
|
|
||||||
(2) set -- "$args0" "$args1" ;;
|
|
||||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
|
||||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
||||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
||||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
||||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
||||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
||||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
function splitJvmOpts() {
|
# * args from the command line
|
||||||
JVM_OPTS=("$@")
|
# * the main class name
|
||||||
}
|
# * -classpath
|
||||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
# * -D...appname settings
|
||||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Collect all arguments for the java command:
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||||
|
# and any embedded shellness will be escaped.
|
||||||
|
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||||
|
# treated as '${Hostname}' itself on the command line.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
||||||
Vendored
+44
-41
@@ -1,3 +1,21 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@@ -8,26 +26,30 @@
|
|||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
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
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@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="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto init
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -35,54 +57,35 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto init
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
||||||
echo.
|
echo. 1>&2
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||||
echo location of your Java installation.
|
echo location of your Java installation. 1>&2
|
||||||
|
|
||||||
goto fail
|
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
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@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%
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
// Add any additional repositories for your dependencies here
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
|
||||||
|
pluginManagement {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
// RetroFuturaGradle
|
||||||
|
name "GTNH Maven"
|
||||||
|
url "https://nexus.gtnewhorizons.com/repository/public/"
|
||||||
|
mavenContent {
|
||||||
|
includeGroup("com.gtnewhorizons")
|
||||||
|
includeGroupByRegex("com\\.gtnewhorizons\\..+")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gradlePluginPortal()
|
||||||
|
mavenCentral()
|
||||||
|
mavenLocal()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Submodule src/api/java/thaumcraft/api deleted from 4120e665c9.
@@ -2,8 +2,8 @@ package magicbees.api;
|
|||||||
|
|
||||||
import magicbees.api.bees.ITransmutationEffectController;
|
import magicbees.api.bees.ITransmutationEffectController;
|
||||||
|
|
||||||
public class MagicBeesAPI
|
public class MagicBeesAPI {
|
||||||
{
|
|
||||||
// Use this object during or after the Mod.Init phase to add your logic to the Transmutation bee effect.
|
// Use this object during or after the Mod.Init phase to add your logic to the Transmutation bee effect.
|
||||||
public static ITransmutationEffectController transmutationEffectController;
|
public static ITransmutationEffectController transmutationEffectController;
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,5 @@ package magicbees.api.bees;
|
|||||||
public enum AuraChargeType {
|
public enum AuraChargeType {
|
||||||
MUTATION,
|
MUTATION,
|
||||||
DEATH,
|
DEATH,
|
||||||
PRODUCTION,
|
PRODUCTION,;
|
||||||
;
|
|
||||||
}
|
}
|
||||||
@@ -1,44 +1,40 @@
|
|||||||
package magicbees.api.bees;
|
package magicbees.api.bees;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows a tile entity to provide a Magic Apiary with 'aura' to boost bee production, mutation rate,
|
* Allows a tile entity to provide a Magic Apiary with 'aura' to boost bee production, mutation rate, or decrease bee
|
||||||
* or decrease bee lifespan.
|
* lifespan.
|
||||||
*
|
*
|
||||||
* @author MysteriousAges
|
* @author MysteriousAges
|
||||||
*/
|
*/
|
||||||
public interface IMagicApiaryAuraProvider {
|
public interface IMagicApiaryAuraProvider {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||||
* aura provider should decrement its internal charge by one. If there are no
|
* internal charge by one. If there are no charges remaining, it should return false.
|
||||||
* charges remaining, it should return false.
|
|
||||||
*
|
*
|
||||||
* @return True if a charge is given; false otherwise.
|
* @return True if a charge is given; false otherwise.
|
||||||
*/
|
*/
|
||||||
boolean getMutationCharge();
|
boolean getMutationCharge();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||||
* aura provider should decrement its internal charge by one. If there are no
|
* internal charge by one. If there are no charges remaining, it should return false.
|
||||||
* charges remaining, it should return false.
|
|
||||||
*
|
*
|
||||||
* @return True if a charge is given; false otherwise.
|
* @return True if a charge is given; false otherwise.
|
||||||
*/
|
*/
|
||||||
boolean getDeathRateCharge();
|
boolean getDeathRateCharge();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||||
* aura provider should decrement its internal charge by one. If there are no
|
* internal charge by one. If there are no charges remaining, it should return false.
|
||||||
* charges remaining, it should return false.
|
|
||||||
*
|
*
|
||||||
* @return True if a charge is given; false otherwise.
|
* @return True if a charge is given; false otherwise.
|
||||||
*/
|
*/
|
||||||
boolean getProductionCharge();
|
boolean getProductionCharge();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests a mutation charge from the aura provider. If true is returned, the
|
* Requests a mutation charge from the aura provider. If true is returned, the aura provider should decrement its
|
||||||
* aura provider should decrement its internal charge by one. If there are no
|
* internal charge by one. If there are no charges remaining, it should return false.
|
||||||
* charges remaining, it should return false.
|
|
||||||
*
|
*
|
||||||
* @return True if a charge is given; false otherwise.
|
* @return True if a charge is given; false otherwise.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package magicbees.api.bees;
|
package magicbees.api.bees;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manages adding custom ITransmutationEffectLogic instances into the bee effect
|
* Manages adding custom ITransmutationEffectLogic instances into the bee effect system.
|
||||||
* system.
|
|
||||||
*
|
*
|
||||||
* @author MysteriousAges
|
* @author MysteriousAges
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface ITransmutationEffectController
|
public interface ITransmutationEffectController {
|
||||||
{
|
|
||||||
public void addEffectLogic(ITransmutationEffectLogic logic);
|
|
||||||
|
|
||||||
|
public void addEffectLogic(ITransmutationEffectLogic logic);
|
||||||
}
|
}
|
||||||
@@ -5,20 +5,18 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to control plugin logic for the Transmutation bee effect. Turns blocks
|
* Class to control plugin logic for the Transmutation bee effect. Turns blocks into other blocks based on biome, time
|
||||||
* into other blocks based on biome, time of day, or whatever is deemed
|
* of day, or whatever is deemed appropriate at the time.
|
||||||
* appropriate at the time.
|
|
||||||
*
|
*
|
||||||
* @author MysteriousAges
|
* @author MysteriousAges
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface ITransmutationEffectLogic
|
public interface ITransmutationEffectLogic {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Allows an external mod to add transmutation logic to the Transmuting bee effect.
|
* Allows an external mod to add transmutation logic to the Transmuting bee effect. Called from a list of
|
||||||
* Called from a list of ITransmutationEffectLogic until one returns true. You can
|
* ITransmutationEffectLogic until one returns true. You can implement more than one transmutation effect in a
|
||||||
* implement more than one transmutation effect in a single implementation of the
|
* single implementation of the interface. Function checks for a series of conditions based on block ID/meta, or
|
||||||
* interface. Function checks for a series of conditions based on block ID/meta, or
|
|
||||||
* biome information, or world information.
|
* biome information, or world information.
|
||||||
*
|
*
|
||||||
* @param world World object
|
* @param world World object
|
||||||
|
|||||||
@@ -1,5 +1,17 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.potion.Potion;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
|
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||||
|
import forestry.api.genetics.AlleleManager;
|
||||||
|
import forestry.api.genetics.IAllele;
|
||||||
|
import forestry.api.genetics.IAlleleEffect;
|
||||||
|
import forestry.api.genetics.IAlleleFlowers;
|
||||||
|
import forestry.api.genetics.IAlleleRegistry;
|
||||||
|
import forestry.api.genetics.IChromosomeType;
|
||||||
|
import forestry.api.genetics.IFlowerProvider;
|
||||||
import magicbees.api.MagicBeesAPI;
|
import magicbees.api.MagicBeesAPI;
|
||||||
import magicbees.bees.allele.effect.AlleleEffectCrumbling;
|
import magicbees.bees.allele.effect.AlleleEffectCrumbling;
|
||||||
import magicbees.bees.allele.effect.AlleleEffectCure;
|
import magicbees.bees.allele.effect.AlleleEffectCure;
|
||||||
@@ -27,20 +39,8 @@ import magicbees.main.utils.compat.ArsMagicaHelper;
|
|||||||
import magicbees.main.utils.compat.BotaniaHelper;
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
import magicbees.main.utils.compat.ThermalModsHelper;
|
import magicbees.main.utils.compat.ThermalModsHelper;
|
||||||
import net.minecraft.potion.Potion;
|
|
||||||
import thaumcraft.api.nodes.NodeType;
|
import thaumcraft.api.nodes.NodeType;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
|
||||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
|
||||||
import forestry.api.genetics.AlleleManager;
|
|
||||||
import forestry.api.genetics.IAllele;
|
|
||||||
import forestry.api.genetics.IAlleleEffect;
|
|
||||||
import forestry.api.genetics.IAlleleFlowers;
|
|
||||||
import forestry.api.genetics.IAlleleRegistry;
|
|
||||||
import forestry.api.genetics.IChromosomeType;
|
|
||||||
import forestry.api.genetics.IFlowerProvider;
|
|
||||||
|
|
||||||
public class Allele implements IAllele {
|
public class Allele implements IAllele {
|
||||||
|
|
||||||
private static final String FLOWER_ARS_MAGICA_PLANT = "flowerArsMagicaPlant";
|
private static final String FLOWER_ARS_MAGICA_PLANT = "flowerArsMagicaPlant";
|
||||||
@@ -123,50 +123,33 @@ public class Allele implements IAllele {
|
|||||||
|
|
||||||
TransmutationEffectController controller = new TransmutationEffectController(
|
TransmutationEffectController controller = new TransmutationEffectController(
|
||||||
new TransmutationEffectRailcraft(),
|
new TransmutationEffectRailcraft(),
|
||||||
new TransmutationEffectVanilla()
|
new TransmutationEffectVanilla());
|
||||||
);
|
|
||||||
MagicBeesAPI.transmutationEffectController = controller;
|
MagicBeesAPI.transmutationEffectController = controller;
|
||||||
effectTransmuting = new AlleleEffectTransmuting("Transmuting", true, controller, 200);
|
effectTransmuting = new AlleleEffectTransmuting("Transmuting", true, controller, 200);
|
||||||
effectCrumbling = new AlleleEffectCrumbling("Crumbling", true);
|
effectCrumbling = new AlleleEffectCrumbling("Crumbling", true);
|
||||||
|
|
||||||
effectInvisibility = new AlleleEffectPotion("Invisibility", Potion.invisibility, 10, false);
|
effectInvisibility = new AlleleEffectPotion("Invisibility", Potion.invisibility, 10, false);
|
||||||
|
|
||||||
spawnGhast = new AlleleEffectSpawnMob("Ghastly", false, "Ghast", "mob.ghast.moan")
|
spawnGhast = new AlleleEffectSpawnMob("Ghastly", false, "Ghast", "mob.ghast.moan").setThrottle(2060)
|
||||||
.setThrottle(2060)
|
.setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
|
||||||
.setChanceToSpawn(10)
|
spawnSpider = new AlleleEffectSpawnMob("Spidery", false, "Spider", "mob.spider.step").setThrottle(400)
|
||||||
.setMaxMobsInSpawnZone(1);
|
.setChanceToSpawn(70).setMaxMobsInSpawnZone(4);
|
||||||
spawnSpider = new AlleleEffectSpawnMob("Spidery", false, "Spider", "mob.spider.step")
|
spawnBlaze = new AlleleEffectSpawnMob("Ablaze", false, "Blaze", "mob.blaze.breathe").setThrottle(800)
|
||||||
.setThrottle(400)
|
.setChanceToSpawn(60).setMaxMobsInSpawnZone(2);
|
||||||
.setChanceToSpawn(70)
|
spawnWolf = new AlleleEffectSpawnMob("Canine", false, "Wolf", "mob.wolf.panting").setThrottle(650)
|
||||||
|
.setChanceToSpawn(40).setMaxMobsInSpawnZone(2);
|
||||||
|
spawnPig = new AlleleEffectSpawnMob("Porcine", true, "Pig", "mob.pig.say").setThrottle(350)
|
||||||
.setMaxMobsInSpawnZone(4);
|
.setMaxMobsInSpawnZone(4);
|
||||||
spawnBlaze = new AlleleEffectSpawnMob("Ablaze", false, "Blaze", "mob.blaze.breathe")
|
spawnCow = new AlleleEffectSpawnMob("Bovine", true, "Cow", "mob.cow.say").setThrottle(640)
|
||||||
.setThrottle(800)
|
|
||||||
.setChanceToSpawn(60)
|
|
||||||
.setMaxMobsInSpawnZone(2);
|
|
||||||
spawnWolf = new AlleleEffectSpawnMob("Canine", false , "Wolf", "mob.wolf.panting")
|
|
||||||
.setThrottle(650)
|
|
||||||
.setChanceToSpawn(40)
|
|
||||||
.setMaxMobsInSpawnZone(2);
|
|
||||||
spawnPig = new AlleleEffectSpawnMob("Porcine", true, "Pig", "mob.pig.say")
|
|
||||||
.setThrottle(350)
|
|
||||||
.setMaxMobsInSpawnZone(4);
|
|
||||||
spawnCow = new AlleleEffectSpawnMob("Bovine", true, "Cow", "mob.cow.say")
|
|
||||||
.setThrottle(640)
|
|
||||||
.setMaxMobsInSpawnZone(3);
|
.setMaxMobsInSpawnZone(3);
|
||||||
spawnChicken = new AlleleEffectSpawnMob("Chicken", true, "Chicken", "mob.chicken.hurt")
|
spawnChicken = new AlleleEffectSpawnMob("Chicken", true, "Chicken", "mob.chicken.hurt").setThrottle(20)
|
||||||
.setThrottle(20)
|
|
||||||
.setMaxMobsInSpawnZone(20);
|
.setMaxMobsInSpawnZone(20);
|
||||||
spawnSheep = new AlleleEffectSpawnMob("Sheep", false, "Sheep", "mob.sheep.say")
|
spawnSheep = new AlleleEffectSpawnMob("Sheep", false, "Sheep", "mob.sheep.say").setThrottle(450)
|
||||||
.setThrottle(450)
|
|
||||||
.setMaxMobsInSpawnZone(5);
|
.setMaxMobsInSpawnZone(5);
|
||||||
spawnCat = new AlleleEffectSpawnMob("Catty", false, "Ozelot", "mob.cat.meow")
|
spawnCat = new AlleleEffectSpawnMob("Catty", false, "Ozelot", "mob.cat.meow").setThrottle(702)
|
||||||
.setThrottle(702)
|
.setChanceToSpawn(60).setMaxMobsInSpawnZone(2);
|
||||||
.setChanceToSpawn(60)
|
spawnHorse = new AlleleEffectSpawnMob("Horse", false, "EntityHorse", "mob.horse.idle").setThrottle(450)
|
||||||
.setMaxMobsInSpawnZone(2);
|
.setChanceToSpawn(59).setMaxMobsInSpawnZone(2);
|
||||||
spawnHorse = new AlleleEffectSpawnMob("Horse", false, "EntityHorse", "mob.horse.idle")
|
|
||||||
.setThrottle(450)
|
|
||||||
.setChanceToSpawn(59)
|
|
||||||
.setMaxMobsInSpawnZone(2);
|
|
||||||
|
|
||||||
if (ThaumcraftHelper.isActive()) {
|
if (ThaumcraftHelper.isActive()) {
|
||||||
flowerThaumcraft = new AlleleFlower(FLOWERS_THAUMCRAFT_PLANT, new FlowerProviderThaumcraftFlower(), false);
|
flowerThaumcraft = new AlleleFlower(FLOWERS_THAUMCRAFT_PLANT, new FlowerProviderThaumcraftFlower(), false);
|
||||||
@@ -175,30 +158,38 @@ public class Allele implements IAllele {
|
|||||||
effectVisRecharge = new AlleleEffectRecharge(EFFECT_VIS_RECHARGE, false);
|
effectVisRecharge = new AlleleEffectRecharge(EFFECT_VIS_RECHARGE, false);
|
||||||
effectNodeEmpower = new AlleleEffectEmpowering(EFFECT_NODE_EMPOWER, false);
|
effectNodeEmpower = new AlleleEffectEmpowering(EFFECT_NODE_EMPOWER, false);
|
||||||
effectNodeRepair = new AlleleEffectNodeRepair(EFFECT_NODE_REPAIR, false);
|
effectNodeRepair = new AlleleEffectNodeRepair(EFFECT_NODE_REPAIR, false);
|
||||||
effectNodeConversionTaint = new AlleleEffectNodeConversion(EFFECT_NODE_TAINTING, NodeType.TAINTED, false, 250);
|
effectNodeConversionTaint = new AlleleEffectNodeConversion(
|
||||||
|
EFFECT_NODE_TAINTING,
|
||||||
|
NodeType.TAINTED,
|
||||||
|
false,
|
||||||
|
250);
|
||||||
effectNodeConversionPure = new AlleleEffectNodeConversion(EFFECT_NODE_PURIFYING, NodeType.PURE, false, 250);
|
effectNodeConversionPure = new AlleleEffectNodeConversion(EFFECT_NODE_PURIFYING, NodeType.PURE, false, 250);
|
||||||
effectNodeConversionHungry = new AlleleEffectNodeConversion(EFFECT_NODE_RAVENING, NodeType.HUNGRY, false, 2);
|
effectNodeConversionHungry = new AlleleEffectNodeConversion(
|
||||||
|
EFFECT_NODE_RAVENING,
|
||||||
|
NodeType.HUNGRY,
|
||||||
|
false,
|
||||||
|
2);
|
||||||
|
|
||||||
spawnBrainyZombie = new AlleleEffectSpawnMob(EFFECT_BRAINY, false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID)
|
spawnBrainyZombie = new AlleleEffectSpawnMob(
|
||||||
.setAggrosPlayerOnSpawn()
|
EFFECT_BRAINY,
|
||||||
.setThrottle(800)
|
false,
|
||||||
.setSpawnsOnPlayerNear(null)
|
ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID).setAggrosPlayerOnSpawn().setThrottle(800)
|
||||||
.setMaxMobsInSpawnZone(2);
|
.setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||||
|
|
||||||
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, ThaumcraftHelper.Entity.FIREBAT.entityID)
|
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, ThaumcraftHelper.Entity.FIREBAT.entityID)
|
||||||
.setThrottle(300)
|
.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||||
.setSpawnsOnPlayerNear("Bat");
|
|
||||||
|
|
||||||
spawnWisp = new AlleleEffectSpawnWisp(EFFECT_WISPY, false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive")
|
spawnWisp = new AlleleEffectSpawnWisp(
|
||||||
.setThrottle(1800)
|
EFFECT_WISPY,
|
||||||
.setChanceToSpawn(79);
|
false,
|
||||||
}
|
ThaumcraftHelper.Entity.WISP.entityID,
|
||||||
else {
|
"thaumcraft.wisplive").setThrottle(1800).setChanceToSpawn(79);
|
||||||
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, "Bat")
|
} else {
|
||||||
.setThrottle(150);
|
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, "Bat").setThrottle(150);
|
||||||
|
|
||||||
flowerThaumcraft = new AlleleFlower(FLOWERS_THAUMCRAFT_PLANT, vanillaFlowers, false);
|
flowerThaumcraft = new AlleleFlower(FLOWERS_THAUMCRAFT_PLANT, vanillaFlowers, false);
|
||||||
flowerAuraNode = new AlleleFlower(FLOWERS_AURA_NODE, vanillaFlowers, true);Allele.effectVisRecharge = new AlleleEffectRecharge(EFFECT_VIS_RECHARGE, false);
|
flowerAuraNode = new AlleleFlower(FLOWERS_AURA_NODE, vanillaFlowers, true);
|
||||||
|
Allele.effectVisRecharge = new AlleleEffectRecharge(EFFECT_VIS_RECHARGE, false);
|
||||||
effectNodeEmpower = new AlleleEffectPlaceholder(EFFECT_NODE_EMPOWER, false);
|
effectNodeEmpower = new AlleleEffectPlaceholder(EFFECT_NODE_EMPOWER, false);
|
||||||
effectNodeRepair = new AlleleEffectPlaceholder(EFFECT_NODE_REPAIR, false);
|
effectNodeRepair = new AlleleEffectPlaceholder(EFFECT_NODE_REPAIR, false);
|
||||||
effectNodeConversionTaint = new AlleleEffectPlaceholder(EFFECT_NODE_TAINTING, false);
|
effectNodeConversionTaint = new AlleleEffectPlaceholder(EFFECT_NODE_TAINTING, false);
|
||||||
@@ -210,27 +201,32 @@ public class Allele implements IAllele {
|
|||||||
|
|
||||||
if (BotaniaHelper.isActive()) {
|
if (BotaniaHelper.isActive()) {
|
||||||
flowerBotania = new AlleleFlower(FLOWER_BOTANIA, new FlowerProviderBotania(), true);
|
flowerBotania = new AlleleFlower(FLOWER_BOTANIA, new FlowerProviderBotania(), true);
|
||||||
effectDreaming = new AlleleEffectTransmuting(EFFECT_DREAMING, false,
|
effectDreaming = new AlleleEffectTransmuting(
|
||||||
new TransmutationEffectController(new TransmutationEffectLBotaniaLiving()), 100);
|
EFFECT_DREAMING,
|
||||||
}
|
false,
|
||||||
else {
|
new TransmutationEffectController(new TransmutationEffectLBotaniaLiving()),
|
||||||
|
100);
|
||||||
|
} else {
|
||||||
flowerBotania = new AlleleFlower(FLOWER_BOTANIA, vanillaFlowers, true);
|
flowerBotania = new AlleleFlower(FLOWER_BOTANIA, vanillaFlowers, true);
|
||||||
effectDreaming = new AlleleEffectPlaceholder(EFFECT_DREAMING, false);
|
effectDreaming = new AlleleEffectPlaceholder(EFFECT_DREAMING, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ArsMagicaHelper.isActive()) {
|
if (ArsMagicaHelper.isActive()) {
|
||||||
flowerArsMagica = new AlleleFlower(FLOWER_ARS_MAGICA_PLANT, new FlowerProviderArsMagicaFlower(), false);
|
flowerArsMagica = new AlleleFlower(FLOWER_ARS_MAGICA_PLANT, new FlowerProviderArsMagicaFlower(), false);
|
||||||
spawnManaDrainer = new AlleleEffectSpawnMobWeighted(EFFECT_MANA_DRAIN, true, 20,
|
spawnManaDrainer = new AlleleEffectSpawnMobWeighted(
|
||||||
|
EFFECT_MANA_DRAIN,
|
||||||
|
true,
|
||||||
|
20,
|
||||||
new String[] { ArsMagicaHelper.Name + ".MobManaCreeper", ArsMagicaHelper.Name + ".ManaVortex" },
|
new String[] { ArsMagicaHelper.Name + ".MobManaCreeper", ArsMagicaHelper.Name + ".ManaVortex" },
|
||||||
new int[] { 60, 2 }
|
new int[] { 60, 2 });
|
||||||
);
|
|
||||||
|
|
||||||
spawnWispOrHecate = new AlleleEffectSpawnMobWeighted(EFFECT_AM_WISP, true, 20,
|
spawnWispOrHecate = new AlleleEffectSpawnMobWeighted(
|
||||||
|
EFFECT_AM_WISP,
|
||||||
|
true,
|
||||||
|
20,
|
||||||
new String[] { ArsMagicaHelper.Name + ".MobWisp", ArsMagicaHelper.Name + ".MobHecate" },
|
new String[] { ArsMagicaHelper.Name + ".MobWisp", ArsMagicaHelper.Name + ".MobHecate" },
|
||||||
new int[] { 40, 3 }
|
new int[] { 40, 3 });
|
||||||
);
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
flowerArsMagica = new AlleleFlower(FLOWER_ARS_MAGICA_PLANT, vanillaFlowers, false);
|
flowerArsMagica = new AlleleFlower(FLOWER_ARS_MAGICA_PLANT, vanillaFlowers, false);
|
||||||
spawnManaDrainer = new AlleleEffectPlaceholder(EFFECT_MANA_DRAIN, true);
|
spawnManaDrainer = new AlleleEffectPlaceholder(EFFECT_MANA_DRAIN, true);
|
||||||
spawnWispOrHecate = new AlleleEffectPlaceholder(EFFECT_AM_WISP, true);
|
spawnWispOrHecate = new AlleleEffectPlaceholder(EFFECT_AM_WISP, true);
|
||||||
@@ -238,17 +234,22 @@ public class Allele implements IAllele {
|
|||||||
|
|
||||||
// TODO TE spawning
|
// TODO TE spawning
|
||||||
if (ThermalModsHelper.isActive()) {
|
if (ThermalModsHelper.isActive()) {
|
||||||
spawnBlizz = new AlleleEffectSpawnMob(EFFECT_TE_BLIZZY, true, ThermalModsHelper.Entity.BLIZZ.entityID, ThermalModsHelper.Entity.BLIZZ.soundName)
|
spawnBlizz = new AlleleEffectSpawnMob(
|
||||||
.setThrottle(100)
|
EFFECT_TE_BLIZZY,
|
||||||
.setChanceToSpawn(80);
|
true,
|
||||||
spawnBlitz = new AlleleEffectSpawnMob(EFFECT_TE_BLITZ, true, ThermalModsHelper.Entity.BLITZ.entityID, ThermalModsHelper.Entity.BLITZ.soundName)
|
ThermalModsHelper.Entity.BLIZZ.entityID,
|
||||||
.setThrottle(100)
|
ThermalModsHelper.Entity.BLIZZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||||
.setChanceToSpawn(80);
|
spawnBlitz = new AlleleEffectSpawnMob(
|
||||||
spawnBasalz = new AlleleEffectSpawnMob(EFFECT_TE_BASALZ, true, ThermalModsHelper.Entity.BASALZ.entityID, ThermalModsHelper.Entity.BASALZ.soundName)
|
EFFECT_TE_BLITZ,
|
||||||
.setThrottle(100)
|
true,
|
||||||
.setChanceToSpawn(80);
|
ThermalModsHelper.Entity.BLITZ.entityID,
|
||||||
}
|
ThermalModsHelper.Entity.BLITZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||||
else {
|
spawnBasalz = new AlleleEffectSpawnMob(
|
||||||
|
EFFECT_TE_BASALZ,
|
||||||
|
true,
|
||||||
|
ThermalModsHelper.Entity.BASALZ.entityID,
|
||||||
|
ThermalModsHelper.Entity.BASALZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||||
|
} else {
|
||||||
spawnBlizz = new AlleleEffectPlaceholder(EFFECT_TE_BLIZZY, true);
|
spawnBlizz = new AlleleEffectPlaceholder(EFFECT_TE_BLIZZY, true);
|
||||||
spawnBlitz = new AlleleEffectPlaceholder(EFFECT_TE_BLITZ, true);
|
spawnBlitz = new AlleleEffectPlaceholder(EFFECT_TE_BLITZ, true);
|
||||||
spawnBasalz = new AlleleEffectPlaceholder(EFFECT_TE_BASALZ, true);
|
spawnBasalz = new AlleleEffectPlaceholder(EFFECT_TE_BASALZ, true);
|
||||||
@@ -262,18 +263,25 @@ public class Allele implements IAllele {
|
|||||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodePurify", effectNodeConversionPure);
|
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodePurify", effectNodeConversionPure);
|
||||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", effectNodeConversionTaint);
|
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", effectNodeConversionTaint);
|
||||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", effectNodeEmpower);
|
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", effectNodeEmpower);
|
||||||
registry.registerDeprecatedAlleleReplacement("magicbees.speciesTCAttractive", BeeSpecies.TC_EMPOWERING.getSpecies());
|
registry.registerDeprecatedAlleleReplacement(
|
||||||
registry.registerDeprecatedAlleleReplacement("magicbees.speciesBMBloodyBMBloody", BeeSpecies.EARTHY.getSpecies());
|
"magicbees.speciesTCAttractive",
|
||||||
registry.registerDeprecatedAlleleReplacement("magicbees.speciesBMBloodyBMBound", BeeSpecies.ARCANE.getSpecies());
|
BeeSpecies.TC_EMPOWERING.getSpecies());
|
||||||
|
registry.registerDeprecatedAlleleReplacement(
|
||||||
|
"magicbees.speciesBMBloodyBMBloody",
|
||||||
|
BeeSpecies.EARTHY.getSpecies());
|
||||||
|
registry.registerDeprecatedAlleleReplacement(
|
||||||
|
"magicbees.speciesBMBloodyBMBound",
|
||||||
|
BeeSpecies.ARCANE.getSpecies());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IAlleleBeeSpecies getBaseSpecies(String name) {
|
public static IAlleleBeeSpecies getBaseSpecies(String name) {
|
||||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry
|
||||||
|
.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IAlleleBeeSpecies getExtraSpecies(String name) {
|
public static IAlleleBeeSpecies getExtraSpecies(String name) {
|
||||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name.toLowerCase())
|
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry
|
||||||
.toString());
|
.getAllele((new StringBuilder()).append("extrabees.species.").append(name.toLowerCase()).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IAllele getBaseAllele(String name) {
|
public static IAllele getBaseAllele(String name) {
|
||||||
@@ -312,5 +320,4 @@ public class Allele implements IAllele {
|
|||||||
public String getUnlocalizedName() {
|
public String getUnlocalizedName() {
|
||||||
return this.uid;
|
return this.uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,6 @@ package magicbees.bees;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
|
|
||||||
@@ -14,21 +12,19 @@ import forestry.api.apiculture.IBeeGenome;
|
|||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
|
||||||
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect {
|
||||||
{
|
|
||||||
protected int throttle;
|
protected int throttle;
|
||||||
protected boolean combinable;
|
protected boolean combinable;
|
||||||
|
|
||||||
public AlleleEffect(String id, boolean isDominant, int timeout)
|
public AlleleEffect(String id, boolean isDominant, int timeout) {
|
||||||
{
|
|
||||||
super("effect" + id, isDominant, EnumBeeChromosome.EFFECT);
|
super("effect" + id, isDominant, EnumBeeChromosome.EFFECT);
|
||||||
this.throttle = timeout;
|
this.throttle = timeout;
|
||||||
combinable = false;
|
combinable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCombinable()
|
public boolean isCombinable() {
|
||||||
{
|
|
||||||
return combinable;
|
return combinable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,15 +37,11 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
public abstract IEffectData validateStorage(IEffectData storedData);
|
public abstract IEffectData validateStorage(IEffectData storedData);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
public final IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) {
|
||||||
{
|
|
||||||
int count = storedData.getInteger(0);
|
int count = storedData.getInteger(0);
|
||||||
if (count >= this.throttle)
|
if (count >= this.throttle) {
|
||||||
{
|
|
||||||
storedData = this.doEffectThrottled(genome, storedData, housing);
|
storedData = this.doEffectThrottled(genome, storedData, housing);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
storedData.setInteger(0, count + 1);
|
storedData.setInteger(0, count + 1);
|
||||||
}
|
}
|
||||||
return storedData;
|
return storedData;
|
||||||
@@ -64,14 +56,13 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
protected abstract IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
protected abstract IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
public IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) {
|
||||||
{
|
|
||||||
return Allele.forestryBaseEffect.doFX(genome, storedData, housing);
|
return Allele.forestryBaseEffect.doFX(genome, storedData, housing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected <T extends Entity> List<T> getEntitiesWithinRange(IBeeGenome genome, IBeeHousing housing, Class<T> entityClass)
|
protected <T extends Entity> List<T> getEntitiesWithinRange(IBeeGenome genome, IBeeHousing housing,
|
||||||
{
|
Class<T> entityClass) {
|
||||||
// Get the size of the affected area
|
// Get the size of the affected area
|
||||||
int[] area = genome.getTerritory();
|
int[] area = genome.getTerritory();
|
||||||
ChunkCoordinates coords = housing.getCoordinates();
|
ChunkCoordinates coords = housing.getCoordinates();
|
||||||
@@ -91,5 +82,4 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
AxisAlignedBB bounds = AxisAlignedBB.getBoundingBox(min[0], min[1], min[2], max[0], max[1], max[2]);
|
AxisAlignedBB bounds = AxisAlignedBB.getBoundingBox(min[0], min[1], min[2], max[0], max[1], max[2]);
|
||||||
return (List<T>) housing.getWorld().getEntitiesWithinAABB(entityClass, bounds);
|
return (List<T>) housing.getWorld().getEntitiesWithinAABB(entityClass, bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,20 +3,17 @@ package magicbees.bees;
|
|||||||
import forestry.api.genetics.IAlleleFloat;
|
import forestry.api.genetics.IAlleleFloat;
|
||||||
import forestry.api.genetics.IChromosomeType;
|
import forestry.api.genetics.IChromosomeType;
|
||||||
|
|
||||||
public class AlleleFloat extends Allele implements IAlleleFloat
|
public class AlleleFloat extends Allele implements IAlleleFloat {
|
||||||
{
|
|
||||||
private float value;
|
private float value;
|
||||||
|
|
||||||
public AlleleFloat(String id, float val, boolean isDominant, IChromosomeType... chromosomeTypes)
|
public AlleleFloat(String id, float val, boolean isDominant, IChromosomeType... chromosomeTypes) {
|
||||||
{
|
|
||||||
super(id, isDominant, chromosomeTypes);
|
super(id, isDominant, chromosomeTypes);
|
||||||
this.value = val;
|
this.value = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getValue()
|
public float getValue() {
|
||||||
{
|
|
||||||
return this.value;
|
return this.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,23 +1,20 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
import forestry.api.genetics.AlleleManager;
|
|
||||||
import forestry.api.genetics.IAlleleFlowers;
|
import forestry.api.genetics.IAlleleFlowers;
|
||||||
import forestry.api.genetics.IFlowerProvider;
|
import forestry.api.genetics.IFlowerProvider;
|
||||||
|
|
||||||
public class AlleleFlower extends Allele implements IAlleleFlowers
|
public class AlleleFlower extends Allele implements IAlleleFlowers {
|
||||||
{
|
|
||||||
private IFlowerProvider provider;
|
private IFlowerProvider provider;
|
||||||
|
|
||||||
public AlleleFlower(String uid, IFlowerProvider flowerProvider, boolean isDominant)
|
public AlleleFlower(String uid, IFlowerProvider flowerProvider, boolean isDominant) {
|
||||||
{
|
|
||||||
super("flower" + uid, isDominant, EnumBeeChromosome.FLOWER_PROVIDER);
|
super("flower" + uid, isDominant, EnumBeeChromosome.FLOWER_PROVIDER);
|
||||||
this.provider = flowerProvider;
|
this.provider = flowerProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IFlowerProvider getProvider()
|
public IFlowerProvider getProvider() {
|
||||||
{
|
|
||||||
return this.provider;
|
return this.provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,5 +22,4 @@ public class AlleleFlower extends Allele implements IAlleleFlowers
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return this.provider.getDescription();
|
return this.provider.getDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,15 +3,16 @@ package magicbees.bees;
|
|||||||
import magicbees.api.bees.AuraChargeType;
|
import magicbees.api.bees.AuraChargeType;
|
||||||
|
|
||||||
public enum AuraCharge {
|
public enum AuraCharge {
|
||||||
|
|
||||||
MUTATION(AuraChargeType.MUTATION, 850, 11),
|
MUTATION(AuraChargeType.MUTATION, 850, 11),
|
||||||
DEATH(AuraChargeType.DEATH, 400, 5),
|
DEATH(AuraChargeType.DEATH, 400, 5),
|
||||||
PRODUCTION(AuraChargeType.PRODUCTION, 300, 3),
|
PRODUCTION(AuraChargeType.PRODUCTION, 300, 3),;
|
||||||
;
|
|
||||||
|
|
||||||
public final AuraChargeType type;
|
public final AuraChargeType type;
|
||||||
public final int duration;
|
public final int duration;
|
||||||
/** The number of ticks to count between draining vis from the environment **/
|
/** The number of ticks to count between draining vis from the environment **/
|
||||||
public final int tickRate;
|
public final int tickRate;
|
||||||
|
|
||||||
public final int flag;
|
public final int flag;
|
||||||
|
|
||||||
AuraCharge(AuraChargeType chargeType, int duration, int tickRate) {
|
AuraCharge(AuraChargeType chargeType, int duration, int tickRate) {
|
||||||
|
|||||||
@@ -2,13 +2,13 @@ package magicbees.bees;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
|
||||||
import forestry.api.genetics.AlleleManager;
|
import forestry.api.genetics.AlleleManager;
|
||||||
import forestry.api.genetics.IAlleleSpecies;
|
import forestry.api.genetics.IAlleleSpecies;
|
||||||
import forestry.api.genetics.IClassification;
|
import forestry.api.genetics.IClassification;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
|
||||||
|
public enum BeeClassification implements IClassification {
|
||||||
|
|
||||||
public enum BeeClassification implements IClassification
|
|
||||||
{
|
|
||||||
VEILED("Veiled", "Velatapis"),
|
VEILED("Veiled", "Velatapis"),
|
||||||
ARCANE("Arcane", "Arcanapis"),
|
ARCANE("Arcane", "Arcanapis"),
|
||||||
SUPERNATURAL("Supernatural", "Occultapis"),
|
SUPERNATURAL("Supernatural", "Occultapis"),
|
||||||
@@ -37,8 +37,7 @@ public enum BeeClassification implements IClassification
|
|||||||
|
|
||||||
BLOODY("Bloody", "Sanguis"),
|
BLOODY("Bloody", "Sanguis"),
|
||||||
|
|
||||||
BOTANICAL("Botanical", "Botanica"),
|
BOTANICAL("Botanical", "Botanica"),;
|
||||||
;
|
|
||||||
|
|
||||||
private String uID;
|
private String uID;
|
||||||
private String latin;
|
private String latin;
|
||||||
@@ -46,8 +45,7 @@ public enum BeeClassification implements IClassification
|
|||||||
private IClassification parent;
|
private IClassification parent;
|
||||||
private EnumClassLevel level;
|
private EnumClassLevel level;
|
||||||
|
|
||||||
private BeeClassification(String name, String scientific)
|
private BeeClassification(String name, String scientific) {
|
||||||
{
|
|
||||||
this.uID = "classification." + name.toLowerCase();
|
this.uID = "classification." + name.toLowerCase();
|
||||||
this.latin = scientific;
|
this.latin = scientific;
|
||||||
this.level = EnumClassLevel.GENUS;
|
this.level = EnumClassLevel.GENUS;
|
||||||
@@ -57,72 +55,57 @@ public enum BeeClassification implements IClassification
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public EnumClassLevel getLevel()
|
public EnumClassLevel getLevel() {
|
||||||
{
|
|
||||||
return this.level;
|
return this.level;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUID()
|
public String getUID() {
|
||||||
{
|
|
||||||
return this.uID;
|
return this.uID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName()
|
public String getName() {
|
||||||
{
|
|
||||||
return LocalizationManager.getLocalizedString(getUID());
|
return LocalizationManager.getLocalizedString(getUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getScientific()
|
public String getScientific() {
|
||||||
{
|
|
||||||
return this.latin;
|
return this.latin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription() {
|
||||||
{
|
|
||||||
return LocalizationManager.getLocalizedString(getUID() + ".description");
|
return LocalizationManager.getLocalizedString(getUID() + ".description");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IClassification[] getMemberGroups()
|
public IClassification[] getMemberGroups() {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addMemberGroup(IClassification group)
|
public void addMemberGroup(IClassification group) {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IAlleleSpecies[] getMemberSpecies()
|
public IAlleleSpecies[] getMemberSpecies() {
|
||||||
{
|
|
||||||
return this.species.toArray(new IAlleleSpecies[this.species.size()]);
|
return this.species.toArray(new IAlleleSpecies[this.species.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addMemberSpecies(IAlleleSpecies species)
|
public void addMemberSpecies(IAlleleSpecies species) {
|
||||||
{
|
if (!this.species.contains(species)) {
|
||||||
if (!this.species.contains(species))
|
|
||||||
{
|
|
||||||
this.species.add(species);
|
this.species.add(species);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IClassification getParent()
|
public IClassification getParent() {
|
||||||
{
|
|
||||||
return this.parent;
|
return this.parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setParent(IClassification parent)
|
public void setParent(IClassification parent) {
|
||||||
{
|
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
|
||||||
import magicbees.main.utils.ItemInterface;
|
|
||||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
import forestry.api.apiculture.EnumBeeType;
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
import forestry.api.genetics.IAllele;
|
import forestry.api.genetics.IAllele;
|
||||||
|
import magicbees.main.utils.ItemInterface;
|
||||||
|
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simply a class to hold all the functions to manage species' default genomes.
|
* Simply a class to hold all the functions to manage species' default genomes.
|
||||||
@@ -16,9 +16,10 @@ import forestry.api.genetics.IAllele;
|
|||||||
* @author MysteriousAges
|
* @author MysteriousAges
|
||||||
*/
|
*/
|
||||||
public class BeeGenomeManager {
|
public class BeeGenomeManager {
|
||||||
|
|
||||||
// Basic genome for All thaumic bees.
|
// Basic genome for All thaumic bees.
|
||||||
private static IAllele[] getTemplateModBase() {
|
private static IAllele[] getTemplateModBase() {
|
||||||
IAllele[] genome = new IAllele[EnumBeeChromosome.values().length];
|
IAllele[] genome = new IAllele[EnumBeeChromosome.VALUES.length];
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.MYSTICAL.getSpecies();
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.MYSTICAL.getSpecies();
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
|
||||||
@@ -363,7 +364,6 @@ public class BeeGenomeManager {
|
|||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateBigbad() {
|
public static IAllele[] getTemplateBigbad() {
|
||||||
IAllele[] genome = getTemplateBaseMalevolent();
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
@@ -718,15 +718,6 @@ public class BeeGenomeManager {
|
|||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IAllele[] getTemplateOsmium() {
|
|
||||||
IAllele[] genome = getTemplateBaseMetallic();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.OSMIUM.getSpecies();
|
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateDiamond() {
|
public static IAllele[] getTemplateDiamond() {
|
||||||
IAllele[] genome = getTemplateBaseMetallic();
|
IAllele[] genome = getTemplateBaseMetallic();
|
||||||
|
|
||||||
@@ -753,7 +744,6 @@ public class BeeGenomeManager {
|
|||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateSilicon() {
|
public static IAllele[] getTemplateSilicon() {
|
||||||
IAllele[] genome = getTemplateBaseMetallic();
|
IAllele[] genome = getTemplateBaseMetallic();
|
||||||
|
|
||||||
@@ -774,7 +764,6 @@ public class BeeGenomeManager {
|
|||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateFluix() {
|
public static IAllele[] getTemplateFluix() {
|
||||||
IAllele[] genome = getTemplateBaseMetallic();
|
IAllele[] genome = getTemplateBaseMetallic();
|
||||||
|
|
||||||
@@ -847,6 +836,15 @@ public class BeeGenomeManager {
|
|||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateTCEssentia() {
|
||||||
|
IAllele[] genome = getTemplateTCBase();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.TC_ESSENTIA.getSpecies();
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
public static IAllele[] getTemplateTCAir() {
|
public static IAllele[] getTemplateTCAir() {
|
||||||
IAllele[] genome = getTemplateTCBase();
|
IAllele[] genome = getTemplateTCBase();
|
||||||
|
|
||||||
@@ -1017,7 +1015,8 @@ public class BeeGenomeManager {
|
|||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp1");
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp1");
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectGlacial");
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectGlacial");
|
||||||
|
|
||||||
return genome; }
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
private static IAllele[] getTemplateEEBase() {
|
private static IAllele[] getTemplateEEBase() {
|
||||||
IAllele[] genome = getTemplateModBase();
|
IAllele[] genome = getTemplateModBase();
|
||||||
@@ -1127,8 +1126,7 @@ public class BeeGenomeManager {
|
|||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.speedBlinding;
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.speedBlinding;
|
||||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
|
||||||
if (ExtraBeesHelper.isActive())
|
if (ExtraBeesHelper.isActive()) {
|
||||||
{
|
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getAllele("extrabees.effect.lightning");
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getAllele("extrabees.effect.lightning");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1209,7 +1207,6 @@ public class BeeGenomeManager {
|
|||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
||||||
|
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1223,7 +1220,6 @@ public class BeeGenomeManager {
|
|||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectIgnition");
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectIgnition");
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersNether");
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersNether");
|
||||||
|
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import forestry.api.apiculture.IBeeIconColourProvider;
|
|||||||
|
|
||||||
public enum BeeIconColourProvider implements IBeeIconColourProvider {
|
public enum BeeIconColourProvider implements IBeeIconColourProvider {
|
||||||
RAINBOW {
|
RAINBOW {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIconColour(int renderPass) {
|
public int getIconColour(int renderPass) {
|
||||||
if (renderPass == 0) {
|
if (renderPass == 0) {
|
||||||
|
|||||||
@@ -7,18 +7,18 @@ import net.minecraft.util.IIcon;
|
|||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeType;
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
import forestry.api.apiculture.IBeeIconProvider;
|
import forestry.api.apiculture.IBeeIconProvider;
|
||||||
|
|
||||||
import magicbees.main.CommonProxy;
|
import magicbees.main.CommonProxy;
|
||||||
|
|
||||||
public enum BeeIconProvider implements IBeeIconProvider {
|
public enum BeeIconProvider implements IBeeIconProvider {
|
||||||
|
|
||||||
SKULKING(CommonProxy.DOMAIN + ":bees/skulking/"),
|
SKULKING(CommonProxy.DOMAIN + ":bees/skulking/"),
|
||||||
DOCTORAL(CommonProxy.DOMAIN + ":bees/doctoral/");
|
DOCTORAL(CommonProxy.DOMAIN + ":bees/doctoral/");
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon[][] icons;
|
private IIcon[][] icons;
|
||||||
|
|
||||||
private final String iconPath;
|
private final String iconPath;
|
||||||
|
|
||||||
BeeIconProvider(String iconPath) {
|
BeeIconProvider(String iconPath) {
|
||||||
@@ -33,8 +33,7 @@ public enum BeeIconProvider implements IBeeIconProvider {
|
|||||||
|
|
||||||
for (int i = 0; i < EnumBeeType.VALUES.length; i++) {
|
for (int i = 0; i < EnumBeeType.VALUES.length; i++) {
|
||||||
EnumBeeType beeType = EnumBeeType.VALUES[i];
|
EnumBeeType beeType = EnumBeeType.VALUES[i];
|
||||||
if (beeType == EnumBeeType.NONE)
|
if (beeType == EnumBeeType.NONE) continue;
|
||||||
continue;
|
|
||||||
|
|
||||||
String beeTypeIconPath = iconPath + beeType.toString().toLowerCase(Locale.ENGLISH);
|
String beeTypeIconPath = iconPath + beeType.toString().toLowerCase(Locale.ENGLISH);
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,8 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import magicbees.block.types.HiveType;
|
|
||||||
import magicbees.item.types.DropType;
|
|
||||||
import magicbees.main.Config;
|
|
||||||
import magicbees.main.utils.Tuple;
|
|
||||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeType;
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||||
import forestry.api.apiculture.IBee;
|
import forestry.api.apiculture.IBee;
|
||||||
@@ -18,9 +14,14 @@ import forestry.api.apiculture.IBeeGenome;
|
|||||||
import forestry.api.apiculture.IBeeRoot;
|
import forestry.api.apiculture.IBeeRoot;
|
||||||
import forestry.api.genetics.AlleleManager;
|
import forestry.api.genetics.AlleleManager;
|
||||||
import forestry.api.genetics.IAllele;
|
import forestry.api.genetics.IAllele;
|
||||||
|
import magicbees.block.types.HiveType;
|
||||||
|
import magicbees.item.types.DropType;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.Tuple;
|
||||||
|
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||||
|
|
||||||
|
public class BeeManager {
|
||||||
|
|
||||||
public class BeeManager
|
|
||||||
{
|
|
||||||
public static IBeeRoot beeRoot;
|
public static IBeeRoot beeRoot;
|
||||||
|
|
||||||
private static List<Tuple<IAlleleBeeSpecies, Double>> worldgenSpeciesWeights = new ArrayList<Tuple<IAlleleBeeSpecies, Double>>();
|
private static List<Tuple<IAlleleBeeSpecies, Double>> worldgenSpeciesWeights = new ArrayList<Tuple<IAlleleBeeSpecies, Double>>();
|
||||||
@@ -36,8 +37,7 @@ public class BeeManager
|
|||||||
Allele.registerDeprecatedAlleleReplacements();
|
Allele.registerDeprecatedAlleleReplacements();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void lateBeeInit()
|
public static void lateBeeInit() {
|
||||||
{
|
|
||||||
BeeMutation.setupMutations();
|
BeeMutation.setupMutations();
|
||||||
BeeProductHelper.initBaseProducts();
|
BeeProductHelper.initBaseProducts();
|
||||||
BeeProductHelper.initOreDictSProducts();
|
BeeProductHelper.initOreDictSProducts();
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1,5 +1,137 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import static magicbees.bees.BeeSpecies.ABANDONED;
|
||||||
|
import static magicbees.bees.BeeSpecies.AE_SKYSTONE;
|
||||||
|
import static magicbees.bees.BeeSpecies.ALUMINUM;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_AIR;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_ARCANE;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_EARTH;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_ESSENCE;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_FIRE;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_ICE;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_LIGHTNING;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_PLANT;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_QUINTESSENCE;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_VORTEX;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_WATER;
|
||||||
|
import static magicbees.bees.BeeSpecies.AM_WIGHT;
|
||||||
|
import static magicbees.bees.BeeSpecies.APATITE;
|
||||||
|
import static magicbees.bees.BeeSpecies.ARCANE;
|
||||||
|
import static magicbees.bees.BeeSpecies.ARDITE;
|
||||||
|
import static magicbees.bees.BeeSpecies.ATTUNED;
|
||||||
|
import static magicbees.bees.BeeSpecies.AWARE;
|
||||||
|
import static magicbees.bees.BeeSpecies.BATTY;
|
||||||
|
import static magicbees.bees.BeeSpecies.BEEF;
|
||||||
|
import static magicbees.bees.BeeSpecies.BIGBAD;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_ALFHEIM;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_BLOSSOM;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_BOTANIC;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_DREAMING;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_FLORAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_ROOTED;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_SOMNOLENT;
|
||||||
|
import static magicbees.bees.BeeSpecies.BOT_VAZBEE;
|
||||||
|
import static magicbees.bees.BeeSpecies.BRAINY;
|
||||||
|
import static magicbees.bees.BeeSpecies.CATTY;
|
||||||
|
import static magicbees.bees.BeeSpecies.CERTUS;
|
||||||
|
import static magicbees.bees.BeeSpecies.CHARMED;
|
||||||
|
import static magicbees.bees.BeeSpecies.CHICKEN;
|
||||||
|
import static magicbees.bees.BeeSpecies.COBALT;
|
||||||
|
import static magicbees.bees.BeeSpecies.COPPER;
|
||||||
|
import static magicbees.bees.BeeSpecies.CRUMBLING;
|
||||||
|
import static magicbees.bees.BeeSpecies.DIAMOND;
|
||||||
|
import static magicbees.bees.BeeSpecies.DOCTORAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.DRACONIC;
|
||||||
|
import static magicbees.bees.BeeSpecies.EARTHY;
|
||||||
|
import static magicbees.bees.BeeSpecies.EE_MINIUM;
|
||||||
|
import static magicbees.bees.BeeSpecies.ELDRITCH;
|
||||||
|
import static magicbees.bees.BeeSpecies.EMERALD;
|
||||||
|
import static magicbees.bees.BeeSpecies.ENCHANTED;
|
||||||
|
import static magicbees.bees.BeeSpecies.ESOTERIC;
|
||||||
|
import static magicbees.bees.BeeSpecies.ETHEREAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.FIREY;
|
||||||
|
import static magicbees.bees.BeeSpecies.FLUIX;
|
||||||
|
import static magicbees.bees.BeeSpecies.FORLORN;
|
||||||
|
import static magicbees.bees.BeeSpecies.GHASTLY;
|
||||||
|
import static magicbees.bees.BeeSpecies.GOLD;
|
||||||
|
import static magicbees.bees.BeeSpecies.HATEFUL;
|
||||||
|
import static magicbees.bees.BeeSpecies.HORSE;
|
||||||
|
import static magicbees.bees.BeeSpecies.INFERNAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.INVISIBLE;
|
||||||
|
import static magicbees.bees.BeeSpecies.IRON;
|
||||||
|
import static magicbees.bees.BeeSpecies.LEAD;
|
||||||
|
import static magicbees.bees.BeeSpecies.LORDLY;
|
||||||
|
import static magicbees.bees.BeeSpecies.MANYULLYN;
|
||||||
|
import static magicbees.bees.BeeSpecies.MUTABLE;
|
||||||
|
import static magicbees.bees.BeeSpecies.MYSTERIOUS;
|
||||||
|
import static magicbees.bees.BeeSpecies.MYSTICAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.NAMELESS;
|
||||||
|
import static magicbees.bees.BeeSpecies.OBLIVION;
|
||||||
|
import static magicbees.bees.BeeSpecies.PORK;
|
||||||
|
import static magicbees.bees.BeeSpecies.PUPIL;
|
||||||
|
import static magicbees.bees.BeeSpecies.RSA_FLUXED;
|
||||||
|
import static magicbees.bees.BeeSpecies.SAVANT;
|
||||||
|
import static magicbees.bees.BeeSpecies.SCHOLARLY;
|
||||||
|
import static magicbees.bees.BeeSpecies.SHEEPISH;
|
||||||
|
import static magicbees.bees.BeeSpecies.SILICON;
|
||||||
|
import static magicbees.bees.BeeSpecies.SILVER;
|
||||||
|
import static magicbees.bees.BeeSpecies.SKULKING;
|
||||||
|
import static magicbees.bees.BeeSpecies.SMOULDERING;
|
||||||
|
import static magicbees.bees.BeeSpecies.SORCEROUS;
|
||||||
|
import static magicbees.bees.BeeSpecies.SOUL;
|
||||||
|
import static magicbees.bees.BeeSpecies.SPIDERY;
|
||||||
|
import static magicbees.bees.BeeSpecies.SPIRIT;
|
||||||
|
import static magicbees.bees.BeeSpecies.SPITEFUL;
|
||||||
|
import static magicbees.bees.BeeSpecies.SUPERNATURAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_AIR;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_CHAOS;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_EARTH;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_EMPOWERING;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_FIRE;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_HUNGRY;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_NEXUS;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_ORDER;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_PURE;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_REJUVENATING;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_TAINT;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_VIS;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_VOID;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_WATER;
|
||||||
|
import static magicbees.bees.BeeSpecies.TC_WISPY;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_AMPED;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_BLIZZY;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_BRONZE;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_COAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_DANTE;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_DESTABILIZED;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_ELECTRUM;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_ENDEARING;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_GELID;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_GROUNDED;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_INVAR;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_LUMIUS;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_LUX;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_NICKEL;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_PLATINUM;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_PYRO;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_ROCKING;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_SHOCKING;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_SIGNALUS;
|
||||||
|
import static magicbees.bees.BeeSpecies.TE_WINSOME;
|
||||||
|
import static magicbees.bees.BeeSpecies.TIMELY;
|
||||||
|
import static magicbees.bees.BeeSpecies.TIN;
|
||||||
|
import static magicbees.bees.BeeSpecies.TRANSMUTING;
|
||||||
|
import static magicbees.bees.BeeSpecies.UNUSUAL;
|
||||||
|
import static magicbees.bees.BeeSpecies.WATERY;
|
||||||
|
import static magicbees.bees.BeeSpecies.WINDY;
|
||||||
|
import static magicbees.bees.BeeSpecies.WITHERING;
|
||||||
|
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import gregtech.api.enums.Materials;
|
||||||
import magicbees.item.types.CombType;
|
import magicbees.item.types.CombType;
|
||||||
import magicbees.item.types.DropType;
|
import magicbees.item.types.DropType;
|
||||||
import magicbees.item.types.NuggetType;
|
import magicbees.item.types.NuggetType;
|
||||||
@@ -11,17 +143,12 @@ import magicbees.main.utils.LogHelper;
|
|||||||
import magicbees.main.utils.compat.AppliedEnergisticsHelper;
|
import magicbees.main.utils.compat.AppliedEnergisticsHelper;
|
||||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||||
import magicbees.main.utils.compat.BotaniaHelper;
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
|
import magicbees.main.utils.compat.BotaniaHelper.PastureSeed;
|
||||||
import magicbees.main.utils.compat.EquivalentExchangeHelper;
|
import magicbees.main.utils.compat.EquivalentExchangeHelper;
|
||||||
import magicbees.main.utils.compat.ForestryHelper;
|
import magicbees.main.utils.compat.ForestryHelper;
|
||||||
import magicbees.main.utils.compat.RedstoneArsenalHelper;
|
import magicbees.main.utils.compat.RedstoneArsenalHelper;
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
import magicbees.main.utils.compat.ThermalModsHelper;
|
import magicbees.main.utils.compat.ThermalModsHelper;
|
||||||
import magicbees.main.utils.compat.BotaniaHelper.PastureSeed;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
import static magicbees.bees.BeeSpecies.*;
|
|
||||||
|
|
||||||
public class BeeProductHelper {
|
public class BeeProductHelper {
|
||||||
|
|
||||||
@@ -65,32 +192,27 @@ public class BeeProductHelper {
|
|||||||
GHASTLY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.08f)
|
GHASTLY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.08f)
|
||||||
.addSpecialty(new ItemStack(Items.ghast_tear), 0.099f);
|
.addSpecialty(new ItemStack(Items.ghast_tear), 0.099f);
|
||||||
SPIDERY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.13f)
|
SPIDERY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.13f)
|
||||||
.addProduct(new ItemStack(Items.string), 0.08f)
|
.addProduct(new ItemStack(Items.string), 0.08f).addSpecialty(new ItemStack(Items.spider_eye), 0.08f);
|
||||||
.addSpecialty(new ItemStack(Items.spider_eye), 0.08f);
|
|
||||||
SMOULDERING.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
SMOULDERING.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.MOLTEN), 0.10f)
|
.addProduct(Config.combs.getStackForType(CombType.MOLTEN), 0.10f)
|
||||||
.addSpecialty(new ItemStack(Items.blaze_rod), 0.05f);
|
.addSpecialty(new ItemStack(Items.blaze_rod), 0.05f);
|
||||||
BRAINY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
BRAINY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||||
.addProduct(new ItemStack(Items.rotten_flesh), 0.06f);
|
.addProduct(new ItemStack(Items.rotten_flesh), 0.06f);
|
||||||
BIGBAD.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.18f)
|
BIGBAD.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.18f)
|
||||||
.addProduct(new ItemStack(Items.beef), 0.12f)
|
.addProduct(new ItemStack(Items.beef), 0.12f).addProduct(new ItemStack(Items.chicken), 0.12f)
|
||||||
.addProduct(new ItemStack(Items.chicken), 0.12f)
|
|
||||||
.addSpecialty(new ItemStack(Items.melon), 0.20f);
|
.addSpecialty(new ItemStack(Items.melon), 0.20f);
|
||||||
BATTY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
BATTY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||||
.addSpecialty(new ItemStack(Items.string), 0.00001f);
|
.addSpecialty(new ItemStack(Items.string), 0.20f);
|
||||||
CHICKEN.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.23f)
|
CHICKEN.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.23f)
|
||||||
.addSpecialty(new ItemStack(Items.feather), 0.08f)
|
.addSpecialty(new ItemStack(Items.feather), 0.08f).addSpecialty(new ItemStack(Items.egg), 0.08f);
|
||||||
.addSpecialty(new ItemStack(Items.egg), 0.08f);
|
|
||||||
BEEF.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
BEEF.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||||
.addSpecialty(new ItemStack(Items.leather), 0.165f);
|
.addSpecialty(new ItemStack(Items.leather), 0.165f);
|
||||||
PORK.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
PORK.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||||
.addSpecialty(new ItemStack(Items.carrot), 0.165f);
|
.addSpecialty(new ItemStack(Items.carrot), 0.165f);
|
||||||
SHEEPISH.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
SHEEPISH.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||||
.addSpecialty(new ItemStack(Blocks.wool), 0.16f)
|
.addSpecialty(new ItemStack(Blocks.wool), 0.16f).addSpecialty(new ItemStack(Items.wheat), 0.24f);
|
||||||
.addSpecialty(new ItemStack(Items.wheat), 0.24f);
|
|
||||||
HORSE.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
HORSE.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||||
.addSpecialty(new ItemStack(Items.leather), 0.24f)
|
.addSpecialty(new ItemStack(Items.leather), 0.24f).addSpecialty(new ItemStack(Items.apple), 0.38f);
|
||||||
.addSpecialty(new ItemStack(Items.apple), 0.38f);
|
|
||||||
CATTY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
CATTY.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.25f)
|
||||||
.addSpecialty(new ItemStack(Items.fish), 0.24f);
|
.addSpecialty(new ItemStack(Items.fish), 0.24f);
|
||||||
|
|
||||||
@@ -112,8 +234,7 @@ public class BeeProductHelper {
|
|||||||
|
|
||||||
IRON.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
IRON.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
||||||
.addSpecialty(Config.nuggets.getStackForType(NuggetType.IRON), 0.18f);
|
.addSpecialty(Config.nuggets.getStackForType(NuggetType.IRON), 0.18f);
|
||||||
GOLD.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
GOLD.addProduct(ForestryHelper.itemHoneycomb, 0.10f).addSpecialty(new ItemStack(Items.gold_nugget, 1), 0.16f);
|
||||||
.addSpecialty(new ItemStack(Items.gold_nugget, 1), 0.16f);
|
|
||||||
DIAMOND.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
DIAMOND.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
||||||
.addSpecialty(Config.nuggets.getStackForType(NuggetType.DIAMOND), 0.06f);
|
.addSpecialty(Config.nuggets.getStackForType(NuggetType.DIAMOND), 0.06f);
|
||||||
EMERALD.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
EMERALD.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
||||||
@@ -137,26 +258,29 @@ public class BeeProductHelper {
|
|||||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.COCOA.ordinal()), 0.15f);
|
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.COCOA.ordinal()), 0.15f);
|
||||||
|
|
||||||
INVISIBLE.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.35f);
|
INVISIBLE.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.35f);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initOreDictSProducts() {
|
public static void initOreDictSProducts() {
|
||||||
|
boolean isGTNHCoreModLoaded = Config.isGTNHCoreModLoaded;
|
||||||
SILVER.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
SILVER.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("ingotSilver").size() > 0) {
|
if (OreDictionary.getOres("nuggetSilver").size() > 0) {
|
||||||
SILVER.addSpecialty(Config.nuggets.getStackForType(NuggetType.SILVER), 0.16f);
|
SILVER.addSpecialty(
|
||||||
}
|
isGTNHCoreModLoaded ? Materials.Silver.getNuggets(1) : OreDictionary.getOres("nuggetSilver").get(0),
|
||||||
else {
|
0.16f);
|
||||||
|
} else {
|
||||||
SILVER.setInactive();
|
SILVER.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
LEAD.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
LEAD.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("ingotLead").size() > 0) {
|
if (OreDictionary.getOres("nuggetLead").size() > 0) {
|
||||||
LEAD.addSpecialty(Config.nuggets.getStackForType(NuggetType.LEAD), 0.17f);
|
LEAD.addSpecialty(
|
||||||
}
|
isGTNHCoreModLoaded ? Materials.Lead.getNuggets(1) : OreDictionary.getOres("nuggetLead").get(0),
|
||||||
else {
|
0.17f);
|
||||||
|
} else {
|
||||||
LEAD.setInactive();
|
LEAD.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Oil berry alu bee
|
||||||
ALUMINUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
ALUMINUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetAluminum").size() > 0) {
|
if (OreDictionary.getOres("nuggetAluminum").size() > 0) {
|
||||||
ALUMINUM.addSpecialty(OreDictionary.getOres("nuggetAluminum").get(0), 0.20f);
|
ALUMINUM.addSpecialty(OreDictionary.getOres("nuggetAluminum").get(0), 0.20f);
|
||||||
@@ -165,94 +289,98 @@ public class BeeProductHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TE_PLATINUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
TE_PLATINUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetPlatinum").size() > 0&& OreDictionary.getOres("ingotPlatinum").size() > 0) {
|
if (OreDictionary.getOres("nuggetPlatinum").size() > 0) {
|
||||||
TE_PLATINUM.addSpecialty(OreDictionary.getOres("nuggetPlatinum").get(0), 0.18f);
|
TE_PLATINUM.addSpecialty(
|
||||||
|
isGTNHCoreModLoaded ? Materials.Platinum.getNuggets(1)
|
||||||
|
: OreDictionary.getOres("nuggetPlatinum").get(0),
|
||||||
|
0.18f);
|
||||||
} else {
|
} else {
|
||||||
TE_PLATINUM.setInactive();
|
TE_PLATINUM.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
TE_NICKEL.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
TE_NICKEL.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetNickel").size() > 0 && OreDictionary.getOres("ingotNickel").size() > 0) {
|
if (OreDictionary.getOres("nuggetNickel").size() > 0) {
|
||||||
TE_NICKEL.addSpecialty(OreDictionary.getOres("nuggetNickel").get(0), 0.18f);
|
TE_NICKEL.addSpecialty(
|
||||||
|
isGTNHCoreModLoaded ? Materials.Nickel.getNuggets(1) : OreDictionary.getOres("nuggetNickel").get(0),
|
||||||
|
0.18f);
|
||||||
} else {
|
} else {
|
||||||
TE_NICKEL.setInactive();
|
TE_NICKEL.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
ARDITE.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
ARDITE.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetArdite").size() > 0) {
|
if (OreDictionary.getOres("nuggetArdite").size() > 0) {
|
||||||
ARDITE.addSpecialty(OreDictionary.getOres("nuggetArdite").get(0), 0.18f);
|
ARDITE.addSpecialty(
|
||||||
|
isGTNHCoreModLoaded ? Materials.Ardite.getNuggets(1) : OreDictionary.getOres("nuggetArdite").get(0),
|
||||||
|
0.18f);
|
||||||
} else {
|
} else {
|
||||||
ARDITE.setInactive();
|
ARDITE.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
COBALT.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
COBALT.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetCobalt").size() > 0) {
|
if (OreDictionary.getOres("nuggetCobalt").size() > 0) {
|
||||||
COBALT.addSpecialty(OreDictionary.getOres("nuggetCobalt").get(0), 0.18f);
|
COBALT.addSpecialty(
|
||||||
}
|
isGTNHCoreModLoaded ? Materials.Cobalt.getNuggets(1) : OreDictionary.getOres("nuggetCobalt").get(0),
|
||||||
if (OreDictionary.getOres("nuggetNaturalCobalt").size() > 0) {
|
0.18f);
|
||||||
COBALT.addSpecialty(OreDictionary.getOres("nuggetNaturalCobalt").get(0), 0.24f);
|
} else {
|
||||||
}
|
|
||||||
if (COBALT.getSpecies().getSpecialtyChances().size() <= 0) {
|
|
||||||
COBALT.setInactive();
|
COBALT.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
TE_BRONZE.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
TE_BRONZE.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetBronze").size() > 0 && OreDictionary.getOres("ingotBronze").size() > 0) {
|
if (OreDictionary.getOres("nuggetBronze").size() > 0) {
|
||||||
TE_BRONZE.addSpecialty(OreDictionary.getOres("nuggetBronze").get(0), 0.18f);
|
TE_BRONZE.addSpecialty(
|
||||||
|
isGTNHCoreModLoaded ? Materials.Bronze.getNuggets(1) : OreDictionary.getOres("nuggetBronze").get(0),
|
||||||
|
0.18f);
|
||||||
} else {
|
} else {
|
||||||
TE_BRONZE.setInactive();
|
TE_BRONZE.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
TE_INVAR.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
TE_INVAR.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetInvar").size() > 0 && OreDictionary.getOres("ingotInvar").size() > 0) {
|
if (OreDictionary.getOres("nuggetInvar").size() > 0) {
|
||||||
TE_INVAR.addSpecialty(OreDictionary.getOres("nuggetInvar").get(0), 0.18f);
|
TE_INVAR.addSpecialty(
|
||||||
|
isGTNHCoreModLoaded ? Materials.Invar.getNuggets(1) : OreDictionary.getOres("nuggetInvar").get(0),
|
||||||
|
0.18f);
|
||||||
} else {
|
} else {
|
||||||
TE_INVAR.setInactive();
|
TE_INVAR.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
TE_ELECTRUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
TE_ELECTRUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetElectrum").size() > 0 && OreDictionary.getOres("ingotElectrum").size() > 0) {
|
if (OreDictionary.getOres("nuggetElectrum").size() > 0) {
|
||||||
TE_ELECTRUM.addSpecialty(OreDictionary.getOres("nuggetElectrum").get(0), 0.18f);
|
TE_ELECTRUM.addSpecialty(
|
||||||
|
isGTNHCoreModLoaded ? Materials.Electrum.getNuggets(1)
|
||||||
|
: OreDictionary.getOres("nuggetElectrum").get(0),
|
||||||
|
0.18f);
|
||||||
} else {
|
} else {
|
||||||
TE_ELECTRUM.setInactive();
|
TE_ELECTRUM.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
MANYULLYN.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
MANYULLYN.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetManyullyn").size() > 0) {
|
if (OreDictionary.getOres("nuggetManyullyn").size() > 0) {
|
||||||
MANYULLYN.addSpecialty(OreDictionary.getOres("nuggetManyullyn").get(0), 0.16f);
|
MANYULLYN.addSpecialty(
|
||||||
|
isGTNHCoreModLoaded ? Materials.Manyullyn.getNuggets(1)
|
||||||
|
: OreDictionary.getOres("nuggetManyullyn").get(0),
|
||||||
|
0.18f);
|
||||||
} else {
|
} else {
|
||||||
MANYULLYN.setInactive();
|
MANYULLYN.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
OSMIUM.addProduct(ForestryHelper.itemHoneycomb, 0.15f);
|
|
||||||
if (OreDictionary.getOres("nuggetOsmium").size() > 0) {
|
|
||||||
OSMIUM.addSpecialty(OreDictionary.getOres("nuggetOsmium").get(0), 0.16f);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
OSMIUM.setInactive();
|
|
||||||
}
|
|
||||||
|
|
||||||
CERTUS.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
CERTUS.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("crystalCertusQuartz").size() > 0) {
|
if (OreDictionary.getOres("crystalCertusQuartz").size() > 0) {
|
||||||
CERTUS.addSpecialty(OreDictionary.getOres("crystalCertusQuartz").get(0), 0.08f);
|
CERTUS.addSpecialty(OreDictionary.getOres("crystalCertusQuartz").get(0), 0.08f);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
CERTUS.setInactive();
|
CERTUS.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
SILICON.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
SILICON.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("itemSilicon").size() > 0) {
|
if (OreDictionary.getOres("dustSilicon").size() > 0) {
|
||||||
SILICON.addSpecialty(OreDictionary.getOres("itemSilicon").get(0), 0.16f);
|
SILICON.addSpecialty(OreDictionary.getOres("dustSilicon").get(0), 0.30f);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
SILICON.setInactive();
|
SILICON.setInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
FLUIX.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
FLUIX.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("crystalFluix").size() > 0) {
|
if (OreDictionary.getOres("crystalFluix").size() > 0) {
|
||||||
FLUIX.addSpecialty(OreDictionary.getOres("crystalFluix").get(0), 0.06f);
|
FLUIX.addSpecialty(OreDictionary.getOres("crystalFluix").get(0), 0.06f);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
FLUIX.setInactive();
|
FLUIX.setInactive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -268,18 +396,29 @@ public class BeeProductHelper {
|
|||||||
TC_VIS.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.10f);
|
TC_VIS.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.10f);
|
||||||
TC_REJUVENATING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.18f);
|
TC_REJUVENATING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.18f);
|
||||||
TC_EMPOWERING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.14f);
|
TC_EMPOWERING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.14f);
|
||||||
TC_EMPOWERING.addSpecialty(new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 0.02f);
|
TC_EMPOWERING.addSpecialty(
|
||||||
|
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()),
|
||||||
|
0.02f);
|
||||||
TC_NEXUS.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.25f);
|
TC_NEXUS.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.25f);
|
||||||
TC_NEXUS.addProduct(Config.combs.getStackForType(CombType.TEMPORAL), 0.12f);
|
TC_NEXUS.addProduct(Config.combs.getStackForType(CombType.TEMPORAL), 0.12f);
|
||||||
TC_NEXUS.addSpecialty(new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 0.02f);
|
TC_NEXUS.addSpecialty(
|
||||||
|
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()),
|
||||||
|
0.02f);
|
||||||
TC_TAINT.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.18f);
|
TC_TAINT.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.18f);
|
||||||
TC_TAINT.addProduct(new ItemStack(ForestryHelper.craftingResource, 1 , ForestryHelper.Propolis.STICKY.ordinal()), 0.213f);
|
TC_TAINT.addProduct(
|
||||||
|
new ItemStack(ForestryHelper.craftingResource, 1, ForestryHelper.Propolis.STICKY.ordinal()),
|
||||||
|
0.213f);
|
||||||
TC_PURE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.16f);
|
TC_PURE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.16f);
|
||||||
TC_PURE.addSpecialty(Config.combs.getStackForType(CombType.SOUL), 0.19f);
|
TC_PURE.addSpecialty(Config.combs.getStackForType(CombType.SOUL), 0.19f);
|
||||||
TC_HUNGRY.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.28f);
|
TC_HUNGRY.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 0.28f);
|
||||||
TC_HUNGRY.addSpecialty(Config.combs.getStackForType(CombType.TEMPORAL), 0.195f);
|
TC_HUNGRY.addSpecialty(Config.combs.getStackForType(CombType.TEMPORAL), 0.195f);
|
||||||
TC_WISPY.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 0.22f)
|
TC_WISPY.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 0.22f)
|
||||||
.addSpecialty(new ItemStack(ForestryHelper.craftingResource, 1, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()), 0.04f);
|
.addSpecialty(
|
||||||
|
new ItemStack(
|
||||||
|
ForestryHelper.craftingResource,
|
||||||
|
1,
|
||||||
|
ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()),
|
||||||
|
0.04f);
|
||||||
TC_VOID.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
TC_VOID.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
|
|
||||||
if (ThaumcraftHelper.isActive()) {
|
if (ThaumcraftHelper.isActive()) {
|
||||||
@@ -298,7 +437,9 @@ public class BeeProductHelper {
|
|||||||
CHICKEN.addSpecialty(new ItemStack(ThaumcraftHelper.nuggetChicken, 1), 0.09f);
|
CHICKEN.addSpecialty(new ItemStack(ThaumcraftHelper.nuggetChicken, 1), 0.09f);
|
||||||
BEEF.addSpecialty(new ItemStack(ThaumcraftHelper.nuggetBeef, 1), 0.09f);
|
BEEF.addSpecialty(new ItemStack(ThaumcraftHelper.nuggetBeef, 1), 0.09f);
|
||||||
PORK.addSpecialty(new ItemStack(ThaumcraftHelper.nuggetPork, 1), 0.09f);
|
PORK.addSpecialty(new ItemStack(ThaumcraftHelper.nuggetPork, 1), 0.09f);
|
||||||
TC_VOID.addSpecialty(new ItemStack(ThaumcraftHelper.nuggetMetal, 1, ThaumcraftHelper.NuggetType.VOID_METAL.ordinal()), 0.155f);
|
TC_VOID.addSpecialty(
|
||||||
|
new ItemStack(ThaumcraftHelper.nuggetMetal, 1, ThaumcraftHelper.NuggetType.VOID_METAL.ordinal()),
|
||||||
|
0.155f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,17 +467,45 @@ public class BeeProductHelper {
|
|||||||
.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f);
|
.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f);
|
||||||
|
|
||||||
if (ArsMagicaHelper.isActive()) {
|
if (ArsMagicaHelper.isActive()) {
|
||||||
AM_QUINTESSENCE.addSpecialty(new ItemStack(ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()), 0.05f);
|
AM_QUINTESSENCE.addSpecialty(
|
||||||
AM_EARTH.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.07f);
|
new ItemStack(
|
||||||
AM_AIR.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()), 0.07f);
|
ArsMagicaHelper.itemResource,
|
||||||
AM_FIRE.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()), 0.07f);
|
1,
|
||||||
AM_WATER.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()), 0.07f);
|
ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||||
AM_LIGHTNING.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()), 0.07f);
|
0.05f);
|
||||||
AM_PLANT.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()), 0.07f);
|
AM_EARTH.addSpecialty(
|
||||||
AM_ICE.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||||
AM_ARCANE.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()), 0.11f);
|
0.07f);
|
||||||
AM_VORTEX.addSpecialty(new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.15f);
|
AM_AIR.addSpecialty(
|
||||||
AM_WIGHT.addSpecialty(new ItemStack(ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()), 0.11f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()),
|
||||||
|
0.07f);
|
||||||
|
AM_FIRE.addSpecialty(
|
||||||
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()),
|
||||||
|
0.07f);
|
||||||
|
AM_WATER.addSpecialty(
|
||||||
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()),
|
||||||
|
0.07f);
|
||||||
|
AM_LIGHTNING.addSpecialty(
|
||||||
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()),
|
||||||
|
0.07f);
|
||||||
|
AM_PLANT.addSpecialty(
|
||||||
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()),
|
||||||
|
0.07f);
|
||||||
|
AM_ICE.addSpecialty(
|
||||||
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()),
|
||||||
|
0.07f);
|
||||||
|
AM_ARCANE.addSpecialty(
|
||||||
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()),
|
||||||
|
0.11f);
|
||||||
|
AM_VORTEX.addSpecialty(
|
||||||
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||||
|
0.15f);
|
||||||
|
AM_WIGHT.addSpecialty(
|
||||||
|
new ItemStack(
|
||||||
|
ArsMagicaHelper.itemResource,
|
||||||
|
1,
|
||||||
|
ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||||
|
0.11f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,7 +525,8 @@ public class BeeProductHelper {
|
|||||||
TE_WINSOME.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
TE_WINSOME.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TE_ENDEARING), 0.05f)
|
.addProduct(Config.combs.getStackForType(CombType.TE_ENDEARING), 0.05f)
|
||||||
.addSpecialty(new ItemStack(Items.ender_pearl), 0.05f);
|
.addSpecialty(new ItemStack(Items.ender_pearl), 0.05f);
|
||||||
TE_ENDEARING.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 0.10f)
|
TE_ENDEARING
|
||||||
|
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TE_ENDEARING), 0.05f);
|
.addProduct(Config.combs.getStackForType(CombType.TE_ENDEARING), 0.05f);
|
||||||
TE_COAL.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
TE_COAL.addProduct(ForestryHelper.itemHoneycomb, 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TE_CARBON), 0.05f)
|
.addProduct(Config.combs.getStackForType(CombType.TE_CARBON), 0.05f)
|
||||||
@@ -407,8 +577,7 @@ public class BeeProductHelper {
|
|||||||
BOT_FLORAL.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.25f)
|
BOT_FLORAL.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.25f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
||||||
BOT_VAZBEE.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.05f)
|
BOT_VAZBEE.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.05f)
|
||||||
.addProduct(new ItemStack(Items.dye, 1, 9), 0.20f)
|
.addProduct(new ItemStack(Items.dye, 1, 9), 0.20f).addProduct(new ItemStack(Blocks.wool, 1, 9), 0.02f)
|
||||||
.addProduct(new ItemStack(Blocks.wool, 1, 9), 0.02f)
|
|
||||||
.addProduct(new ItemStack(Blocks.red_flower, 1, 7), 0.06f)
|
.addProduct(new ItemStack(Blocks.red_flower, 1, 7), 0.06f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.15f);
|
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.15f);
|
||||||
BOT_SOMNOLENT.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.08f)
|
BOT_SOMNOLENT.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.08f)
|
||||||
@@ -435,8 +604,7 @@ public class BeeProductHelper {
|
|||||||
AE_SKYSTONE.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.19f);
|
AE_SKYSTONE.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.19f);
|
||||||
if (AppliedEnergisticsHelper.skystone != null) {
|
if (AppliedEnergisticsHelper.skystone != null) {
|
||||||
AE_SKYSTONE.addSpecialty(new ItemStack(AppliedEnergisticsHelper.skystone), 0.02f);
|
AE_SKYSTONE.addSpecialty(new ItemStack(AppliedEnergisticsHelper.skystone), 0.02f);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
AE_SKYSTONE.setInactive();
|
AE_SKYSTONE.setInactive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
import magicbees.main.utils.compat.AppliedEnergisticsHelper;
|
|
||||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
|
||||||
import magicbees.main.utils.compat.BotaniaHelper;
|
|
||||||
import magicbees.main.utils.compat.EquivalentExchangeHelper;
|
|
||||||
import magicbees.main.utils.compat.RedstoneArsenalHelper;
|
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
|
||||||
import magicbees.main.utils.compat.ThermalModsHelper;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
import forestry.api.apiculture.EnumBeeType;
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||||
@@ -22,304 +16,307 @@ import forestry.api.genetics.EnumTolerance;
|
|||||||
import forestry.api.genetics.IAllele;
|
import forestry.api.genetics.IAllele;
|
||||||
import forestry.api.genetics.IAlleleTolerance;
|
import forestry.api.genetics.IAlleleTolerance;
|
||||||
import forestry.api.genetics.IClassification;
|
import forestry.api.genetics.IClassification;
|
||||||
|
import magicbees.main.utils.compat.AppliedEnergisticsHelper;
|
||||||
|
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||||
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
|
import magicbees.main.utils.compat.EquivalentExchangeHelper;
|
||||||
|
import magicbees.main.utils.compat.RedstoneArsenalHelper;
|
||||||
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
import magicbees.main.utils.compat.ThermalModsHelper;
|
||||||
|
|
||||||
public enum BeeSpecies
|
public enum BeeSpecies {
|
||||||
{
|
|
||||||
MYSTICAL("Mystical", "mysticum", BeeClassification.VEILED,
|
|
||||||
0xAFFFB7, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true),
|
|
||||||
SORCEROUS("Sorcerous", "fascinatio", BeeClassification.VEILED,
|
|
||||||
0xEA9A9A, EnumTemperature.HOT, EnumHumidity.ARID, false, false, true),
|
|
||||||
UNUSUAL("Unusual", "inusitatus", BeeClassification.VEILED,
|
|
||||||
0x72D361, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true),
|
|
||||||
ATTUNED("Attuned", "similis", BeeClassification.VEILED,
|
|
||||||
0x0086A8, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true),
|
|
||||||
|
|
||||||
ELDRITCH("Eldritch", "prodigiosus", BeeClassification.VEILED,
|
MYSTICAL("Mystical", "mysticum", BeeClassification.VEILED, 0xAFFFB7, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0x8D75A0, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
false, false, true),
|
||||||
|
SORCEROUS("Sorcerous", "fascinatio", BeeClassification.VEILED, 0xEA9A9A, EnumTemperature.HOT, EnumHumidity.ARID,
|
||||||
|
false, false, true),
|
||||||
|
UNUSUAL("Unusual", "inusitatus", BeeClassification.VEILED, 0x72D361, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, false, true),
|
||||||
|
ATTUNED("Attuned", "similis", BeeClassification.VEILED, 0x0086A8, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, false, true),
|
||||||
|
|
||||||
ESOTERIC("Esoteric", "secretiore", BeeClassification.ARCANE,
|
ELDRITCH("Eldritch", "prodigiosus", BeeClassification.VEILED, 0x8D75A0, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0x001099, BodyColours.ARCANE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
false, true),
|
||||||
MYSTERIOUS("Mysterious", "mysticus", BeeClassification.ARCANE,
|
|
||||||
0x762bc2, BodyColours.ARCANE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
ARCANE("Arcane", "arcanus", BeeClassification.ARCANE,
|
|
||||||
0xd242df, BodyColours.ARCANE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
|
||||||
|
|
||||||
CHARMED("Charmed", "larvatus", BeeClassification.SUPERNATURAL,
|
ESOTERIC("Esoteric", "secretiore", BeeClassification.ARCANE, 0x001099, BodyColours.ARCANE, EnumTemperature.NORMAL,
|
||||||
0x48EEEC, BodyColours.ARCANE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, true),
|
||||||
ENCHANTED("Enchanted", "cantatus", BeeClassification.SUPERNATURAL,
|
MYSTERIOUS("Mysterious", "mysticus", BeeClassification.ARCANE, 0x762bc2, BodyColours.ARCANE, EnumTemperature.NORMAL,
|
||||||
0x18e726, BodyColours.ARCANE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, true),
|
||||||
SUPERNATURAL("Supernatural", "coeleste", BeeClassification.SUPERNATURAL,
|
ARCANE("Arcane", "arcanus", BeeClassification.ARCANE, 0xd242df, BodyColours.ARCANE, EnumTemperature.NORMAL,
|
||||||
0x005614, BodyColours.ARCANE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
EnumHumidity.NORMAL, true, true),
|
||||||
|
|
||||||
ETHEREAL("Ethereal", "diaphanum",BeeClassification.MAGICAL,
|
CHARMED("Charmed", "larvatus", BeeClassification.SUPERNATURAL, 0x48EEEC, BodyColours.ARCANE, EnumTemperature.NORMAL,
|
||||||
0xBA3B3B, 0xEFF8FF, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
ENCHANTED("Enchanted", "cantatus", BeeClassification.SUPERNATURAL, 0x18e726, BodyColours.ARCANE,
|
||||||
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
|
SUPERNATURAL("Supernatural", "coeleste", BeeClassification.SUPERNATURAL, 0x005614, BodyColours.ARCANE,
|
||||||
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
|
|
||||||
WATERY("Watery", "aquatilis", BeeClassification.MAGICAL,
|
ETHEREAL("Ethereal", "diaphanum", BeeClassification.MAGICAL, 0xBA3B3B, 0xEFF8FF, EnumTemperature.NORMAL,
|
||||||
0x313C5E, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, true),
|
||||||
EARTHY("Earthen", "fictili", BeeClassification.MAGICAL,
|
|
||||||
0x78822D, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
FIREY("Firey", "ardens", BeeClassification.MAGICAL,
|
|
||||||
0xD35119, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
WINDY("Windy", "ventosum", BeeClassification.MAGICAL,
|
|
||||||
0xFFFDBA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
|
|
||||||
PUPIL("Pupil", "disciplina", BeeClassification.SCHOLARLY,
|
WATERY("Watery", "aquatilis", BeeClassification.MAGICAL, 0x313C5E, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0xFFFF00, EnumTemperature.NORMAL, EnumHumidity.ARID, false, true),
|
false, true),
|
||||||
SCHOLARLY("Scholarly", "studiosis", BeeClassification.SCHOLARLY,
|
EARTHY("Earthen", "fictili", BeeClassification.MAGICAL, 0x78822D, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0x6E0000, EnumTemperature.NORMAL, EnumHumidity.ARID, false, false),
|
false, true),
|
||||||
SAVANT("Savant", "philologus", BeeClassification.SCHOLARLY,
|
FIREY("Firey", "ardens", BeeClassification.MAGICAL, 0xD35119, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false,
|
||||||
0xFFA042, EnumTemperature.NORMAL, EnumHumidity.ARID, true, false),
|
true),
|
||||||
|
WINDY("Windy", "ventosum", BeeClassification.MAGICAL, 0xFFFDBA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false,
|
||||||
|
true),
|
||||||
|
|
||||||
AWARE("Aware", "sensibilis", BeeClassification.MAGICAL,
|
PUPIL("Pupil", "disciplina", BeeClassification.SCHOLARLY, 0xFFFF00, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||||
0x5E95B5, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
false, true),
|
||||||
SPIRIT("Spirit", "larva", BeeClassification.SOUL,
|
SCHOLARLY("Scholarly", "studiosis", BeeClassification.SCHOLARLY, 0x6E0000, EnumTemperature.NORMAL,
|
||||||
0xb2964b, EnumTemperature.WARM, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.ARID, false, false),
|
||||||
SOUL("Soul", "anima", BeeClassification.SOUL,
|
SAVANT("Savant", "philologus", BeeClassification.SCHOLARLY, 0xFFA042, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||||
0x7d591b, EnumTemperature.HELLISH, EnumHumidity.NORMAL, true, false),
|
true, false),
|
||||||
|
|
||||||
SKULKING("Skulking", "malevolens", BeeClassification.SKULKING,
|
AWARE("Aware", "sensibilis", BeeClassification.MAGICAL, 0x5E95B5, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0x524827, BodyColours.SKULKING, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
false, false),
|
||||||
GHASTLY("Ghastly", "pallens", BeeClassification.SKULKING,
|
SPIRIT("Spirit", "larva", BeeClassification.SOUL, 0xb2964b, EnumTemperature.WARM, EnumHumidity.NORMAL, false, true),
|
||||||
0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
SOUL("Soul", "anima", BeeClassification.SOUL, 0x7d591b, EnumTemperature.HELLISH, EnumHumidity.NORMAL, true, false),
|
||||||
SPIDERY("Spidery", "araneolus", BeeClassification.SKULKING,
|
|
||||||
0x0888888, 0x222222, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
SMOULDERING("Smouldering", "flagrantia", BeeClassification.SKULKING,
|
|
||||||
0xFFC747, 0xEA8344, EnumTemperature.HELLISH, EnumHumidity.NORMAL, false, false),
|
|
||||||
BRAINY("TCBrainy", "cerebrum", BeeClassification.SKULKING,
|
|
||||||
0x83FF70, BodyColours.SKULKING, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
BIGBAD("BigBad", "magnumalum", BeeClassification.SKULKING,
|
|
||||||
0xA9344B, 0x453536, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true, true, true),
|
|
||||||
CHICKEN("TCChicken", "pullus", BeeClassification.FLESHY,
|
|
||||||
0xFF0000, 0xD3D3D3, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
BEEF("TCBeef", "bubulae", BeeClassification.FLESHY,
|
|
||||||
0xB7B7B7, 0x3F3024, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
PORK("TCPork", "porcina", BeeClassification.FLESHY,
|
|
||||||
0xF1AEAC, 0xDF847B, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
BATTY("TCBatty", "chiroptera", BeeClassification.FLESHY,
|
|
||||||
0x5B482B, 0x271B0F, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
SHEEPISH("Sheepish", "balans", BeeClassification.FLESHY,
|
|
||||||
0xF7F7F7, 0xCACACA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
HORSE("Horse", "equus", BeeClassification.FLESHY,
|
|
||||||
0x906330, 0x7B4E1B, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
CATTY("Catty", "feline", BeeClassification.FLESHY,
|
|
||||||
0xECE684, 0x563C24, EnumTemperature.HOT, EnumHumidity.NORMAL, false, true),
|
|
||||||
|
|
||||||
TIMELY("Timely", "gallifreis", BeeClassification.TIME,
|
SKULKING("Skulking", "malevolens", BeeClassification.SKULKING, 0x524827, BodyColours.SKULKING,
|
||||||
0xC6AF86, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
LORDLY("Lordly", "rassilonis", BeeClassification.TIME,
|
GHASTLY("Ghastly", "pallens", BeeClassification.SKULKING, 0xccccee, 0xbf877c, EnumTemperature.NORMAL,
|
||||||
0xC6AF86, 0x8E0213, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
DOCTORAL("Doctoral", "medicus qui", BeeClassification.TIME,
|
SPIDERY("Spidery", "araneolus", BeeClassification.SKULKING, 0x0888888, 0x222222, EnumTemperature.NORMAL,
|
||||||
0xDDE5FC, 0x4B6E8C, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
SMOULDERING("Smouldering", "flagrantia", BeeClassification.SKULKING, 0xFFC747, 0xEA8344, EnumTemperature.HELLISH,
|
||||||
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
BRAINY("TCBrainy", "cerebrum", BeeClassification.SKULKING, 0x83FF70, BodyColours.SKULKING, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
BIGBAD("BigBad", "magnumalum", BeeClassification.SKULKING, 0xA9344B, 0x453536, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, false, true, true, true),
|
||||||
|
CHICKEN("TCChicken", "pullus", BeeClassification.FLESHY, 0xFF0000, 0xD3D3D3, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
BEEF("TCBeef", "bubulae", BeeClassification.FLESHY, 0xB7B7B7, 0x3F3024, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, true),
|
||||||
|
PORK("TCPork", "porcina", BeeClassification.FLESHY, 0xF1AEAC, 0xDF847B, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, true),
|
||||||
|
BATTY("TCBatty", "chiroptera", BeeClassification.FLESHY, 0x5B482B, 0x271B0F, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
SHEEPISH("Sheepish", "balans", BeeClassification.FLESHY, 0xF7F7F7, 0xCACACA, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
HORSE("Horse", "equus", BeeClassification.FLESHY, 0x906330, 0x7B4E1B, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, true),
|
||||||
|
CATTY("Catty", "feline", BeeClassification.FLESHY, 0xECE684, 0x563C24, EnumTemperature.HOT, EnumHumidity.NORMAL,
|
||||||
|
false, true),
|
||||||
|
|
||||||
INFERNAL("Infernal", "infernales", BeeClassification.ABOMINABLE,
|
TIMELY("Timely", "gallifreis", BeeClassification.TIME, 0xC6AF86, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false,
|
||||||
0xFF1C1C, BodyColours.ABOMINABLE, EnumTemperature.HELLISH, EnumHumidity.ARID, false, true),
|
true),
|
||||||
HATEFUL("Hateful", "odibilis", BeeClassification.ABOMINABLE,
|
LORDLY("Lordly", "rassilonis", BeeClassification.TIME, 0xC6AF86, 0x8E0213, EnumTemperature.NORMAL,
|
||||||
0xDB00DB, BodyColours.ABOMINABLE, EnumTemperature.HELLISH, EnumHumidity.ARID, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
SPITEFUL("Spiteful", "maligna", BeeClassification.ABOMINABLE,
|
DOCTORAL("Doctoral", "medicus qui", BeeClassification.TIME, 0xDDE5FC, 0x4B6E8C, EnumTemperature.NORMAL,
|
||||||
0x5FCC00, BodyColours.ABOMINABLE, EnumTemperature.HELLISH, EnumHumidity.ARID, true, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
WITHERING("Withering", "vietus", BeeClassification.ABOMINABLE,
|
|
||||||
0x5B5B5B, BodyColours.ABOMINABLE, EnumTemperature.HELLISH, EnumHumidity.ARID, true, false),
|
|
||||||
|
|
||||||
OBLIVION("Oblivion", "oblivioni", BeeClassification.EXTRINSIC,
|
INFERNAL("Infernal", "infernales", BeeClassification.ABOMINABLE, 0xFF1C1C, BodyColours.ABOMINABLE,
|
||||||
0xD5C3E5, BodyColours.EXTRINSIC, EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.HELLISH, EnumHumidity.ARID, false, true),
|
||||||
NAMELESS("Nameless", "sine nomine", BeeClassification.EXTRINSIC,
|
HATEFUL("Hateful", "odibilis", BeeClassification.ABOMINABLE, 0xDB00DB, BodyColours.ABOMINABLE,
|
||||||
0x8ca7cb, BodyColours.EXTRINSIC, EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.HELLISH, EnumHumidity.ARID, false, false),
|
||||||
ABANDONED("Abandoned", "reliquit", BeeClassification.EXTRINSIC,
|
SPITEFUL("Spiteful", "maligna", BeeClassification.ABOMINABLE, 0x5FCC00, BodyColours.ABOMINABLE,
|
||||||
0xc5cb8c, BodyColours.EXTRINSIC, EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.HELLISH, EnumHumidity.ARID, true, false),
|
||||||
FORLORN("Forlorn", "perditus", BeeClassification.EXTRINSIC,
|
WITHERING("Withering", "vietus", BeeClassification.ABOMINABLE, 0x5B5B5B, BodyColours.ABOMINABLE,
|
||||||
0xcba88c, BodyColours.EXTRINSIC, EnumTemperature.COLD, EnumHumidity.NORMAL, true, false),
|
EnumTemperature.HELLISH, EnumHumidity.ARID, true, false),
|
||||||
DRACONIC("Draconic", "draconic", BeeClassification.EXTRINSIC,
|
|
||||||
0x9f56ad, 0x5a3b62, EnumTemperature.COLD, EnumHumidity.NORMAL, true, false),
|
|
||||||
|
|
||||||
IRON("Iron", "ferrus", BeeClassification.METALLIC,
|
OBLIVION("Oblivion", "oblivioni", BeeClassification.EXTRINSIC, 0xD5C3E5, BodyColours.EXTRINSIC,
|
||||||
0x686868, 0xE9E9E9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
||||||
GOLD("Gold", "aurum", BeeClassification.METALLIC,
|
NAMELESS("Nameless", "sine nomine", BeeClassification.EXTRINSIC, 0x8ca7cb, BodyColours.EXTRINSIC,
|
||||||
0x684B01, 0xFFFF0B, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
||||||
COPPER("Copper", "aercus", BeeClassification.METALLIC,
|
ABANDONED("Abandoned", "reliquit", BeeClassification.EXTRINSIC, 0xc5cb8c, BodyColours.EXTRINSIC,
|
||||||
0x684B01, 0xFFC81A, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.COLD, EnumHumidity.NORMAL, false, true),
|
||||||
TIN("Tin", "stannum", BeeClassification.METALLIC,
|
FORLORN("Forlorn", "perditus", BeeClassification.EXTRINSIC, 0xcba88c, BodyColours.EXTRINSIC, EnumTemperature.COLD,
|
||||||
0x3E596D, 0xA6BACB, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, true, false),
|
||||||
SILVER("Silver", "argenteus", BeeClassification.METALLIC,
|
DRACONIC("Draconic", "draconic", BeeClassification.EXTRINSIC, 0x9f56ad, 0x5a3b62, EnumTemperature.COLD,
|
||||||
0x747C81, 0x96BFC4, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, true, false),
|
||||||
LEAD("Lead", "plumbeus", BeeClassification.METALLIC,
|
|
||||||
0x96BFC4, 0x91A9F3, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
ALUMINUM("Aluminum", "aluminium", BeeClassification.METALLIC,
|
|
||||||
0xEDEDED, 0x767676, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
|
||||||
ARDITE("Ardite", "aurantiaco", BeeClassification.METALLIC,
|
|
||||||
0x720000, 0xFF9E00, EnumTemperature.HOT, EnumHumidity.ARID, false, false),
|
|
||||||
COBALT("Cobalt", "caeruleo", BeeClassification.METALLIC,
|
|
||||||
0x03265F, 0x59AAEF, EnumTemperature.HOT, EnumHumidity.ARID, false, false),
|
|
||||||
MANYULLYN("Manyullyn", "manahmanah", BeeClassification.METALLIC,
|
|
||||||
0x481D6D, 0xBD92F1, EnumTemperature.HOT, EnumHumidity.ARID, true, false),
|
|
||||||
OSMIUM("Osmium", "hyacintho", BeeClassification.METALLIC,
|
|
||||||
0x374B5B, 0x6C7B89, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
|
||||||
|
|
||||||
DIAMOND("Diamond", "diamond", BeeClassification.GEM,
|
IRON("Iron", "ferrus", BeeClassification.METALLIC, 0x686868, 0xE9E9E9, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0x209581, 0x8DF5E3, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
false, true),
|
||||||
EMERALD("Emerald", "prasinus", BeeClassification.GEM,
|
GOLD("Gold", "aurum", BeeClassification.METALLIC, 0x684B01, 0xFFFF0B, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0x005300, 0x17DD62, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
true, false),
|
||||||
APATITE("Apatite", "apatite", BeeClassification.GEM,
|
COPPER("Copper", "aercus", BeeClassification.METALLIC, 0x684B01, 0xFFC81A, EnumTemperature.NORMAL,
|
||||||
0x2EA7EC, 0x001D51, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, true),
|
||||||
SILICON("Silicon", "siliconisque", BeeClassification.GEM,
|
TIN("Tin", "stannum", BeeClassification.METALLIC, 0x3E596D, 0xA6BACB, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0xADA2A7, 0x736675, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
false, true),
|
||||||
CERTUS("Certus", "alia cristallum", BeeClassification.GEM,
|
SILVER("Silver", "argenteus", BeeClassification.METALLIC, 0x747C81, 0x96BFC4, EnumTemperature.NORMAL,
|
||||||
0x93C7FF, 0xA6B8C7, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, false),
|
||||||
FLUIX("Fluix", "alien cristallum", BeeClassification.GEM,
|
LEAD("Lead", "plumbeus", BeeClassification.METALLIC, 0x96BFC4, 0x91A9F3, EnumTemperature.NORMAL,
|
||||||
0xFC639E, 0x534797, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
ALUMINUM("Aluminum", "aluminium", BeeClassification.METALLIC, 0xEDEDED, 0x767676, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
ARDITE("Ardite", "aurantiaco", BeeClassification.METALLIC, 0x720000, 0xFF9E00, EnumTemperature.HOT,
|
||||||
|
EnumHumidity.ARID, false, false),
|
||||||
|
COBALT("Cobalt", "caeruleo", BeeClassification.METALLIC, 0x03265F, 0x59AAEF, EnumTemperature.HOT, EnumHumidity.ARID,
|
||||||
|
false, false),
|
||||||
|
MANYULLYN("Manyullyn", "manahmanah", BeeClassification.METALLIC, 0x481D6D, 0xBD92F1, EnumTemperature.HOT,
|
||||||
|
EnumHumidity.ARID, true, false),
|
||||||
|
DIAMOND("Diamond", "diamond", BeeClassification.GEM, 0x209581, 0x8DF5E3, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, true, false),
|
||||||
|
EMERALD("Emerald", "prasinus", BeeClassification.GEM, 0x005300, 0x17DD62, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, true, false),
|
||||||
|
APATITE("Apatite", "apatite", BeeClassification.GEM, 0x2EA7EC, 0x001D51, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
SILICON("Silicon", "siliconisque", BeeClassification.GEM, 0xADA2A7, 0x736675, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
CERTUS("Certus", "alia cristallum", BeeClassification.GEM, 0x93C7FF, 0xA6B8C7, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
FLUIX("Fluix", "alien cristallum", BeeClassification.GEM, 0xFC639E, 0x534797, EnumTemperature.NORMAL,
|
||||||
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
|
||||||
MUTABLE("Mutable", "mutable", BeeClassification.TRANSMUTING,
|
MUTABLE("Mutable", "mutable", BeeClassification.TRANSMUTING, 0xDBB24C, 0xE0D5A6, EnumTemperature.NORMAL,
|
||||||
0xDBB24C, 0xE0D5A6, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
TRANSMUTING("Transmuting", "transmuting", BeeClassification.TRANSMUTING,
|
TRANSMUTING("Transmuting", "transmuting", BeeClassification.TRANSMUTING, 0xDBB24C, 0xA2D2D8, EnumTemperature.NORMAL,
|
||||||
0xDBB24C, 0xA2D2D8, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
CRUMBLING("Crumbling", "crumbling", BeeClassification.TRANSMUTING,
|
CRUMBLING("Crumbling", "crumbling", BeeClassification.TRANSMUTING, 0xDBB24C, 0xDBA4A4, EnumTemperature.HOT,
|
||||||
0xDBB24C, 0xDBA4A4, EnumTemperature.HOT, EnumHumidity.ARID, false, false),
|
EnumHumidity.ARID, false, false),
|
||||||
|
|
||||||
INVISIBLE("Invisible", "invisible", BeeClassification.VEILED,
|
INVISIBLE("Invisible", "invisible", BeeClassification.VEILED, 0xffccff, 0xffffff, EnumTemperature.NORMAL,
|
||||||
0xffccff, 0xffffff, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
|
||||||
// --------- Thaumcraft Bees ---------------------------------------------------------------------------------------
|
// --------- Thaumcraft Bees ---------------------------------------------------------------------------------------
|
||||||
TC_AIR("TCAir", "aether", BeeClassification.THAUMIC,
|
TC_AIR("TCAir", "aether", BeeClassification.THAUMIC, 0xD9D636, BodyColours.THAUMCRAFT_SHARD, EnumTemperature.NORMAL,
|
||||||
0xD9D636, BodyColours.THAUMCRAFT_SHARD, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
EnumHumidity.NORMAL, true, true),
|
||||||
TC_FIRE("TCFire", "praefervidus", BeeClassification.THAUMIC,
|
TC_FIRE("TCFire", "praefervidus", BeeClassification.THAUMIC, 0xE50B0B, BodyColours.THAUMCRAFT_SHARD,
|
||||||
0xE50B0B, BodyColours.THAUMCRAFT_SHARD, EnumTemperature.HOT, EnumHumidity.ARID, true, true),
|
EnumTemperature.HOT, EnumHumidity.ARID, true, true),
|
||||||
TC_WATER("TCWater", "umidus", BeeClassification.THAUMIC,
|
TC_WATER("TCWater", "umidus", BeeClassification.THAUMIC, 0x36CFD9, BodyColours.THAUMCRAFT_SHARD,
|
||||||
0x36CFD9, BodyColours.THAUMCRAFT_SHARD, EnumTemperature.NORMAL, EnumHumidity.DAMP, true, true),
|
EnumTemperature.NORMAL, EnumHumidity.DAMP, true, true),
|
||||||
TC_EARTH("TCEarth", "sordida", BeeClassification.THAUMIC,
|
TC_EARTH("TCEarth", "sordida", BeeClassification.THAUMIC, 0x005100, BodyColours.THAUMCRAFT_SHARD,
|
||||||
0x005100, BodyColours.THAUMCRAFT_SHARD, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
TC_ORDER("TCOrder", "ordinatus", BeeClassification.THAUMIC,
|
TC_ORDER("TCOrder", "ordinatus", BeeClassification.THAUMIC, 0xaa32fc, BodyColours.THAUMCRAFT_SHARD,
|
||||||
0xaa32fc, BodyColours.THAUMCRAFT_SHARD, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
TC_CHAOS("TCChaos", "tenebrarum", BeeClassification.THAUMIC,
|
TC_CHAOS("TCChaos", "tenebrarum", BeeClassification.THAUMIC, 0xCCCCCC, BodyColours.THAUMCRAFT_SHARD,
|
||||||
0xCCCCCC, BodyColours.THAUMCRAFT_SHARD, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
|
TC_ESSENTIA("TCEssentia", "defaultium essentia apis", BeeClassification.THAUMIC, 0xCCCCCC,
|
||||||
|
BodyColours.THAUMCRAFT_SHARD, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
|
|
||||||
TC_VIS("TCVis", "arcanus saecula", BeeClassification.THAUMIC,
|
TC_VIS("TCVis", "arcanus saecula", BeeClassification.THAUMIC, 0x004c99, BodyColours.THAUMCRAFT_NODE,
|
||||||
0x004c99, BodyColours.THAUMCRAFT_NODE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
TC_REJUVENATING("TCRejuvenating", "arcanus vitae", BeeClassification.THAUMIC,
|
TC_REJUVENATING("TCRejuvenating", "arcanus vitae", BeeClassification.THAUMIC, 0x91D0D9, BodyColours.THAUMCRAFT_NODE,
|
||||||
0x91D0D9, BodyColours.THAUMCRAFT_NODE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
TC_EMPOWERING("TCEmpowering", "tractus", BeeClassification.THAUMIC,
|
TC_EMPOWERING("TCEmpowering", "tractus", BeeClassification.THAUMIC, 0x96FFBC, BodyColours.THAUMCRAFT_NODE,
|
||||||
0x96FFBC, BodyColours.THAUMCRAFT_NODE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
TC_NEXUS("TCNexus", "nexi", BeeClassification.THAUMIC,
|
TC_NEXUS("TCNexus", "nexi", BeeClassification.THAUMIC, 0x15AFAF, BodyColours.THAUMCRAFT_NODE,
|
||||||
0x15AFAF, BodyColours.THAUMCRAFT_NODE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
TC_TAINT("TCFlux", "arcanus labe", BeeClassification.THAUMIC,
|
TC_TAINT("TCFlux", "arcanus labe", BeeClassification.THAUMIC, 0x91376A, BodyColours.THAUMCRAFT_NODE,
|
||||||
0x91376A, BodyColours.THAUMCRAFT_NODE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
TC_PURE("TCPure", "arcanus puritatem", BeeClassification.THAUMIC,
|
TC_PURE("TCPure", "arcanus puritatem", BeeClassification.THAUMIC, 0xE23F65, BodyColours.THAUMCRAFT_NODE,
|
||||||
0xE23F65, BodyColours.THAUMCRAFT_NODE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
TC_HUNGRY("TCHungry", "omnique", BeeClassification.THAUMIC,
|
TC_HUNGRY("TCHungry", "omnique", BeeClassification.THAUMIC, 0xDCA5E2, BodyColours.THAUMCRAFT_NODE,
|
||||||
0xDCA5E2, BodyColours.THAUMCRAFT_NODE, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
|
|
||||||
TC_WISPY("TCWispy", "umbrabilis", BeeClassification.THAUMIC,
|
TC_WISPY("TCWispy", "umbrabilis", BeeClassification.THAUMIC, 0x9cb8d5, BodyColours.SKULKING, EnumTemperature.NORMAL,
|
||||||
0x9cb8d5, BodyColours.SKULKING, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
TC_VOID("TCVoid", "obscurus", BeeClassification.METALLIC,
|
TC_VOID("TCVoid", "obscurus", BeeClassification.METALLIC, 0x180A29, 0x4B2A74, EnumTemperature.ICY,
|
||||||
0x180A29, 0x4B2A74, EnumTemperature.ICY, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
|
||||||
// --------- Equivalent Exchange Bees -----------------------------------------------------------------------------
|
// --------- Equivalent Exchange Bees -----------------------------------------------------------------------------
|
||||||
EE_MINIUM("EEMinium", "mutabilis", BeeClassification.ALCHEMICAL,
|
EE_MINIUM("EEMinium", "mutabilis", BeeClassification.ALCHEMICAL, 0xac0921, 0x3a030b, EnumTemperature.NORMAL,
|
||||||
0xac0921, 0x3a030b, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, true),
|
||||||
|
|
||||||
// --------- Ars Magica Bees --------------------------------------------------------------------------------------
|
// --------- Ars Magica Bees --------------------------------------------------------------------------------------
|
||||||
AM_ESSENCE("AMEssence", "essentia", BeeClassification.ESSENTIAL,
|
AM_ESSENCE("AMEssence", "essentia", BeeClassification.ESSENTIAL, 0x86BBC5, BodyColours.ARSMAGICA,
|
||||||
0x86BBC5, BodyColours.ARSMAGICA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
AM_QUINTESSENCE("AMQuintessence", "cor essentia", BeeClassification.ESSENTIAL,
|
AM_QUINTESSENCE("AMQuintessence", "cor essentia", BeeClassification.ESSENTIAL, 0xE3A45B, BodyColours.ARSMAGICA,
|
||||||
0xE3A45B, BodyColours.ARSMAGICA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
|
|
||||||
AM_EARTH("AMEarth", "magica terra", BeeClassification.ESSENTIAL,
|
AM_EARTH("AMEarth", "magica terra", BeeClassification.ESSENTIAL, 0xAA875E, BodyColours.ARSMAGICA,
|
||||||
0xAA875E, BodyColours.ARSMAGICA, EnumTemperature.WARM, EnumHumidity.ARID, false, false),
|
EnumTemperature.WARM, EnumHumidity.ARID, false, false),
|
||||||
AM_AIR("AMAir", "magica aer", BeeClassification.ESSENTIAL,
|
AM_AIR("AMAir", "magica aer", BeeClassification.ESSENTIAL, 0xD5EB9D, BodyColours.ARSMAGICA, EnumTemperature.NORMAL,
|
||||||
0xD5EB9D, BodyColours.ARSMAGICA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
AM_FIRE("AMFire", "magica ignis", BeeClassification.ESSENTIAL,
|
AM_FIRE("AMFire", "magica ignis", BeeClassification.ESSENTIAL, 0x93451E, BodyColours.ARSMAGICA, EnumTemperature.HOT,
|
||||||
0x93451E, BodyColours.ARSMAGICA, EnumTemperature.HOT, EnumHumidity.ARID, false, false),
|
EnumHumidity.ARID, false, false),
|
||||||
AM_WATER("AMWater", "magica aqua", BeeClassification.ESSENTIAL,
|
AM_WATER("AMWater", "magica aqua", BeeClassification.ESSENTIAL, 0x3B7D8C, BodyColours.ARSMAGICA,
|
||||||
0x3B7D8C, BodyColours.ARSMAGICA, EnumTemperature.NORMAL, EnumHumidity.DAMP, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.DAMP, false, false),
|
||||||
AM_LIGHTNING("AMLightning", "magica fulgur", BeeClassification.ESSENTIAL,
|
AM_LIGHTNING("AMLightning", "magica fulgur", BeeClassification.ESSENTIAL, 0xEBEFA1, BodyColours.ARSMAGICA,
|
||||||
0xEBEFA1, BodyColours.ARSMAGICA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
AM_PLANT("AMPlant", "magica herba", BeeClassification.ESSENTIAL,
|
AM_PLANT("AMPlant", "magica herba", BeeClassification.ESSENTIAL, 0x49B549, BodyColours.ARSMAGICA,
|
||||||
0x49B549, BodyColours.ARSMAGICA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
AM_ICE("AMIce", "magica glacium", BeeClassification.ESSENTIAL,
|
AM_ICE("AMIce", "magica glacium", BeeClassification.ESSENTIAL, 0x86BAC6, BodyColours.ARSMAGICA,
|
||||||
0x86BAC6, BodyColours.ARSMAGICA, EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
||||||
AM_ARCANE("AMArcane", "magica arcanum", BeeClassification.ESSENTIAL,
|
AM_ARCANE("AMArcane", "magica arcanum", BeeClassification.ESSENTIAL, 0x76184D, BodyColours.ARSMAGICA,
|
||||||
0x76184D, BodyColours.ARSMAGICA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
|
|
||||||
AM_VORTEX("AMVortex", "gurges", BeeClassification.ESSENTIAL,
|
AM_VORTEX("AMVortex", "gurges", BeeClassification.ESSENTIAL, 0x71BBE2, 0x0B35A8, EnumTemperature.NORMAL,
|
||||||
0x71BBE2, 0x0B35A8, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumHumidity.NORMAL, false, true),
|
||||||
AM_WIGHT("AMWight", "vectem", BeeClassification.ESSENTIAL,
|
AM_WIGHT("AMWight", "vectem", BeeClassification.ESSENTIAL, 0xB50000, 0x4C4837, EnumTemperature.NORMAL,
|
||||||
0xB50000, 0x4C4837, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
|
||||||
// ---------------------Thermal Expansion Bees---------------------------
|
// ---------------------Thermal Expansion Bees---------------------------
|
||||||
TE_BLIZZY("TEBlizzy", "blizzard", BeeClassification.ABOMINABLE,
|
TE_BLIZZY("TEBlizzy", "blizzard", BeeClassification.ABOMINABLE, 0x0073C4, EnumTemperature.COLD, EnumHumidity.NORMAL,
|
||||||
0x0073C4, EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
false, false),
|
||||||
TE_GELID("TEGelid", "cyro", BeeClassification.ABOMINABLE,
|
TE_GELID("TEGelid", "cyro", BeeClassification.ABOMINABLE, 0x4AAFF7, EnumTemperature.COLD, EnumHumidity.NORMAL, true,
|
||||||
0x4AAFF7, EnumTemperature.COLD, EnumHumidity.NORMAL, true, true),
|
true),
|
||||||
TE_DANTE("TEDante", "inferno", BeeClassification.ABOMINABLE,
|
TE_DANTE("TEDante", "inferno", BeeClassification.ABOMINABLE, 0xF7AC4A, EnumTemperature.HELLISH, EnumHumidity.ARID,
|
||||||
0xF7AC4A, EnumTemperature.HELLISH, EnumHumidity.ARID, false, false),
|
false, false),
|
||||||
TE_PYRO("TEPyro", "pyromania", BeeClassification.ABOMINABLE,
|
TE_PYRO("TEPyro", "pyromania", BeeClassification.ABOMINABLE, 0xFA930C, EnumTemperature.HELLISH, EnumHumidity.ARID,
|
||||||
0xFA930C, EnumTemperature.HELLISH, EnumHumidity.ARID, true, true),
|
true, true),
|
||||||
TE_SHOCKING("TEShocking", "horrendum", BeeClassification.ABOMINABLE,
|
TE_SHOCKING("TEShocking", "horrendum", BeeClassification.ABOMINABLE, 0xC5FF26, 0xF8EE00, EnumTemperature.NORMAL,
|
||||||
0xC5FF26, 0xF8EE00, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
TE_AMPED("TEAmped", "concitatus", BeeClassification.ABOMINABLE,
|
TE_AMPED("TEAmped", "concitatus", BeeClassification.ABOMINABLE, 0x8AFFFF, 0xECE670, EnumTemperature.NORMAL,
|
||||||
0x8AFFFF, 0xECE670, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
EnumHumidity.NORMAL, true, false),
|
||||||
TE_GROUNDED("TEGrounded", "tellus", BeeClassification.ABOMINABLE,
|
TE_GROUNDED("TEGrounded", "tellus", BeeClassification.ABOMINABLE, 0xCEC1C1, 0x826767, EnumTemperature.HOT,
|
||||||
0xCEC1C1, 0x826767, EnumTemperature.HOT, EnumHumidity.ARID, false, true),
|
EnumHumidity.ARID, false, true),
|
||||||
TE_ROCKING("TERocking", "saxsous", BeeClassification.ABOMINABLE,
|
TE_ROCKING("TERocking", "saxsous", BeeClassification.ABOMINABLE, 0x980000, 0xAB9D9B, EnumTemperature.HOT,
|
||||||
0x980000, 0xAB9D9B, EnumTemperature.HOT, EnumHumidity.ARID, true, true),
|
EnumHumidity.ARID, true, true),
|
||||||
|
|
||||||
TE_ELECTRUM("TEElectrum", "electrum", BeeClassification.THERMAL,
|
TE_ELECTRUM("TEElectrum", "electrum", BeeClassification.THERMAL, 0xEAF79E, EnumTemperature.HOT, EnumHumidity.ARID,
|
||||||
0xEAF79E, EnumTemperature.HOT,EnumHumidity.ARID, false, false),
|
false, false),
|
||||||
TE_PLATINUM("TEPlatinum", "platina", BeeClassification.THERMAL,
|
TE_PLATINUM("TEPlatinum", "platina", BeeClassification.THERMAL, 0x9EE7F7, EnumTemperature.NORMAL,
|
||||||
0x9EE7F7, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
TE_NICKEL("TENickel", "nickel",BeeClassification.THERMAL,
|
TE_NICKEL("TENickel", "nickel", BeeClassification.THERMAL, 0xB4C989, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0xB4C989, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
false, false),
|
||||||
TE_INVAR("TEInvar", "invar", BeeClassification.THERMAL,
|
TE_INVAR("TEInvar", "invar", BeeClassification.THERMAL, 0xCDE3A1, EnumTemperature.HOT, EnumHumidity.ARID, false,
|
||||||
0xCDE3A1, EnumTemperature.HOT, EnumHumidity.ARID, false, false),
|
false),
|
||||||
TE_BRONZE("TEBronze", "pyropus", BeeClassification.THERMAL,
|
TE_BRONZE("TEBronze", "pyropus", BeeClassification.THERMAL, 0xB56D07, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0xB56D07, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
false, false),
|
||||||
TE_COAL("TECoal", "carbonis", BeeClassification.THERMAL,
|
TE_COAL("TECoal", "carbonis", BeeClassification.THERMAL, 0x2E2D2D, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0x2E2D2D, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
false, false),
|
||||||
TE_DESTABILIZED("TEDestabilized", "electric", BeeClassification.THERMAL,
|
TE_DESTABILIZED("TEDestabilized", "electric", BeeClassification.THERMAL, 0x5E0203, EnumTemperature.NORMAL,
|
||||||
0x5E0203, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
TE_LUX("TELux", "lux", BeeClassification.THERMAL,
|
TE_LUX("TELux", "lux", BeeClassification.THERMAL, 0xF1FA89, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false,
|
||||||
0xF1FA89, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
false),
|
||||||
TE_WINSOME("TEWinsome", "cuniculus", BeeClassification.ADORABLE,
|
TE_WINSOME("TEWinsome", "cuniculus", BeeClassification.ADORABLE, 0x096B67, EnumTemperature.COLD,
|
||||||
0x096B67, EnumTemperature.COLD, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
TE_ENDEARING("TEEndearing", "cognito", BeeClassification.ADORABLE,
|
TE_ENDEARING("TEEndearing", "cognito", BeeClassification.ADORABLE, 0x069E97, EnumTemperature.COLD,
|
||||||
0x069E97, EnumTemperature.COLD, EnumHumidity.NORMAL, true, true),
|
EnumHumidity.NORMAL, true, true),
|
||||||
TE_SIGNALUS("TESignalus", "scelerisque", BeeClassification.THERMAL,
|
TE_SIGNALUS("TESignalus", "scelerisque", BeeClassification.THERMAL, 0x5E0203, EnumTemperature.NORMAL,
|
||||||
0x5E0203, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
EnumHumidity.NORMAL, true, true),
|
||||||
TE_LUMIUS("TELumius", "lucidum", BeeClassification.THERMAL,
|
TE_LUMIUS("TELumius", "lucidum", BeeClassification.THERMAL, 0xF1FA89, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
0xF1FA89, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
true, true),
|
||||||
|
|
||||||
// --------------------Redstone Arsenal Bees-----------------------------
|
// --------------------Redstone Arsenal Bees-----------------------------
|
||||||
RSA_FLUXED("RSAFluxed", "Thermametallic electroflux", BeeClassification.THERMAL,
|
RSA_FLUXED("RSAFluxed", "Thermametallic electroflux", BeeClassification.THERMAL, 0x9E060D, EnumTemperature.NORMAL,
|
||||||
0x9E060D, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
|
||||||
// ----------------------Botania Bees---------------------------------------
|
// ----------------------Botania Bees---------------------------------------
|
||||||
BOT_ROOTED("BotRooted", "truncus", BeeClassification.BOTANICAL,
|
BOT_ROOTED("BotRooted", "truncus", BeeClassification.BOTANICAL, 0x00A800, BodyColours.BOTANIA,
|
||||||
0x00A800, BodyColours.BOTANIA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
|
|
||||||
BOT_BOTANIC("BotBotanic", "botanica", BeeClassification.BOTANICAL,
|
BOT_BOTANIC("BotBotanic", "botanica", BeeClassification.BOTANICAL, 0x94C661, BodyColours.BOTANIA,
|
||||||
0x94C661, BodyColours.BOTANIA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
BOT_BLOSSOM("BotBlossom", "viridis", BeeClassification.BOTANICAL,
|
BOT_BLOSSOM("BotBlossom", "viridis", BeeClassification.BOTANICAL, 0xA4C193, BodyColours.BOTANIA,
|
||||||
0xA4C193, BodyColours.BOTANIA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
BOT_FLORAL("BotFloral", "florens", BeeClassification.BOTANICAL,
|
BOT_FLORAL("BotFloral", "florens", BeeClassification.BOTANICAL, 0x29D81A, BodyColours.BOTANIA,
|
||||||
0x29D81A, BodyColours.BOTANIA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
|
|
||||||
BOT_VAZBEE("BotVazbee", "vazbii", BeeClassification.BOTANICAL,
|
BOT_VAZBEE("BotVazbee", "vazbii", BeeClassification.BOTANICAL, 0xff6b9c, BodyColours.BOTANIA,
|
||||||
0xff6b9c, BodyColours.BOTANIA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
|
|
||||||
BOT_SOMNOLENT("BotSomnolent", "soporatus", BeeClassification.BOTANICAL,
|
BOT_SOMNOLENT("BotSomnolent", "soporatus", BeeClassification.BOTANICAL, 0x2978C6, BodyColours.BOTANIA,
|
||||||
0x2978C6, BodyColours.BOTANIA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true, true, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true, true, true),
|
||||||
BOT_DREAMING("BotDreaming", "somnior", BeeClassification.BOTANICAL,
|
BOT_DREAMING("BotDreaming", "somnior", BeeClassification.BOTANICAL, 0x123456, BodyColours.BOTANIA,
|
||||||
0x123456, BodyColours.BOTANIA, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true, true, true),
|
EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false, true, true, true),
|
||||||
|
|
||||||
BOT_ALFHEIM("BotAlfheim", "alfheimis", BeeClassification.BOTANICAL,
|
BOT_ALFHEIM("BotAlfheim", "alfheimis", BeeClassification.BOTANICAL, -1, -1, EnumTemperature.NORMAL,
|
||||||
-1, -1, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
EnumHumidity.NORMAL, false, false),
|
||||||
|
|
||||||
// -------------------Applied Energistics 2 Bees---------------------------
|
// -------------------Applied Energistics 2 Bees---------------------------
|
||||||
AE_SKYSTONE("AESkystone", "terra astris", BeeClassification.TRANSMUTING,
|
AE_SKYSTONE("AESkystone", "terra astris", BeeClassification.TRANSMUTING, 0x4B8381, 0x252929, EnumTemperature.HOT,
|
||||||
0x4B8381, 0x252929, EnumTemperature.HOT, EnumHumidity.ARID, false, true),
|
EnumHumidity.ARID, false, true),;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
// For body colours used by more than one bee.
|
// For body colours used by more than one bee.
|
||||||
private class BodyColours {
|
private class BodyColours {
|
||||||
|
|
||||||
static final int DEFAULT = 0xFF7C26;
|
static final int DEFAULT = 0xFF7C26;
|
||||||
static final int ARCANE = 0xFF9D60;
|
static final int ARCANE = 0xFF9D60;
|
||||||
static final int ABOMINABLE = 0x960F00;
|
static final int ABOMINABLE = 0x960F00;
|
||||||
@@ -387,7 +384,6 @@ public enum BeeSpecies
|
|||||||
ARDITE.registerGenomeTemplate(BeeGenomeManager.getTemplateArdite());
|
ARDITE.registerGenomeTemplate(BeeGenomeManager.getTemplateArdite());
|
||||||
COBALT.registerGenomeTemplate(BeeGenomeManager.getTemplateCobalt());
|
COBALT.registerGenomeTemplate(BeeGenomeManager.getTemplateCobalt());
|
||||||
MANYULLYN.registerGenomeTemplate(BeeGenomeManager.getTemplateManyullyn());
|
MANYULLYN.registerGenomeTemplate(BeeGenomeManager.getTemplateManyullyn());
|
||||||
OSMIUM.registerGenomeTemplate(BeeGenomeManager.getTemplateOsmium());
|
|
||||||
DIAMOND.registerGenomeTemplate(BeeGenomeManager.getTemplateDiamond());
|
DIAMOND.registerGenomeTemplate(BeeGenomeManager.getTemplateDiamond());
|
||||||
EMERALD.registerGenomeTemplate(BeeGenomeManager.getTemplateEmerald());
|
EMERALD.registerGenomeTemplate(BeeGenomeManager.getTemplateEmerald());
|
||||||
APATITE.registerGenomeTemplate(BeeGenomeManager.getTemplateApatite());
|
APATITE.registerGenomeTemplate(BeeGenomeManager.getTemplateApatite());
|
||||||
@@ -404,6 +400,7 @@ public enum BeeSpecies
|
|||||||
TC_EARTH.registerGenomeTemplate(BeeGenomeManager.getTemplateTCEarth());
|
TC_EARTH.registerGenomeTemplate(BeeGenomeManager.getTemplateTCEarth());
|
||||||
TC_ORDER.registerGenomeTemplate(BeeGenomeManager.getTemplateTCOrder());
|
TC_ORDER.registerGenomeTemplate(BeeGenomeManager.getTemplateTCOrder());
|
||||||
TC_CHAOS.registerGenomeTemplate(BeeGenomeManager.getTemplateTCChaos());
|
TC_CHAOS.registerGenomeTemplate(BeeGenomeManager.getTemplateTCChaos());
|
||||||
|
TC_ESSENTIA.registerGenomeTemplate(BeeGenomeManager.getTemplateTCEssentia());
|
||||||
TC_VIS.registerGenomeTemplate(BeeGenomeManager.getTemplateTCVis());
|
TC_VIS.registerGenomeTemplate(BeeGenomeManager.getTemplateTCVis());
|
||||||
TC_REJUVENATING.registerGenomeTemplate(BeeGenomeManager.getTemplateTCRejuvinating());
|
TC_REJUVENATING.registerGenomeTemplate(BeeGenomeManager.getTemplateTCRejuvinating());
|
||||||
TC_EMPOWERING.registerGenomeTemplate(BeeGenomeManager.getTemplateTCEmpowering());
|
TC_EMPOWERING.registerGenomeTemplate(BeeGenomeManager.getTemplateTCEmpowering());
|
||||||
@@ -467,6 +464,7 @@ public enum BeeSpecies
|
|||||||
TC_WATER.setInactive();
|
TC_WATER.setInactive();
|
||||||
TC_EARTH.setInactive();
|
TC_EARTH.setInactive();
|
||||||
TC_ORDER.setInactive();
|
TC_ORDER.setInactive();
|
||||||
|
TC_ESSENTIA.setInactive();
|
||||||
|
|
||||||
TC_VIS.setInactive();
|
TC_VIS.setInactive();
|
||||||
TC_REJUVENATING.setInactive();
|
TC_REJUVENATING.setInactive();
|
||||||
@@ -562,32 +560,80 @@ public enum BeeSpecies
|
|||||||
private IAllele genomeTemplate[];
|
private IAllele genomeTemplate[];
|
||||||
|
|
||||||
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour,
|
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour,
|
||||||
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant) {
|
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect,
|
||||||
this(speciesName, genusName, classification, firstColour, BodyColours.DEFAULT,
|
boolean isSpeciesDominant) {
|
||||||
preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant, false);
|
this(
|
||||||
|
speciesName,
|
||||||
|
genusName,
|
||||||
|
classification,
|
||||||
|
firstColour,
|
||||||
|
BodyColours.DEFAULT,
|
||||||
|
preferredTemp,
|
||||||
|
preferredHumidity,
|
||||||
|
hasGlowEffect,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
isSpeciesDominant,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour,
|
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour,
|
||||||
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant) {
|
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect,
|
||||||
this(speciesName, genusName, classification, firstColour, secondColour,
|
boolean isSpeciesDominant) {
|
||||||
preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant, false);
|
this(
|
||||||
|
speciesName,
|
||||||
|
genusName,
|
||||||
|
classification,
|
||||||
|
firstColour,
|
||||||
|
secondColour,
|
||||||
|
preferredTemp,
|
||||||
|
preferredHumidity,
|
||||||
|
hasGlowEffect,
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
isSpeciesDominant,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour,
|
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour,
|
||||||
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean isSecret, boolean hasGlowEffect, boolean isSpeciesDominant) {
|
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean isSecret, boolean hasGlowEffect,
|
||||||
this(speciesName, genusName, classification, firstColour, secondColour,
|
boolean isSpeciesDominant) {
|
||||||
preferredTemp, preferredHumidity, hasGlowEffect, isSecret, true, isSpeciesDominant, false);
|
this(
|
||||||
|
speciesName,
|
||||||
|
genusName,
|
||||||
|
classification,
|
||||||
|
firstColour,
|
||||||
|
secondColour,
|
||||||
|
preferredTemp,
|
||||||
|
preferredHumidity,
|
||||||
|
hasGlowEffect,
|
||||||
|
isSecret,
|
||||||
|
true,
|
||||||
|
isSpeciesDominant,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour,
|
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour,
|
||||||
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean isSecret, boolean hasGlowEffect, boolean isSpeciesDominant) {
|
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean isSecret, boolean hasGlowEffect,
|
||||||
this(speciesName, genusName, classification, firstColour, BodyColours.DEFAULT,
|
boolean isSpeciesDominant) {
|
||||||
preferredTemp, preferredHumidity, hasGlowEffect, isSecret, true, isSpeciesDominant, false);
|
this(
|
||||||
|
speciesName,
|
||||||
|
genusName,
|
||||||
|
classification,
|
||||||
|
firstColour,
|
||||||
|
BodyColours.DEFAULT,
|
||||||
|
preferredTemp,
|
||||||
|
preferredHumidity,
|
||||||
|
hasGlowEffect,
|
||||||
|
isSecret,
|
||||||
|
true,
|
||||||
|
isSpeciesDominant,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour,
|
BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour,
|
||||||
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesSecret, boolean isSpeciesCounted,
|
EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect,
|
||||||
boolean isSpeciesDominant, boolean isSpeciesNocturnal) {
|
boolean isSpeciesSecret, boolean isSpeciesCounted, boolean isSpeciesDominant, boolean isSpeciesNocturnal) {
|
||||||
|
|
||||||
String uid = "magicbees.species" + speciesName;
|
String uid = "magicbees.species" + speciesName;
|
||||||
|
|
||||||
@@ -595,7 +641,16 @@ public enum BeeSpecies
|
|||||||
this.humidity = preferredHumidity;
|
this.humidity = preferredHumidity;
|
||||||
|
|
||||||
IBeeFactory beeFactory = forestry.api.apiculture.BeeManager.beeFactory;
|
IBeeFactory beeFactory = forestry.api.apiculture.BeeManager.beeFactory;
|
||||||
this.species = beeFactory.createSpecies(uid, isSpeciesDominant, authority, uid, uid + ".description", classification, genusName, firstColour, secondColour);
|
this.species = beeFactory.createSpecies(
|
||||||
|
uid,
|
||||||
|
isSpeciesDominant,
|
||||||
|
authority,
|
||||||
|
uid,
|
||||||
|
uid + ".description",
|
||||||
|
classification,
|
||||||
|
genusName,
|
||||||
|
firstColour,
|
||||||
|
secondColour);
|
||||||
|
|
||||||
this.species.setTemperature(preferredTemp);
|
this.species.setTemperature(preferredTemp);
|
||||||
this.species.setHumidity(preferredHumidity);
|
this.species.setHumidity(preferredHumidity);
|
||||||
@@ -635,7 +690,9 @@ public enum BeeSpecies
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getBeeItem(EnumBeeType beeType) {
|
public ItemStack getBeeItem(EnumBeeType beeType) {
|
||||||
return BeeManager.beeRoot.getMemberStack(BeeManager.beeRoot.getBee(null, BeeManager.beeRoot.templateAsGenome(genomeTemplate)), beeType.ordinal());
|
return BeeManager.beeRoot.getMemberStack(
|
||||||
|
BeeManager.beeRoot.getBee(null, BeeManager.beeRoot.templateAsGenome(genomeTemplate)),
|
||||||
|
beeType.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public BeeSpecies setInactive() {
|
public BeeSpecies setInactive() {
|
||||||
@@ -707,14 +764,25 @@ public enum BeeSpecies
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean canWorkInTemperature(EnumTemperature temp) {
|
public boolean canWorkInTemperature(EnumTemperature temp) {
|
||||||
IAlleleTolerance tolerance = (IAlleleTolerance) genomeTemplate[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()];
|
IAlleleTolerance tolerance = (IAlleleTolerance) genomeTemplate[EnumBeeChromosome.TEMPERATURE_TOLERANCE
|
||||||
return AlleleManager.climateHelper
|
.ordinal()];
|
||||||
.isWithinLimits(temp, EnumHumidity.NORMAL, temperature, tolerance.getValue(), EnumHumidity.NORMAL, EnumTolerance.NONE);
|
return AlleleManager.climateHelper.isWithinLimits(
|
||||||
|
temp,
|
||||||
|
EnumHumidity.NORMAL,
|
||||||
|
temperature,
|
||||||
|
tolerance.getValue(),
|
||||||
|
EnumHumidity.NORMAL,
|
||||||
|
EnumTolerance.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canWorkInHumidity(EnumHumidity humid) {
|
public boolean canWorkInHumidity(EnumHumidity humid) {
|
||||||
IAlleleTolerance tolerance = (IAlleleTolerance) genomeTemplate[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()];
|
IAlleleTolerance tolerance = (IAlleleTolerance) genomeTemplate[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()];
|
||||||
return AlleleManager.climateHelper.isWithinLimits(EnumTemperature.NORMAL, humid, EnumTemperature.NORMAL, EnumTolerance.NONE, humidity,
|
return AlleleManager.climateHelper.isWithinLimits(
|
||||||
|
EnumTemperature.NORMAL,
|
||||||
|
humid,
|
||||||
|
EnumTemperature.NORMAL,
|
||||||
|
EnumTolerance.NONE,
|
||||||
|
humidity,
|
||||||
tolerance.getValue());
|
tolerance.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,7 +9,6 @@ import net.minecraft.block.Block;
|
|||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
|
||||||
import net.minecraftforge.common.BiomeDictionary;
|
import net.minecraftforge.common.BiomeDictionary;
|
||||||
|
|
||||||
import forestry.api.apiculture.hives.HiveManager;
|
import forestry.api.apiculture.hives.HiveManager;
|
||||||
@@ -17,7 +16,6 @@ import forestry.api.apiculture.hives.IHiveDescription;
|
|||||||
import forestry.api.apiculture.hives.IHiveGen;
|
import forestry.api.apiculture.hives.IHiveGen;
|
||||||
import forestry.api.core.EnumHumidity;
|
import forestry.api.core.EnumHumidity;
|
||||||
import forestry.api.core.EnumTemperature;
|
import forestry.api.core.EnumTemperature;
|
||||||
|
|
||||||
import magicbees.block.types.HiveType;
|
import magicbees.block.types.HiveType;
|
||||||
import magicbees.main.Config;
|
import magicbees.main.Config;
|
||||||
import magicbees.main.utils.BlockUtil;
|
import magicbees.main.utils.BlockUtil;
|
||||||
@@ -28,14 +26,18 @@ import magicbees.world.feature.HiveGenOblivion;
|
|||||||
import magicbees.world.feature.HiveGenUnderground;
|
import magicbees.world.feature.HiveGenUnderground;
|
||||||
|
|
||||||
public enum HiveDescription implements IHiveDescription {
|
public enum HiveDescription implements IHiveDescription {
|
||||||
CURIOUS(HiveType.CURIOUS, 3.0f, HiveManager.genHelper.tree(), false,
|
|
||||||
BiomeDictionary.Type.FOREST, BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.HILLS),
|
CURIOUS(HiveType.CURIOUS, 3.0f, HiveManager.genHelper.tree(), false, BiomeDictionary.Type.FOREST,
|
||||||
|
BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.HILLS),
|
||||||
UNUSUAL(HiveType.UNUSUAL, 1.0f, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass), false,
|
UNUSUAL(HiveType.UNUSUAL, 1.0f, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass), false,
|
||||||
BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.HILLS, BiomeDictionary.Type.RIVER),
|
BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.HILLS,
|
||||||
|
BiomeDictionary.Type.RIVER),
|
||||||
RESONANT(HiveType.RESONANT, 0.9f, HiveManager.genHelper.ground(Blocks.sand, Blocks.sandstone), false,
|
RESONANT(HiveType.RESONANT, 0.9f, HiveManager.genHelper.ground(Blocks.sand, Blocks.sandstone), false,
|
||||||
BiomeDictionary.Type.SANDY, BiomeDictionary.Type.MESA, BiomeDictionary.Type.HOT, BiomeDictionary.Type.MAGICAL),
|
BiomeDictionary.Type.SANDY, BiomeDictionary.Type.MESA, BiomeDictionary.Type.HOT,
|
||||||
DEEP(HiveType.DEEP, 5.0f, new HiveGenUnderground(10, 15, 5), true,
|
BiomeDictionary.Type.MAGICAL),
|
||||||
BiomeDictionary.Type.HILLS, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.MAGICAL) {
|
DEEP(HiveType.DEEP, 5.0f, new HiveGenUnderground(10, 15, 5), true, BiomeDictionary.Type.HILLS,
|
||||||
|
BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.MAGICAL) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postGen(World world, int x, int y, int z) {
|
public void postGen(World world, int x, int y, int z) {
|
||||||
super.postGen(world, x, y, z);
|
super.postGen(world, x, y, z);
|
||||||
@@ -48,8 +50,8 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
FeatureOreVein.redstoneGen.generateVein(world, random, x, y, z - 1, 5);
|
FeatureOreVein.redstoneGen.generateVein(world, random, x, y, z - 1, 5);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
INFERNAL(HiveType.INFERNAL, 50.0f, new HiveGenNether(0, 175, 6), true,
|
INFERNAL(HiveType.INFERNAL, 50.0f, new HiveGenNether(0, 175, 6), true, BiomeDictionary.Type.NETHER) {
|
||||||
BiomeDictionary.Type.NETHER) {
|
|
||||||
@Override
|
@Override
|
||||||
public void postGen(World world, int x, int y, int z) {
|
public void postGen(World world, int x, int y, int z) {
|
||||||
super.postGen(world, x, y, z);
|
super.postGen(world, x, y, z);
|
||||||
@@ -62,8 +64,9 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
FeatureOreVein.netherQuartzGen.generateVein(world, random, x, y, z - 1, 4);
|
FeatureOreVein.netherQuartzGen.generateVein(world, random, x, y, z - 1, 4);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
INFERNAL_OVERWORLD(HiveType.INFERNAL, 0.95f, new HiveGenUnderground(5, 13, 6), true,
|
INFERNAL_OVERWORLD(HiveType.INFERNAL, 0.95f, new HiveGenUnderground(5, 13, 6), true, BiomeDictionary.Type.MAGICAL,
|
||||||
BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.HOT) {
|
BiomeDictionary.Type.HOT) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postGen(World world, int x, int y, int z) {
|
public void postGen(World world, int x, int y, int z) {
|
||||||
super.postGen(world, x, y, z);
|
super.postGen(world, x, y, z);
|
||||||
@@ -83,8 +86,8 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
FeatureOreVein.glowstoneGen.generateVein(world, random, x, y, z - 1, world.rand.nextInt(4) + 1);
|
FeatureOreVein.glowstoneGen.generateVein(world, random, x, y, z - 1, world.rand.nextInt(4) + 1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
OBLIVION(HiveType.OBLIVION, 20.0f, new HiveGenOblivion(), true,
|
OBLIVION(HiveType.OBLIVION, 20.0f, new HiveGenOblivion(), true, BiomeDictionary.Type.END) {
|
||||||
BiomeDictionary.Type.END) {
|
|
||||||
@Override
|
@Override
|
||||||
public void postGen(World world, int x, int y, int z) {
|
public void postGen(World world, int x, int y, int z) {
|
||||||
super.postGen(world, x, y, z);
|
super.postGen(world, x, y, z);
|
||||||
@@ -95,8 +98,9 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
OBLIVION_OVERWORLD(HiveType.OBLIVION, 0.87f, new HiveGenUnderground(5, 5, 5), true,
|
OBLIVION_OVERWORLD(HiveType.OBLIVION, 0.87f, new HiveGenUnderground(5, 5, 5), true, BiomeDictionary.Type.MAGICAL,
|
||||||
BiomeDictionary.Type.MAGICAL, BiomeDictionary.Type.COLD) {
|
BiomeDictionary.Type.COLD) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postGen(World world, int x, int y, int z) {
|
public void postGen(World world, int x, int y, int z) {
|
||||||
super.postGen(world, x, y, z);
|
super.postGen(world, x, y, z);
|
||||||
@@ -119,7 +123,8 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
private final IHiveGen hiveGen;
|
private final IHiveGen hiveGen;
|
||||||
private final boolean spawnsIgnoreClimate;
|
private final boolean spawnsIgnoreClimate;
|
||||||
|
|
||||||
private HiveDescription(HiveType type, float chance, IHiveGen genType, boolean ignoreClimate, BiomeDictionary.Type ... goodBiomeTypes) {
|
private HiveDescription(HiveType type, float chance, IHiveGen genType, boolean ignoreClimate,
|
||||||
|
BiomeDictionary.Type... goodBiomeTypes) {
|
||||||
hiveType = type;
|
hiveType = type;
|
||||||
genChance = chance;
|
genChance = chance;
|
||||||
hiveGen = genType;
|
hiveGen = genType;
|
||||||
@@ -130,31 +135,25 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IHiveGen getHiveGen()
|
public IHiveGen getHiveGen() {
|
||||||
{
|
|
||||||
return hiveGen;
|
return hiveGen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Block getBlock()
|
public Block getBlock() {
|
||||||
{
|
|
||||||
return Config.hive;
|
return Config.hive;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMeta()
|
public int getMeta() {
|
||||||
{
|
|
||||||
return hiveType.ordinal();
|
return hiveType.ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isGoodBiome(BiomeGenBase biome)
|
public boolean isGoodBiome(BiomeGenBase biome) {
|
||||||
{
|
|
||||||
BiomeDictionary.Type[] types = BiomeDictionary.getTypesForBiome(biome);
|
BiomeDictionary.Type[] types = BiomeDictionary.getTypesForBiome(biome);
|
||||||
for (BiomeDictionary.Type type : types)
|
for (BiomeDictionary.Type type : types) {
|
||||||
{
|
if (biomes.contains(type)) {
|
||||||
if (biomes.contains(type))
|
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -163,29 +162,26 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isGoodHumidity(EnumHumidity humidity)
|
public boolean isGoodHumidity(EnumHumidity humidity) {
|
||||||
{
|
|
||||||
return spawnsIgnoreClimate || hiveType.getOccupant().canWorkInHumidity(humidity);
|
return spawnsIgnoreClimate || hiveType.getOccupant().canWorkInHumidity(humidity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isGoodTemperature(EnumTemperature temperature)
|
public boolean isGoodTemperature(EnumTemperature temperature) {
|
||||||
{
|
|
||||||
return spawnsIgnoreClimate || hiveType.getOccupant().canWorkInTemperature(temperature);
|
return spawnsIgnoreClimate || hiveType.getOccupant().canWorkInTemperature(temperature);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getGenChance()
|
public float getGenChance() {
|
||||||
{
|
|
||||||
return genChance;
|
return genChance;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void postGen(World world, int x, int y, int z)
|
public void postGen(World world, int x, int y, int z) {
|
||||||
{
|
if (logSpawns) {
|
||||||
if (logSpawns)
|
LogHelper.info(
|
||||||
{
|
"Spawned " + this.toString()
|
||||||
LogHelper.info("Spawned " + this.toString().toLowerCase(Locale.ENGLISH) + " hive at: X " + x + ", Y: " + y + ", Z: " + z);
|
.toLowerCase(Locale.ENGLISH) + " hive at: X " + x + ", Y: " + y + ", Z: " + z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,37 +5,34 @@ import java.util.Collection;
|
|||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeType;
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
import forestry.api.apiculture.IBee;
|
import forestry.api.apiculture.IBee;
|
||||||
import forestry.api.apiculture.IHiveDrop;
|
import forestry.api.apiculture.IHiveDrop;
|
||||||
import forestry.api.genetics.IAllele;
|
import forestry.api.genetics.IAllele;
|
||||||
|
|
||||||
public class HiveDrop implements IHiveDrop
|
public class HiveDrop implements IHiveDrop {
|
||||||
{
|
|
||||||
private IAllele[] template;
|
private IAllele[] template;
|
||||||
private int chance;
|
private int chance;
|
||||||
private ItemStack[] bonus;
|
private ItemStack[] bonus;
|
||||||
private float ignoblePercent = 0f;
|
private float ignoblePercent = 0f;
|
||||||
|
|
||||||
public HiveDrop(IAllele[] beeTemplate, ItemStack[] bonusDrops, int dropChance)
|
public HiveDrop(IAllele[] beeTemplate, ItemStack[] bonusDrops, int dropChance) {
|
||||||
{
|
|
||||||
this.template = beeTemplate;
|
this.template = beeTemplate;
|
||||||
this.bonus = bonusDrops;
|
this.bonus = bonusDrops;
|
||||||
this.chance = dropChance;
|
this.chance = dropChance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HiveDrop setIgnoblePercentage(float f)
|
public HiveDrop setIgnoblePercentage(float f) {
|
||||||
{
|
|
||||||
this.ignoblePercent = f;
|
this.ignoblePercent = f;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IBee getBee(World w)
|
private IBee getBee(World w) {
|
||||||
{
|
|
||||||
IBee bee = BeeManager.beeRoot.getBee(w, BeeManager.beeRoot.templateAsGenome(this.template));
|
IBee bee = BeeManager.beeRoot.getBee(w, BeeManager.beeRoot.templateAsGenome(this.template));
|
||||||
if (w.rand.nextFloat() < this.ignoblePercent)
|
if (w.rand.nextFloat() < this.ignoblePercent) {
|
||||||
{
|
|
||||||
bee.setIsNatural(false);
|
bee.setIsNatural(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,26 +40,22 @@ public class HiveDrop implements IHiveDrop
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getPrincess(World world, int x, int y, int z, int fortune)
|
public ItemStack getPrincess(World world, int x, int y, int z, int fortune) {
|
||||||
{
|
|
||||||
return BeeManager.beeRoot.getMemberStack(getBee(world), EnumBeeType.PRINCESS.ordinal());
|
return BeeManager.beeRoot.getMemberStack(getBee(world), EnumBeeType.PRINCESS.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<ItemStack> getDrones(World world, int x, int y, int z, int fortune)
|
public Collection<ItemStack> getDrones(World world, int x, int y, int z, int fortune) {
|
||||||
{
|
|
||||||
ArrayList<ItemStack> value = new ArrayList<ItemStack>(1);
|
ArrayList<ItemStack> value = new ArrayList<ItemStack>(1);
|
||||||
value.add(BeeManager.beeRoot.getMemberStack(getBee(world), EnumBeeType.DRONE.ordinal()));
|
value.add(BeeManager.beeRoot.getMemberStack(getBee(world), EnumBeeType.DRONE.ordinal()));
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<ItemStack> getAdditional(World world, int x, int y, int z, int fortune)
|
public Collection<ItemStack> getAdditional(World world, int x, int y, int z, int fortune) {
|
||||||
{
|
|
||||||
ArrayList<ItemStack> value = new ArrayList<ItemStack>(bonus.length);
|
ArrayList<ItemStack> value = new ArrayList<ItemStack>(bonus.length);
|
||||||
|
|
||||||
for (int i = 0; i < bonus.length; ++i)
|
for (int i = 0; i < bonus.length; ++i) {
|
||||||
{
|
|
||||||
value.add(bonus[i].copy());
|
value.add(bonus[i].copy());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,8 +63,7 @@ public class HiveDrop implements IHiveDrop
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getChance(World world, int x, int y, int z)
|
public int getChance(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
return this.chance;
|
return this.chance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,171 @@
|
|||||||
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraftforge.common.util.Constants;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.IBee;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.apiculture.IBeekeepingMode;
|
||||||
|
import forestry.api.apiculture.IHiveFrame;
|
||||||
|
import forestry.apiculture.inventory.IApiaryInventory;
|
||||||
|
import magicbees.main.utils.ItemStackUtils;
|
||||||
|
import magicbees.tileentity.TileEntityMagicApiary;
|
||||||
|
|
||||||
|
public class MagicApiaryInventory implements IApiaryInventory {
|
||||||
|
|
||||||
|
public static final int SLOT_QUEEN = 0;
|
||||||
|
public static final int SLOT_DRONE = 1;
|
||||||
|
public static final int SLOT_FRAME_START = 2;
|
||||||
|
public static final int SLOT_FRAME_COUNT = 3;
|
||||||
|
public static final int SLOT_PRODUCTS_START = 5;
|
||||||
|
public static final int SLOT_PRODUCTS_COUNT = 7;
|
||||||
|
|
||||||
|
private final TileEntityMagicApiary magicApiary;
|
||||||
|
private final ItemStack[] items;
|
||||||
|
|
||||||
|
public MagicApiaryInventory(TileEntityMagicApiary magicApiary) {
|
||||||
|
this.magicApiary = magicApiary;
|
||||||
|
this.items = new ItemStack[12];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getQueen() {
|
||||||
|
return magicApiary.getStackInSlot(SLOT_QUEEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getDrone() {
|
||||||
|
return magicApiary.getStackInSlot(SLOT_DRONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setQueen(ItemStack itemstack) {
|
||||||
|
magicApiary.setInventorySlotContents(SLOT_QUEEN, itemstack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setDrone(ItemStack itemstack) {
|
||||||
|
magicApiary.setInventorySlotContents(SLOT_DRONE, itemstack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean addProduct(ItemStack product, boolean all) {
|
||||||
|
int countAdded = ItemStackUtils
|
||||||
|
.addItemToInventory(magicApiary, product, SLOT_PRODUCTS_START, SLOT_PRODUCTS_COUNT);
|
||||||
|
|
||||||
|
if (all) {
|
||||||
|
return countAdded == product.stackSize;
|
||||||
|
}
|
||||||
|
return countAdded > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSizeInventory() {
|
||||||
|
return items.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getStackInSlot(int i) {
|
||||||
|
return items[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInventorySlotContents(int i, ItemStack itemStack) {
|
||||||
|
items[i] = itemStack;
|
||||||
|
if (itemStack != null && itemStack.stackSize > getInventoryStackLimit()) {
|
||||||
|
itemStack.stackSize = getInventoryStackLimit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int[] getAccessibleSlotsFromSide(int side) {
|
||||||
|
int[] slots = new int[SLOT_PRODUCTS_COUNT + 2];
|
||||||
|
slots[0] = SLOT_QUEEN;
|
||||||
|
slots[1] = SLOT_DRONE;
|
||||||
|
for (int i = 0, slot = SLOT_PRODUCTS_START; i < SLOT_PRODUCTS_COUNT; ++i, ++slot) {
|
||||||
|
slots[i + 2] = slot;
|
||||||
|
}
|
||||||
|
return slots;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canInsertItem(int slot, ItemStack itemStack, int side) {
|
||||||
|
if (slot == SLOT_QUEEN && BeeManager.beeRoot.isMember(itemStack) && !BeeManager.beeRoot.isDrone(itemStack)) {
|
||||||
|
return true;
|
||||||
|
} else if (slot == SLOT_DRONE && BeeManager.beeRoot.isDrone(itemStack)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return slot == SLOT_DRONE && BeeManager.beeRoot.isDrone(itemStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canExtractItem(int slot, ItemStack itemStack, int side) {
|
||||||
|
return slot >= SLOT_PRODUCTS_START && slot <= SLOT_PRODUCTS_START + SLOT_PRODUCTS_COUNT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getInventoryStackLimit() {
|
||||||
|
return 64;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Collection<IHiveFrame> getFrames() {
|
||||||
|
Collection<IHiveFrame> hiveFrames = new ArrayList<IHiveFrame>(SLOT_FRAME_COUNT);
|
||||||
|
for (int i = SLOT_FRAME_START; i < SLOT_FRAME_START + SLOT_FRAME_COUNT; i++) {
|
||||||
|
ItemStack stackInSlot = magicApiary.getStackInSlot(i);
|
||||||
|
if (stackInSlot == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Item itemInSlot = stackInSlot.getItem();
|
||||||
|
if (itemInSlot instanceof IHiveFrame) {
|
||||||
|
hiveFrames.add((IHiveFrame) itemInSlot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return hiveFrames;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void wearOutFrames(IBeeHousing beeHousing, int amount) {
|
||||||
|
IBeekeepingMode beekeepingMode = BeeManager.beeRoot.getBeekeepingMode(magicApiary.getWorldObj());
|
||||||
|
int wear = Math.round(amount * beekeepingMode.getWearModifier());
|
||||||
|
for (int i = MagicApiaryInventory.SLOT_FRAME_START; i
|
||||||
|
< MagicApiaryInventory.SLOT_FRAME_START + MagicApiaryInventory.SLOT_FRAME_COUNT; i++) {
|
||||||
|
ItemStack hiveFrameStack = magicApiary.getStackInSlot(i);
|
||||||
|
if (hiveFrameStack == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Item hiveFrameItem = hiveFrameStack.getItem();
|
||||||
|
if (!(hiveFrameItem instanceof IHiveFrame)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
IHiveFrame hiveFrame = (IHiveFrame) hiveFrameItem;
|
||||||
|
ItemStack queenStack = magicApiary.getBeeInventory().getQueen();
|
||||||
|
IBee queen = BeeManager.beeRoot.getMember(queenStack);
|
||||||
|
ItemStack usedFrame = hiveFrame.frameUsed(magicApiary, hiveFrameStack, queen, wear);
|
||||||
|
magicApiary.setInventorySlotContents(i, usedFrame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToNBT(NBTTagCompound compound) {
|
||||||
|
NBTTagList itemsNBT = new NBTTagList();
|
||||||
|
for (int i = 0; i < items.length; i++) {
|
||||||
|
ItemStack itemStack = items[i];
|
||||||
|
if (itemStack != null) {
|
||||||
|
NBTTagCompound item = new NBTTagCompound();
|
||||||
|
item.setByte("Slot", (byte) i);
|
||||||
|
itemStack.writeToNBT(item);
|
||||||
|
itemsNBT.appendTag(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compound.setTag("Items", itemsNBT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readFromNBT(NBTTagCompound compound) {
|
||||||
|
NBTTagList items = compound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
||||||
|
for (int i = 0; i < items.tagCount(); i++) {
|
||||||
|
NBTTagCompound item = items.getCompoundTagAt(i);
|
||||||
|
int slot = item.getByte("Slot");
|
||||||
|
if (slot >= 0 && slot < getSizeInventory()) {
|
||||||
|
setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(item));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,15 +2,16 @@ package magicbees.bees;
|
|||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import forestry.api.core.IClimateProvider;
|
||||||
import forestry.api.genetics.IAllele;
|
import forestry.api.genetics.IAllele;
|
||||||
import forestry.api.genetics.IGenome;
|
import forestry.api.genetics.IGenome;
|
||||||
import forestry.api.genetics.IMutationCondition;
|
import forestry.api.genetics.IMutationCondition;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
import magicbees.main.utils.LocalizationManager;
|
||||||
import magicbees.main.utils.MoonPhase;
|
import magicbees.main.utils.MoonPhase;
|
||||||
|
|
||||||
// There is a bonus to this mutation during moon phases...
|
// There is a bonus to this mutation during moon phases...
|
||||||
public class MoonPhaseMutationBonus implements IMutationCondition {
|
public class MoonPhaseMutationBonus implements IMutationCondition {
|
||||||
|
|
||||||
private final MoonPhase moonPhaseStart;
|
private final MoonPhase moonPhaseStart;
|
||||||
private final MoonPhase moonPhaseEnd;
|
private final MoonPhase moonPhaseEnd;
|
||||||
private final float mutationBonus;
|
private final float mutationBonus;
|
||||||
@@ -28,7 +29,8 @@ public class MoonPhaseMutationBonus implements IMutationCondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
|
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
|
||||||
|
IGenome genome1, IClimateProvider climate) {
|
||||||
if (MoonPhase.getMoonPhase(world).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) {
|
if (MoonPhase.getMoonPhase(world).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) {
|
||||||
return this.mutationBonus;
|
return this.mutationBonus;
|
||||||
}
|
}
|
||||||
@@ -38,10 +40,13 @@ public class MoonPhaseMutationBonus implements IMutationCondition {
|
|||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
if (this.moonPhaseStart != this.moonPhaseEnd) {
|
if (this.moonPhaseStart != this.moonPhaseEnd) {
|
||||||
return String.format(LocalizationManager.getLocalizedString("research.bonusPhase"),
|
return String.format(
|
||||||
moonPhaseStart.getLocalizedNameAlt(), moonPhaseEnd.getLocalizedNameAlt());
|
LocalizationManager.getLocalizedString("research.bonusPhase"),
|
||||||
|
moonPhaseStart.getLocalizedNameAlt(),
|
||||||
|
moonPhaseEnd.getLocalizedNameAlt());
|
||||||
} else {
|
} else {
|
||||||
return String.format(LocalizationManager.getLocalizedString("research.bonusPhaseSingle"),
|
return String.format(
|
||||||
|
LocalizationManager.getLocalizedString("research.bonusPhaseSingle"),
|
||||||
moonPhaseStart.getLocalizedName());
|
moonPhaseStart.getLocalizedName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,14 +2,15 @@ package magicbees.bees;
|
|||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import forestry.api.core.IClimateProvider;
|
||||||
import forestry.api.genetics.IAllele;
|
import forestry.api.genetics.IAllele;
|
||||||
import forestry.api.genetics.IGenome;
|
import forestry.api.genetics.IGenome;
|
||||||
import forestry.api.genetics.IMutationCondition;
|
import forestry.api.genetics.IMutationCondition;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
import magicbees.main.utils.LocalizationManager;
|
||||||
import magicbees.main.utils.MoonPhase;
|
import magicbees.main.utils.MoonPhase;
|
||||||
|
|
||||||
public class MoonPhaseMutationRestriction implements IMutationCondition {
|
public class MoonPhaseMutationRestriction implements IMutationCondition {
|
||||||
|
|
||||||
private final MoonPhase moonPhaseStart;
|
private final MoonPhase moonPhaseStart;
|
||||||
private final MoonPhase moonPhaseEnd;
|
private final MoonPhase moonPhaseEnd;
|
||||||
|
|
||||||
@@ -24,7 +25,8 @@ public class MoonPhaseMutationRestriction implements IMutationCondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1) {
|
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
|
||||||
|
IGenome genome1, IClimateProvider climate) {
|
||||||
if (MoonPhase.getMoonPhase(world).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) {
|
if (MoonPhase.getMoonPhase(world).isBetween(this.moonPhaseStart, this.moonPhaseEnd)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -34,11 +36,13 @@ public class MoonPhaseMutationRestriction implements IMutationCondition {
|
|||||||
@Override
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
if (moonPhaseStart != moonPhaseEnd) {
|
if (moonPhaseStart != moonPhaseEnd) {
|
||||||
return String.format(LocalizationManager.getLocalizedString("research.requiresPhase"),
|
return String.format(
|
||||||
moonPhaseStart.getLocalizedNameAlt(), moonPhaseEnd.getLocalizedNameAlt());
|
LocalizationManager.getLocalizedString("research.requiresPhase"),
|
||||||
}
|
moonPhaseStart.getLocalizedNameAlt(),
|
||||||
else {
|
moonPhaseEnd.getLocalizedNameAlt());
|
||||||
return String.format(LocalizationManager.getLocalizedString("research.requiresPhaseSingle"),
|
} else {
|
||||||
|
return String.format(
|
||||||
|
LocalizationManager.getLocalizedString("research.requiresPhaseSingle"),
|
||||||
moonPhaseStart.getLocalizedName());
|
moonPhaseStart.getLocalizedName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,21 +2,22 @@ package magicbees.bees.allele.effect;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
|
||||||
import magicbees.bees.BeeManager;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
|
||||||
public class AlleleEffectCrumbling extends AlleleEffect {
|
public class AlleleEffectCrumbling extends AlleleEffect {
|
||||||
|
|
||||||
private static HashMap<ItemStack, ItemStack> crumbleMap = new HashMap<ItemStack, ItemStack>();
|
private static HashMap<ItemStack, ItemStack> crumbleMap = new HashMap<ItemStack, ItemStack>();
|
||||||
|
|
||||||
public static void addPairToMap(ItemStack source, ItemStack target) {
|
public static void addPairToMap(ItemStack source, ItemStack target) {
|
||||||
@@ -58,13 +59,17 @@ public class AlleleEffectCrumbling extends AlleleEffect {
|
|||||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||||
|
|
||||||
// Get random coords within territory
|
// Get random coords within territory
|
||||||
int xRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[0]);
|
int[] randomCoords = new int[3];
|
||||||
int yRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[1]);
|
for (int i = 0; i < 3; i++) {
|
||||||
int zRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[2]);
|
int range = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[i]);
|
||||||
|
if (range > 0) {
|
||||||
|
randomCoords[i] = world.rand.nextInt(range) - range / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int xCoord = coords.posX + world.rand.nextInt(xRange) - xRange / 2;
|
int xCoord = coords.posX + randomCoords[0];
|
||||||
int yCoord = coords.posY + world.rand.nextInt(yRange) - yRange / 2;
|
int yCoord = coords.posY + randomCoords[1];
|
||||||
int zCoord = coords.posZ + world.rand.nextInt(zRange) - zRange / 2;
|
int zCoord = coords.posZ + randomCoords[2];
|
||||||
|
|
||||||
Block block = world.getBlock(xCoord, yCoord, zCoord);
|
Block block = world.getBlock(xCoord, yCoord, zCoord);
|
||||||
if (block != null) {
|
if (block != null) {
|
||||||
@@ -72,7 +77,13 @@ public class AlleleEffectCrumbling extends AlleleEffect {
|
|||||||
for (ItemStack key : crumbleMap.keySet()) {
|
for (ItemStack key : crumbleMap.keySet()) {
|
||||||
if (OreDictionary.itemMatches(source, key, false)) {
|
if (OreDictionary.itemMatches(source, key, false)) {
|
||||||
ItemStack target = crumbleMap.get(key);
|
ItemStack target = crumbleMap.get(key);
|
||||||
world.setBlock(xCoord, yCoord, zCoord, Block.getBlockFromItem(target.getItem()), target.getItemDamage(), 2);
|
world.setBlock(
|
||||||
|
xCoord,
|
||||||
|
yCoord,
|
||||||
|
zCoord,
|
||||||
|
Block.getBlockFromItem(target.getItem()),
|
||||||
|
target.getItemDamage(),
|
||||||
|
2);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -83,5 +94,4 @@ public class AlleleEffectCrumbling extends AlleleEffect {
|
|||||||
|
|
||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,15 +2,14 @@ package magicbees.bees.allele.effect;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
|
||||||
public class AlleleEffectCure extends AlleleEffect {
|
public class AlleleEffectCure extends AlleleEffect {
|
||||||
|
|
||||||
@@ -37,5 +36,4 @@ public class AlleleEffectCure extends AlleleEffect {
|
|||||||
|
|
||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,31 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import java.util.List;
|
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.getWeightedRandomAspect;
|
||||||
|
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.updateNode;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
import java.util.ArrayList;
|
||||||
import magicbees.bees.BeeManager;
|
import java.util.Collections;
|
||||||
import magicbees.main.utils.BlockUtil;
|
import java.util.List;
|
||||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
|
||||||
|
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.chunk.Chunk;
|
import net.minecraft.world.chunk.Chunk;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.IAlleleBeeAcceleratableEffect;
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.BlockUtil;
|
||||||
|
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||||
|
import thaumcraft.api.aspects.Aspect;
|
||||||
|
import thaumcraft.api.aspects.AspectList;
|
||||||
|
import thaumcraft.api.nodes.INode;
|
||||||
|
|
||||||
public class AlleleEffectEmpowering extends AlleleEffect {
|
public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAcceleratableEffect {
|
||||||
|
|
||||||
public AlleleEffectEmpowering(String id, boolean isDominant) {
|
public AlleleEffectEmpowering(String id, boolean isDominant) {
|
||||||
super(id, isDominant, 200);
|
super(id, isDominant, 200);
|
||||||
@@ -24,7 +34,7 @@ public class AlleleEffectEmpowering extends AlleleEffect {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEffectData validateStorage(IEffectData storedData) {
|
public IEffectData validateStorage(IEffectData storedData) {
|
||||||
if (storedData == null || !(storedData instanceof magicbees.bees.allele.effect.EffectData)) {
|
if (!(storedData instanceof EffectData)) {
|
||||||
storedData = new magicbees.bees.allele.effect.EffectData(1, 0, 0);
|
storedData = new magicbees.bees.allele.effect.EffectData(1, 0, 0);
|
||||||
}
|
}
|
||||||
return storedData;
|
return storedData;
|
||||||
@@ -35,7 +45,8 @@ public class AlleleEffectEmpowering extends AlleleEffect {
|
|||||||
World world = housing.getWorld();
|
World world = housing.getWorld();
|
||||||
ChunkCoordinates coords = housing.getCoordinates();
|
ChunkCoordinates coords = housing.getCoordinates();
|
||||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||||
int range = Math.max((int)Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
int range = Math
|
||||||
|
.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
||||||
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
||||||
|
|
||||||
if (NodeHelper.growNodeInRange(chunks, world, coords.posX, coords.posY, coords.posZ, range)) {
|
if (NodeHelper.growNodeInRange(chunks, world, coords.posX, coords.posY, coords.posZ, range)) {
|
||||||
@@ -45,4 +56,63 @@ public class AlleleEffectEmpowering extends AlleleEffect {
|
|||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData doEffectAccelerated(IBeeGenome genome, IEffectData storedData, IBeeHousing housing, float did) {
|
||||||
|
storedData.setInteger(0, 0);
|
||||||
|
World world = housing.getWorld();
|
||||||
|
ChunkCoordinates coords = housing.getCoordinates();
|
||||||
|
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||||
|
int range = Math
|
||||||
|
.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
||||||
|
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
||||||
|
|
||||||
|
int idid = (int) did;
|
||||||
|
|
||||||
|
List<INode> nodes = new ArrayList<>(idid);
|
||||||
|
Collections.shuffle(chunks);
|
||||||
|
for (Chunk chunk : chunks) {
|
||||||
|
List<INode> l = NodeHelper.findNodesInChunkWithinRange(chunk, coords.posX, coords.posY, coords.posZ, range);
|
||||||
|
nodes.addAll(l);
|
||||||
|
idid -= l.size();
|
||||||
|
if (idid <= 0) {
|
||||||
|
while (idid < 0) {
|
||||||
|
nodes.remove(0);
|
||||||
|
idid++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nodes.isEmpty()) return storedData;
|
||||||
|
|
||||||
|
did /= (float) nodes.size();
|
||||||
|
if (did < 1f) did = 1f;
|
||||||
|
|
||||||
|
for (INode node : nodes) {
|
||||||
|
AspectList aspectsBase = node.getAspectsBase();
|
||||||
|
int randBase = Math.max(aspectsBase.visSize(), 1);
|
||||||
|
if (world.rand.nextInt(randBase) < 120) {
|
||||||
|
Aspect aspectToAdd;
|
||||||
|
int rollAttempts = 0;
|
||||||
|
short amount = (short) Math
|
||||||
|
.min((int) did + world.rand.nextInt((int) (2f * did)), Config.thaumcraftNodeMaxSize);
|
||||||
|
do {
|
||||||
|
aspectToAdd = getWeightedRandomAspect(world.rand);
|
||||||
|
++rollAttempts;
|
||||||
|
} while (aspectsBase.getAmount(aspectToAdd) > (Config.thaumcraftNodeMaxSize - 1) && rollAttempts < 20);
|
||||||
|
|
||||||
|
if (20 <= rollAttempts) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
amount = (short) Math.min(Config.thaumcraftNodeMaxSize - aspectsBase.getAmount(aspectToAdd), amount);
|
||||||
|
|
||||||
|
aspectsBase.add(aspectToAdd, amount);
|
||||||
|
node.getAspects().add(aspectToAdd, amount);
|
||||||
|
updateNode(node, world);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,18 +2,19 @@ package magicbees.bees.allele.effect;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
|
||||||
import magicbees.bees.BeeManager;
|
|
||||||
import magicbees.main.utils.BlockUtil;
|
|
||||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.chunk.Chunk;
|
import net.minecraft.world.chunk.Chunk;
|
||||||
import thaumcraft.api.nodes.NodeType;
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
import magicbees.main.utils.BlockUtil;
|
||||||
|
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||||
|
import thaumcraft.api.nodes.NodeType;
|
||||||
|
|
||||||
public class AlleleEffectNodeConversion extends AlleleEffect {
|
public class AlleleEffectNodeConversion extends AlleleEffect {
|
||||||
|
|
||||||
@@ -40,11 +41,11 @@ public class AlleleEffectNodeConversion extends AlleleEffect {
|
|||||||
int range = (int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f));
|
int range = (int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f));
|
||||||
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
||||||
|
|
||||||
if (NodeHelper.convertNodeInRangeToType(chunks, world, coords.posX, coords.posY, coords.posZ, range, targetType)) {
|
if (NodeHelper
|
||||||
|
.convertNodeInRangeToType(chunks, world, coords.posX, coords.posY, coords.posZ, range, targetType)) {
|
||||||
storedData.setInteger(0, storedData.getInteger(0) - throttle);
|
storedData.setInteger(0, storedData.getInteger(0) - throttle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.chunk.Chunk;
|
import net.minecraft.world.chunk.Chunk;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
@@ -42,5 +43,4 @@ public class AlleleEffectNodeRepair extends AlleleEffect {
|
|||||||
|
|
||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -20,5 +20,4 @@ public class AlleleEffectPlaceholder extends AlleleEffect {
|
|||||||
protected IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) {
|
protected IEffectData doEffectThrottled(IBeeGenome genome, IEffectData storedData, IBeeHousing housing) {
|
||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,6 @@ package magicbees.bees.allele.effect;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.potion.Potion;
|
import net.minecraft.potion.Potion;
|
||||||
@@ -13,8 +11,10 @@ import forestry.api.apiculture.BeeManager;
|
|||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
|
||||||
public class AlleleEffectPotion extends AlleleEffect {
|
public class AlleleEffectPotion extends AlleleEffect {
|
||||||
|
|
||||||
private int potionId;
|
private int potionId;
|
||||||
private int duration;
|
private int duration;
|
||||||
private boolean isMalicious;
|
private boolean isMalicious;
|
||||||
|
|||||||
@@ -1,21 +1,31 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import java.util.List;
|
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.updateNode;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
import java.util.ArrayList;
|
||||||
import magicbees.bees.BeeManager;
|
import java.util.Collections;
|
||||||
import magicbees.main.utils.BlockUtil;
|
import java.util.HashMap;
|
||||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.chunk.Chunk;
|
import net.minecraft.world.chunk.Chunk;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.IAlleleBeeAcceleratableEffect;
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
import magicbees.main.utils.BlockUtil;
|
||||||
|
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||||
|
import thaumcraft.api.aspects.Aspect;
|
||||||
|
import thaumcraft.api.aspects.AspectList;
|
||||||
|
import thaumcraft.api.nodes.INode;
|
||||||
|
|
||||||
public class AlleleEffectRecharge extends AlleleEffect {
|
public class AlleleEffectRecharge extends AlleleEffect implements IAlleleBeeAcceleratableEffect {
|
||||||
|
|
||||||
public AlleleEffectRecharge(String id, boolean isDominant) {
|
public AlleleEffectRecharge(String id, boolean isDominant) {
|
||||||
super(id, isDominant, 20);
|
super(id, isDominant, 20);
|
||||||
@@ -24,7 +34,7 @@ public class AlleleEffectRecharge extends AlleleEffect {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEffectData validateStorage(IEffectData storedData) {
|
public IEffectData validateStorage(IEffectData storedData) {
|
||||||
if (storedData == null || !(storedData instanceof magicbees.bees.allele.effect.EffectData)) {
|
if (!(storedData instanceof EffectData)) {
|
||||||
storedData = new magicbees.bees.allele.effect.EffectData(1, 0, 0);
|
storedData = new magicbees.bees.allele.effect.EffectData(1, 0, 0);
|
||||||
}
|
}
|
||||||
return storedData;
|
return storedData;
|
||||||
@@ -44,4 +54,65 @@ public class AlleleEffectRecharge extends AlleleEffect {
|
|||||||
|
|
||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData doEffectAccelerated(IBeeGenome genome, IEffectData storedData, IBeeHousing housing, float did) {
|
||||||
|
storedData.setInteger(0, 0);
|
||||||
|
World world = housing.getWorld();
|
||||||
|
ChunkCoordinates coords = housing.getCoordinates();
|
||||||
|
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||||
|
int range = Math
|
||||||
|
.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
||||||
|
List<Chunk> chunks = BlockUtil.getChunksInSearchRange(world, coords.posX, coords.posZ, range);
|
||||||
|
|
||||||
|
int idid = (int) did;
|
||||||
|
|
||||||
|
List<INode> nodes = new ArrayList<>(idid);
|
||||||
|
Collections.shuffle(chunks);
|
||||||
|
for (Chunk chunk : chunks) {
|
||||||
|
List<INode> l = NodeHelper.findNodesInChunkWithinRange(chunk, coords.posX, coords.posY, coords.posZ, range);
|
||||||
|
nodes.addAll(l);
|
||||||
|
idid -= l.size();
|
||||||
|
if (idid <= 0) {
|
||||||
|
while (idid < 0) {
|
||||||
|
nodes.remove(0);
|
||||||
|
idid++;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nodes.isEmpty()) return storedData;
|
||||||
|
|
||||||
|
did /= (float) nodes.size();
|
||||||
|
if (did < 1f) did = 1f;
|
||||||
|
|
||||||
|
for (INode node : nodes) {
|
||||||
|
AspectList baseAspects = node.getAspectsBase();
|
||||||
|
AspectList currentAspects = node.getAspects();
|
||||||
|
|
||||||
|
HashMap<Aspect, Integer> toAdd = new HashMap<>();
|
||||||
|
int total = 0;
|
||||||
|
|
||||||
|
for (Map.Entry<Aspect, Integer> aspect : baseAspects.aspects.entrySet()) {
|
||||||
|
int diff = aspect.getValue() - currentAspects.getAmount(aspect.getKey());
|
||||||
|
if (diff <= 0) continue;
|
||||||
|
toAdd.put(aspect.getKey(), diff);
|
||||||
|
total += diff;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (total == 0) continue;
|
||||||
|
|
||||||
|
int amount = Math.min(total + world.rand.nextInt(total), (int) did);
|
||||||
|
if (amount <= 0) amount = 1;
|
||||||
|
|
||||||
|
for (Map.Entry<Aspect, Integer> aspect : toAdd.entrySet()) {
|
||||||
|
currentAspects.add(aspect.getKey(), Math.min(aspect.getValue(), amount));
|
||||||
|
}
|
||||||
|
|
||||||
|
updateNode(node, world);
|
||||||
|
}
|
||||||
|
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,9 +2,6 @@ package magicbees.bees.allele.effect;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
|
||||||
import magicbees.bees.BeeManager;
|
|
||||||
|
|
||||||
import net.minecraft.entity.EntityList;
|
import net.minecraft.entity.EntityList;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
@@ -12,12 +9,16 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
|
||||||
public class AlleleEffectSpawnMob extends AlleleEffect {
|
public class AlleleEffectSpawnMob extends AlleleEffect {
|
||||||
|
|
||||||
protected boolean aggosOnPlayer;
|
protected boolean aggosOnPlayer;
|
||||||
protected boolean spawnsWhilePlayerNear;
|
protected boolean spawnsWhilePlayerNear;
|
||||||
protected String alternateMob;
|
protected String alternateMob;
|
||||||
@@ -79,8 +80,7 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
|||||||
storedData.setBoolean(0, !didSpawn);
|
storedData.setBoolean(0, !didSpawn);
|
||||||
storedData.setInteger(0, storedData.getInteger(0) - throttle);
|
storedData.setInteger(0, storedData.getInteger(0) - throttle);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
storedData.setBoolean(0, true);
|
storedData.setBoolean(0, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,14 +106,16 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
|||||||
for (EntityPlayer e : entities) {
|
for (EntityPlayer e : entities) {
|
||||||
// Check for wearing armor & cancel
|
// Check for wearing armor & cancel
|
||||||
// Full armor suit is treated as "invisible."
|
// Full armor suit is treated as "invisible."
|
||||||
if (forestry.api.apiculture.BeeManager.armorApiaristHelper.wearsItems((EntityLivingBase) e, getUID(), true) < 4) {
|
if (forestry.api.apiculture.BeeManager.armorApiaristHelper.wearsItems((EntityLivingBase) e, getUID(), true)
|
||||||
|
< 4) {
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate) {
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing,
|
||||||
|
boolean spawnAlternate) {
|
||||||
boolean spawnedFlag = false;
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
EntityLiving mob;
|
EntityLiving mob;
|
||||||
@@ -126,17 +128,24 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
|||||||
if (mob != null) {
|
if (mob != null) {
|
||||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||||
|
|
||||||
int entitiesCount = world.getEntitiesWithinAABB(mob.getClass(),
|
int entitiesCount = world.getEntitiesWithinAABB(
|
||||||
AxisAlignedBB.getBoundingBox((int) pos[0], (int) pos[1], (int) pos[2],
|
mob.getClass(),
|
||||||
(int) pos[0] + 1, (int) pos[1] + 1, (int) pos[2] + 1)
|
AxisAlignedBB.getBoundingBox(
|
||||||
.expand(8.0D,4.0D, 8.0D)).size();
|
(int) pos[0],
|
||||||
|
(int) pos[1],
|
||||||
|
(int) pos[2],
|
||||||
|
(int) pos[0] + 1,
|
||||||
|
(int) pos[1] + 1,
|
||||||
|
(int) pos[2] + 1).expand(8.0D, 4.0D, 8.0D))
|
||||||
|
.size();
|
||||||
|
|
||||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||||
|
|
||||||
if (entitiesCount < maxMobsInArea && mob.getCanSpawnHere()) {
|
if (entitiesCount < maxMobsInArea && mob.getCanSpawnHere()) {
|
||||||
spawnedFlag = world.spawnEntityInWorld(mob);
|
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||||
if (aggosOnPlayer && player != null) {
|
if (aggosOnPlayer && player != null) {
|
||||||
if (forestry.api.apiculture.BeeManager.armorApiaristHelper.wearsItems((EntityLivingBase) player, getUID(), true) < 4) {
|
if (forestry.api.apiculture.BeeManager.armorApiaristHelper
|
||||||
|
.wearsItems((EntityLivingBase) player, getUID(), true) < 4) {
|
||||||
// Protect fully suited player from initial murder intent.
|
// Protect fully suited player from initial murder intent.
|
||||||
mob.setAttackTarget(player);
|
mob.setAttackTarget(player);
|
||||||
}
|
}
|
||||||
@@ -178,9 +187,13 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
|||||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||||
|
|
||||||
double pos[] = new double[3];
|
double pos[] = new double[3];
|
||||||
pos[0] = coords.posX + (world.rand.nextDouble() * (bee.getTerritory()[0] * beeModifier.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[0] / 2);
|
pos[0] = coords.posX
|
||||||
|
+ (world.rand.nextDouble() * (bee.getTerritory()[0] * beeModifier.getTerritoryModifier(bee, 1f))
|
||||||
|
- bee.getTerritory()[0] / 2);
|
||||||
pos[1] = coords.posY + world.rand.nextInt(3) - 1;
|
pos[1] = coords.posY + world.rand.nextInt(3) - 1;
|
||||||
pos[2] = coords.posZ + (world.rand.nextDouble() * (bee.getTerritory()[2] * beeModifier.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[2] / 2);
|
pos[2] = coords.posZ
|
||||||
|
+ (world.rand.nextDouble() * (bee.getTerritory()[2] * beeModifier.getTerritoryModifier(bee, 1f))
|
||||||
|
- bee.getTerritory()[2] / 2);
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,5 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
|
||||||
import magicbees.bees.BeeManager;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityList;
|
import net.minecraft.entity.EntityList;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
@@ -13,8 +10,11 @@ import forestry.api.apiculture.IBeeGenome;
|
|||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
|
||||||
public class AlleleEffectSpawnMobWeighted extends AlleleEffect {
|
public class AlleleEffectSpawnMobWeighted extends AlleleEffect {
|
||||||
|
|
||||||
private String[] entityNames;
|
private String[] entityNames;
|
||||||
private int[] spawnChance;
|
private int[] spawnChance;
|
||||||
|
|
||||||
@@ -78,10 +78,15 @@ public class AlleleEffectSpawnMobWeighted extends AlleleEffect {
|
|||||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||||
|
|
||||||
double pos[] = new double[3];
|
double pos[] = new double[3];
|
||||||
pos[0] = coords.posX + world.rand.nextDouble() * (bee.getTerritory()[0] * beeModifier.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[0] / 2;
|
pos[0] = coords.posX
|
||||||
pos[1] = coords.posY + world.rand.nextDouble() * (bee.getTerritory()[1] * beeModifier.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[1] / 2;
|
+ world.rand.nextDouble() * (bee.getTerritory()[0] * beeModifier.getTerritoryModifier(bee, 1f))
|
||||||
pos[2] = coords.posZ + world.rand.nextDouble() * (bee.getTerritory()[2] * beeModifier.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[2] / 2;
|
- bee.getTerritory()[0] / 2;
|
||||||
|
pos[1] = coords.posY
|
||||||
|
+ world.rand.nextDouble() * (bee.getTerritory()[1] * beeModifier.getTerritoryModifier(bee, 1f))
|
||||||
|
- bee.getTerritory()[1] / 2;
|
||||||
|
pos[2] = coords.posZ
|
||||||
|
+ world.rand.nextDouble() * (bee.getTerritory()[2] * beeModifier.getTerritoryModifier(bee, 1f))
|
||||||
|
- bee.getTerritory()[2] / 2;
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@ package magicbees.bees.allele.effect;
|
|||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
|
||||||
import net.minecraft.entity.EntityList;
|
import net.minecraft.entity.EntityList;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
@@ -13,23 +12,20 @@ import net.minecraft.world.World;
|
|||||||
import forestry.api.apiculture.BeeManager;
|
import forestry.api.apiculture.BeeManager;
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
|
||||||
public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
||||||
|
|
||||||
private byte[] wispTypes = {
|
private byte[] wispTypes = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25,
|
||||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
|
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 };
|
||||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
|
||||||
21, 23, 24, 25, 26, 27, 28, 29, 30,
|
|
||||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
|
||||||
41, 42, 43, 44, 45, 46, 47
|
|
||||||
};
|
|
||||||
|
|
||||||
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn, String soundToPlay) {
|
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn, String soundToPlay) {
|
||||||
super(id, isDominant, mobToSpawn, soundToPlay);
|
super(id, isDominant, mobToSpawn, soundToPlay);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate) {
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing,
|
||||||
|
boolean spawnAlternate) {
|
||||||
boolean spawnedFlag = false;
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
EntityLiving mob;
|
EntityLiving mob;
|
||||||
@@ -44,8 +40,14 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
|||||||
|
|
||||||
int entitiesCount = world.getEntitiesWithinAABB(
|
int entitiesCount = world.getEntitiesWithinAABB(
|
||||||
mob.getClass(),
|
mob.getClass(),
|
||||||
AxisAlignedBB.getBoundingBox((int) pos[0], (int) pos[1], (int) pos[2], (int) pos[0] + 1, (int) pos[1] + 1, (int) pos[2] + 1).expand(8.0D,
|
AxisAlignedBB.getBoundingBox(
|
||||||
4.0D, 8.0D)).size();
|
(int) pos[0],
|
||||||
|
(int) pos[1],
|
||||||
|
(int) pos[2],
|
||||||
|
(int) pos[0] + 1,
|
||||||
|
(int) pos[1] + 1,
|
||||||
|
(int) pos[2] + 1).expand(8.0D, 4.0D, 8.0D))
|
||||||
|
.size();
|
||||||
|
|
||||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||||
|
|
||||||
@@ -55,9 +57,9 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
|||||||
Class<?> wispEntity = Class.forName(ThaumcraftHelper.Entity.WISP.getClassName());
|
Class<?> wispEntity = Class.forName(ThaumcraftHelper.Entity.WISP.getClassName());
|
||||||
Field type = wispEntity.getDeclaredField("type");
|
Field type = wispEntity.getDeclaredField("type");
|
||||||
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
||||||
} catch (Exception e) { /*
|
} catch (Exception e) {
|
||||||
* Last time I had a request to post
|
/*
|
||||||
* error messages, I regretted it.
|
* Last time I had a request to post error messages, I regretted it.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import magicbees.bees.AlleleEffect;
|
|
||||||
import magicbees.bees.BeeManager;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
import magicbees.bees.AlleleEffect;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
|
||||||
public class AlleleEffectTransmuting extends AlleleEffect {
|
public class AlleleEffectTransmuting extends AlleleEffect {
|
||||||
|
|
||||||
private TransmutationEffectController transmutationController;
|
private TransmutationEffectController transmutationController;
|
||||||
|
|
||||||
public AlleleEffectTransmuting(String id, boolean isDominant, TransmutationEffectController effectController, int timeoutBeeTicks) {
|
public AlleleEffectTransmuting(String id, boolean isDominant, TransmutationEffectController effectController,
|
||||||
|
int timeoutBeeTicks) {
|
||||||
super(id, isDominant, timeoutBeeTicks);
|
super(id, isDominant, timeoutBeeTicks);
|
||||||
this.transmutationController = effectController;
|
this.transmutationController = effectController;
|
||||||
}
|
}
|
||||||
@@ -36,17 +37,29 @@ public class AlleleEffectTransmuting extends AlleleEffect {
|
|||||||
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
IBeeModifier beeModifier = BeeManager.beeRoot.createBeeHousingModifier(housing);
|
||||||
|
|
||||||
// Get random coords within territory
|
// Get random coords within territory
|
||||||
int xRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[0]);
|
int[] randomCoords = new int[3];
|
||||||
int yRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[1]);
|
for (int i = 0; i < 3; i++) {
|
||||||
int zRange = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[2]);
|
int range = (int) (beeModifier.getTerritoryModifier(genome, 1f) * genome.getTerritory()[i]);
|
||||||
|
if (range > 0) {
|
||||||
|
randomCoords[i] = world.rand.nextInt(range) - range / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int xCoord = coords.posX + world.rand.nextInt(xRange) - xRange / 2;
|
int xCoord = coords.posX + randomCoords[0];
|
||||||
int yCoord = coords.posY + world.rand.nextInt(yRange) - yRange / 2;
|
int yCoord = coords.posY + randomCoords[1];
|
||||||
int zCoord = coords.posZ + world.rand.nextInt(zRange) - zRange / 2;
|
int zCoord = coords.posZ + randomCoords[2];
|
||||||
|
|
||||||
BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord);
|
BiomeGenBase biome = world.getBiomeGenForCoords(xCoord, zCoord);
|
||||||
transmutationController.attemptTransmutations(world, biome,
|
transmutationController.attemptTransmutations(
|
||||||
new ItemStack(world.getBlock(xCoord, yCoord, zCoord), 1, world.getBlockMetadata(xCoord, yCoord, zCoord)), xCoord, yCoord, zCoord);
|
world,
|
||||||
|
biome,
|
||||||
|
new ItemStack(
|
||||||
|
world.getBlock(xCoord, yCoord, zCoord),
|
||||||
|
1,
|
||||||
|
world.getBlockMetadata(xCoord, yCoord, zCoord)),
|
||||||
|
xCoord,
|
||||||
|
yCoord,
|
||||||
|
zCoord);
|
||||||
|
|
||||||
storedData.setInteger(0, 0);
|
storedData.setInteger(0, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -1,89 +1,72 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
|
|
||||||
public class EffectData implements IEffectData
|
public class EffectData implements IEffectData {
|
||||||
{
|
|
||||||
private int[] intData;
|
private int[] intData;
|
||||||
private boolean[] boolData;
|
private boolean[] boolData;
|
||||||
private float[] floatData;
|
private float[] floatData;
|
||||||
|
|
||||||
public EffectData(int intCount, int boolCount, int floatCount)
|
public EffectData(int intCount, int boolCount, int floatCount) {
|
||||||
{
|
|
||||||
this.intData = new int[intCount];
|
this.intData = new int[intCount];
|
||||||
this.boolData = new boolean[boolCount];
|
this.boolData = new boolean[boolCount];
|
||||||
this.floatData = new float[floatCount];
|
this.floatData = new float[floatCount];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound nbttagcompound)
|
public void readFromNBT(NBTTagCompound nbttagcompound) {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound nbttagcompound)
|
public void writeToNBT(NBTTagCompound nbttagcompound) {}
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setInteger(int index, int val)
|
public void setInteger(int index, int val) {
|
||||||
{
|
if (index >= 0 && index < this.intData.length) {
|
||||||
if (index >= 0 && index < this.intData.length)
|
|
||||||
{
|
|
||||||
this.intData[index] = val;
|
this.intData[index] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setFloat(int index, float val)
|
public void setFloat(int index, float val) {
|
||||||
{
|
if (index >= 0 && index < this.floatData.length) {
|
||||||
if (index >= 0 && index < this.floatData.length)
|
|
||||||
{
|
|
||||||
this.floatData[index] = val;
|
this.floatData[index] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBoolean(int index, boolean val)
|
public void setBoolean(int index, boolean val) {
|
||||||
{
|
if (index >= 0 && index < this.boolData.length) {
|
||||||
if (index >= 0 && index < this.boolData.length)
|
|
||||||
{
|
|
||||||
this.boolData[index] = val;
|
this.boolData[index] = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInteger(int index)
|
public int getInteger(int index) {
|
||||||
{
|
|
||||||
int val = 0;
|
int val = 0;
|
||||||
if (index >= 0 && index < this.intData.length)
|
if (index >= 0 && index < this.intData.length) {
|
||||||
{
|
|
||||||
val = this.intData[index];
|
val = this.intData[index];
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getFloat(int index)
|
public float getFloat(int index) {
|
||||||
{
|
|
||||||
float val = 0f;
|
float val = 0f;
|
||||||
if (index >= 0 && index < this.floatData.length)
|
if (index >= 0 && index < this.floatData.length) {
|
||||||
{
|
|
||||||
val = this.floatData[index];
|
val = this.floatData[index];
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getBoolean(int index)
|
public boolean getBoolean(int index) {
|
||||||
{
|
|
||||||
boolean val = false;
|
boolean val = false;
|
||||||
if (index >= 0 && index < this.boolData.length)
|
if (index >= 0 && index < this.boolData.length) {
|
||||||
{
|
|
||||||
val = this.boolData[index];
|
val = this.boolData[index];
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,14 +4,16 @@ import java.util.ArrayList;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.api.bees.ITransmutationEffectController;
|
|
||||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
|
||||||
import magicbees.main.utils.LogHelper;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
|
||||||
|
import magicbees.api.bees.ITransmutationEffectController;
|
||||||
|
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||||
|
import magicbees.main.utils.LogHelper;
|
||||||
|
|
||||||
public class TransmutationEffectController implements ITransmutationEffectController {
|
public class TransmutationEffectController implements ITransmutationEffectController {
|
||||||
|
|
||||||
private List<ITransmutationEffectLogic> logicObjects;
|
private List<ITransmutationEffectLogic> logicObjects;
|
||||||
|
|
||||||
public TransmutationEffectController(ITransmutationEffectLogic... effectLogic) {
|
public TransmutationEffectController(ITransmutationEffectLogic... effectLogic) {
|
||||||
@@ -29,7 +31,9 @@ public class TransmutationEffectController implements ITransmutationEffectContro
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogHelper.warn(String.format("Magic Bees encountered an issue with an ITransmutationEffectLogic provider %s. Debug information follows.",
|
LogHelper.warn(
|
||||||
|
String.format(
|
||||||
|
"Magic Bees encountered an issue with an ITransmutationEffectLogic provider %s. Debug information follows.",
|
||||||
logic.getClass().getName()));
|
logic.getClass().getName()));
|
||||||
LogHelper.info(e.getMessage());
|
LogHelper.info(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -42,5 +46,4 @@ public class TransmutationEffectController implements ITransmutationEffectContro
|
|||||||
logicObjects.add(logic);
|
logicObjects.add(logic);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
|
||||||
import magicbees.main.utils.compat.BotaniaHelper;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||||
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
|
|
||||||
public class TransmutationEffectLBotaniaLiving implements ITransmutationEffectLogic {
|
public class TransmutationEffectLBotaniaLiving implements ITransmutationEffectLogic {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -16,12 +17,10 @@ public class TransmutationEffectLBotaniaLiving implements ITransmutationEffectLo
|
|||||||
if (oreId == OreDictionary.getOreID("logWood")) {
|
if (oreId == OreDictionary.getOreID("logWood")) {
|
||||||
world.setBlock(x, y, z, BotaniaHelper.blockLivingWood);
|
world.setBlock(x, y, z, BotaniaHelper.blockLivingWood);
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (oreId == OreDictionary.getOreID("stone")) {
|
||||||
else if (oreId == OreDictionary.getOreID("stone")) {
|
|
||||||
world.setBlock(x, y, z, BotaniaHelper.blockLivingRock);
|
world.setBlock(x, y, z, BotaniaHelper.blockLivingRock);
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (oreId == OreDictionary.getOreID("livingwood")) {
|
||||||
else if (oreId == OreDictionary.getOreID("livingwood")) {
|
|
||||||
world.setBlock(x, y, z, BotaniaHelper.blockDreamWood);
|
world.setBlock(x, y, z, BotaniaHelper.blockDreamWood);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package magicbees.bees.allele.effect;
|
|||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -12,20 +10,26 @@ import net.minecraft.world.biome.BiomeGenBase;
|
|||||||
import net.minecraftforge.common.BiomeDictionary;
|
import net.minecraftforge.common.BiomeDictionary;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||||
|
|
||||||
public class TransmutationEffectRailcraft implements ITransmutationEffectLogic {
|
public class TransmutationEffectRailcraft implements ITransmutationEffectLogic {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (OreDictionary.itemMatches(new ItemStack(Blocks.stone), sourceBlock, false)
|
if (OreDictionary.itemMatches(new ItemStack(Blocks.stone), sourceBlock, false)
|
||||||
|| OreDictionary.itemMatches(new ItemStack(Blocks.cobblestone), sourceBlock, false)) {
|
|| OreDictionary.itemMatches(new ItemStack(Blocks.cobblestone), sourceBlock, false)) {
|
||||||
flag = trySpawnQuarriedStone(world, biome, sourceBlock, x, y, z) || trySpawnAbyssalStone(world, biome, sourceBlock, x, y, z);
|
flag = trySpawnQuarriedStone(world, biome, sourceBlock, x, y, z)
|
||||||
|
|| trySpawnAbyssalStone(world, biome, sourceBlock, x, y, z);
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean trySpawnQuarriedStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
private boolean trySpawnQuarriedStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.FOREST) && !BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SNOWY)) {
|
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.FOREST)
|
||||||
|
&& !BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SNOWY)) {
|
||||||
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.quarried", 1);
|
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.quarried", 1);
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
||||||
@@ -37,7 +41,8 @@ public class TransmutationEffectRailcraft implements ITransmutationEffectLogic {
|
|||||||
|
|
||||||
private boolean trySpawnAbyssalStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
private boolean trySpawnAbyssalStone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.WATER) && !biome.biomeName.toLowerCase(Locale.ENGLISH).contains("river")) {
|
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.WATER)
|
||||||
|
&& !biome.biomeName.toLowerCase(Locale.ENGLISH).contains("river")) {
|
||||||
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.abyssal", 1);
|
ItemStack item = GameRegistry.findItemStack("Railcraft", "cube.stone.abyssal", 1);
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
world.setBlock(x, y, z, Block.getBlockFromItem(item.getItem()), item.getItemDamage(), 2);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import magicbees.api.bees.ITransmutationEffectLogic;
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@@ -8,7 +7,10 @@ import net.minecraft.world.biome.BiomeGenBase;
|
|||||||
import net.minecraftforge.common.BiomeDictionary;
|
import net.minecraftforge.common.BiomeDictionary;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
import magicbees.api.bees.ITransmutationEffectLogic;
|
||||||
|
|
||||||
public class TransmutationEffectVanilla implements ITransmutationEffectLogic {
|
public class TransmutationEffectVanilla implements ITransmutationEffectLogic {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
public boolean tryTransmutation(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||||
return trySpawnSandstone(world, biome, sourceBlock, x, y, z);
|
return trySpawnSandstone(world, biome, sourceBlock, x, y, z);
|
||||||
@@ -16,7 +18,8 @@ public class TransmutationEffectVanilla implements ITransmutationEffectLogic {
|
|||||||
|
|
||||||
private boolean trySpawnSandstone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
private boolean trySpawnSandstone(World world, BiomeGenBase biome, ItemStack sourceBlock, int x, int y, int z) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SANDY) && OreDictionary.itemMatches(new ItemStack(Blocks.sand), sourceBlock, false)) {
|
if (BiomeDictionary.isBiomeOfType(biome, BiomeDictionary.Type.SANDY)
|
||||||
|
&& OreDictionary.itemMatches(new ItemStack(Blocks.sand), sourceBlock, false)) {
|
||||||
world.setBlock(x, y, z, Blocks.sandstone);
|
world.setBlock(x, y, z, Blocks.sandstone);
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-3
@@ -1,7 +1,5 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
|
||||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -12,6 +10,8 @@ import forestry.api.genetics.IFlowerGrowthRule;
|
|||||||
import forestry.api.genetics.IFlowerRegistry;
|
import forestry.api.genetics.IFlowerRegistry;
|
||||||
import forestry.api.genetics.IIndividual;
|
import forestry.api.genetics.IIndividual;
|
||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||||
|
|
||||||
public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFlowerGrowthRule {
|
public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFlowerGrowthRule {
|
||||||
|
|
||||||
@@ -57,7 +57,8 @@ public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||||
|
int z) {
|
||||||
return growFlower(world, x, y, z);
|
return growFlower(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.genetics.IIndividual;
|
import forestry.api.genetics.IIndividual;
|
||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
|
||||||
public class FlowerProviderAuraNode extends FlowerProvider {
|
public class FlowerProviderAuraNode extends FlowerProvider {
|
||||||
|
|
||||||
@@ -62,5 +62,4 @@ public class FlowerProviderAuraNode extends FlowerProvider {
|
|||||||
|
|
||||||
return products;
|
return products;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,14 +2,15 @@ package magicbees.bees.allele.flowerProvider;
|
|||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.EnumPlantType;
|
import net.minecraftforge.common.EnumPlantType;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import forestry.api.genetics.IIndividual;
|
import forestry.api.genetics.IIndividual;
|
||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
|
||||||
public class FlowerProviderBookshelf extends FlowerProvider {
|
public class FlowerProviderBookshelf extends FlowerProvider {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
|
||||||
import magicbees.main.utils.compat.BotaniaHelper;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
@@ -11,6 +9,8 @@ import forestry.api.genetics.IFlowerGrowthRule;
|
|||||||
import forestry.api.genetics.IFlowerRegistry;
|
import forestry.api.genetics.IFlowerRegistry;
|
||||||
import forestry.api.genetics.IIndividual;
|
import forestry.api.genetics.IIndividual;
|
||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
|
|
||||||
public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrowthRule {
|
public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrowthRule {
|
||||||
|
|
||||||
@@ -32,7 +32,8 @@ public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrow
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||||
|
int z) {
|
||||||
return growFlower(world, x, y, z);
|
return growFlower(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -1,7 +1,5 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -12,6 +10,8 @@ import forestry.api.genetics.IFlowerGrowthRule;
|
|||||||
import forestry.api.genetics.IFlowerRegistry;
|
import forestry.api.genetics.IFlowerRegistry;
|
||||||
import forestry.api.genetics.IIndividual;
|
import forestry.api.genetics.IIndividual;
|
||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
|
||||||
public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IFlowerGrowthRule {
|
public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IFlowerGrowthRule {
|
||||||
|
|
||||||
@@ -54,7 +54,8 @@ public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IF
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||||
|
int z) {
|
||||||
return growFlower(world, x, y, z);
|
return growFlower(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package magicbees.block;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockContainer;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.ChatComponentTranslation;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
import magicbees.tileentity.TileEntityApimancersDrainerCommon;
|
||||||
|
import thaumcraft.api.aspects.Aspect;
|
||||||
|
import thaumcraft.api.aspects.IEssentiaContainerItem;
|
||||||
|
|
||||||
|
public class BlockApimancersDrainer extends BlockContainer {
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
private IIcon[] icons;
|
||||||
|
|
||||||
|
public static Class<? extends TileEntity> drainer = TileEntityApimancersDrainerCommon.class;
|
||||||
|
|
||||||
|
public BlockApimancersDrainer() {
|
||||||
|
super(Material.rock);
|
||||||
|
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||||
|
this.setBlockName("apimancersDrainer");
|
||||||
|
this.setHardness(1f);
|
||||||
|
this.setResistance(1.5f);
|
||||||
|
this.setHarvestLevel("pickaxe", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int metadata) {
|
||||||
|
try {
|
||||||
|
return drainer.newInstance();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float par7,
|
||||||
|
float par8, float par9) {
|
||||||
|
if (world.isRemote) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
if (tile instanceof TileEntityApimancersDrainerCommon && side != 1) {
|
||||||
|
ItemStack tItemStack = player.getHeldItem();
|
||||||
|
if (tItemStack != null) {
|
||||||
|
Item tItem = tItemStack.getItem();
|
||||||
|
if (tItem instanceof IEssentiaContainerItem
|
||||||
|
&& ((IEssentiaContainerItem) tItem).getAspects(player.getHeldItem()) != null
|
||||||
|
&& ((IEssentiaContainerItem) tItem).getAspects(player.getHeldItem()).size() > 0) {
|
||||||
|
Aspect tLocked = ((IEssentiaContainerItem) tItem).getAspects(player.getHeldItem())
|
||||||
|
.getAspects()[0];
|
||||||
|
((TileEntityApimancersDrainerCommon) tile).setAspect(tLocked);
|
||||||
|
|
||||||
|
player.addChatMessage(
|
||||||
|
new ChatComponentTranslation("Producing " + tLocked.getLocalizedDescription()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
((TileEntityApimancersDrainerCommon) tile).setAspect(null);
|
||||||
|
player.addChatMessage(new ChatComponentTranslation("Cleared production specifier"));
|
||||||
|
}
|
||||||
|
world.markBlockForUpdate(x, y, z);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(int side, int meta) {
|
||||||
|
return icons[side <= 1 ? side : 2];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister register) {
|
||||||
|
icons = new IIcon[4];
|
||||||
|
for (int i = 0; i < icons.length; i++) {
|
||||||
|
icons[i] = register.registerIcon(CommonProxy.DOMAIN + ":apimancersdrainer." + i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import magicbees.client.gui.UIScreens;
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.MagicBees;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import magicbees.tileentity.TileEntityEffectJar;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@@ -18,10 +11,17 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockEffectJar extends BlockContainer
|
import cpw.mods.fml.relauncher.Side;
|
||||||
{
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
public BlockEffectJar()
|
import magicbees.client.gui.UIScreens;
|
||||||
{
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.MagicBees;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
import magicbees.tileentity.TileEntityEffectJar;
|
||||||
|
|
||||||
|
public class BlockEffectJar extends BlockContainer {
|
||||||
|
|
||||||
|
public BlockEffectJar() {
|
||||||
super(Material.glass);
|
super(Material.glass);
|
||||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||||
this.setBlockName("effectJar");
|
this.setBlockName("effectJar");
|
||||||
@@ -31,13 +31,14 @@ public class BlockEffectJar extends BlockContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7,
|
||||||
{
|
float par8, float par9) {
|
||||||
boolean activate = false;
|
boolean activate = false;
|
||||||
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking()) {
|
||||||
{
|
if (!world.isRemote) {
|
||||||
player.openGui(MagicBees.object, UIScreens.EFFECT_JAR.ordinal(), world, x, y, z);
|
player.openGui(MagicBees.object, UIScreens.EFFECT_JAR.ordinal(), world, x, y, z);
|
||||||
|
}
|
||||||
activate = true;
|
activate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,49 +46,41 @@ public class BlockEffectJar extends BlockContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World w, int metadata)
|
public TileEntity createNewTileEntity(World w, int metadata) {
|
||||||
{
|
|
||||||
return new TileEntityEffectJar();
|
return new TileEntityEffectJar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube()
|
public boolean isOpaqueCube() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean renderAsNormalBlock()
|
public boolean renderAsNormalBlock() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderType()
|
public int getRenderType() {
|
||||||
{
|
|
||||||
return CommonProxy.RenderIdEffectJar;
|
return CommonProxy.RenderIdEffectJar;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta)
|
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||||
{
|
|
||||||
this.dropInventory(world, x, y, z);
|
this.dropInventory(world, x, y, z);
|
||||||
super.breakBlock(world, x, y, z, block, meta);
|
super.breakBlock(world, x, y, z, block, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dropInventory(World world, int x, int y, int z)
|
private void dropInventory(World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
TileEntity e = world.getTileEntity(x, y, z);
|
TileEntity e = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if (e != null && e instanceof TileEntityEffectJar)
|
if (e != null && e instanceof TileEntityEffectJar) {
|
||||||
{
|
|
||||||
TileEntityEffectJar jar = (TileEntityEffectJar) e;
|
TileEntityEffectJar jar = (TileEntityEffectJar) e;
|
||||||
|
|
||||||
// 0 is the only droppable stack.
|
// 0 is the only droppable stack.
|
||||||
ItemStack stack = jar.getStackInSlot(0);
|
ItemStack stack = jar.getStackInSlot(0);
|
||||||
|
|
||||||
if (stack != null && stack.stackSize > 0)
|
if (stack != null && stack.stackSize > 0) {
|
||||||
{
|
|
||||||
float pX = world.rand.nextFloat() * 0.8f + 0.1f;
|
float pX = world.rand.nextFloat() * 0.8f + 0.1f;
|
||||||
float pY = world.rand.nextFloat() * 0.8f + 0.1f;
|
float pY = world.rand.nextFloat() * 0.8f + 0.1f;
|
||||||
float pZ = world.rand.nextFloat() * 0.8f + 0.1f;
|
float pZ = world.rand.nextFloat() * 0.8f + 0.1f;
|
||||||
@@ -106,8 +99,7 @@ public class BlockEffectJar extends BlockContainer
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||||
{
|
|
||||||
this.blockIcon = Blocks.glass.getIcon(0, 0);
|
this.blockIcon = Blocks.glass.getIcon(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,6 @@ package magicbees.block;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
@@ -12,8 +10,11 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.IPlantable;
|
import net.minecraftforge.common.IPlantable;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
|
||||||
public class BlockEnchantedEarth extends Block {
|
public class BlockEnchantedEarth extends Block {
|
||||||
|
|
||||||
@@ -27,6 +28,7 @@ public class BlockEnchantedEarth extends Block {
|
|||||||
setBlockTextureName(CommonProxy.DOMAIN + ":enchantedEarth");
|
setBlockTextureName(CommonProxy.DOMAIN + ":enchantedEarth");
|
||||||
setTickRandomly(true);
|
setTickRandomly(true);
|
||||||
setStepSound(soundTypeGravel);
|
setStepSound(soundTypeGravel);
|
||||||
|
setHardness(0.1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -35,8 +37,7 @@ public class BlockEnchantedEarth extends Block {
|
|||||||
Block b = world.getBlock(x, height, z);
|
Block b = world.getBlock(x, height, z);
|
||||||
if (b == this) {
|
if (b == this) {
|
||||||
continue;
|
continue;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (b.getTickRandomly()) {
|
if (b.getTickRandomly()) {
|
||||||
world.scheduleBlockUpdate(x, height, z, b, 0);
|
world.scheduleBlockUpdate(x, height, z, b, 0);
|
||||||
}
|
}
|
||||||
@@ -55,7 +56,8 @@ public class BlockEnchantedEarth extends Block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canSustainPlant(IBlockAccess world, int x, int y, int z, ForgeDirection direction, IPlantable plantable) {
|
public boolean canSustainPlant(IBlockAccess world, int x, int y, int z, ForgeDirection direction,
|
||||||
|
IPlantable plantable) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ package magicbees.block;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import magicbees.block.types.HiveType;
|
|
||||||
import magicbees.main.Config;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
@@ -17,12 +13,16 @@ import net.minecraft.util.IIcon;
|
|||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import forestry.api.core.Tabs;
|
|
||||||
|
|
||||||
public class BlockHive extends Block
|
import cpw.mods.fml.relauncher.Side;
|
||||||
{
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
public BlockHive()
|
import forestry.api.core.Tabs;
|
||||||
{
|
import magicbees.block.types.HiveType;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
|
||||||
|
public class BlockHive extends Block {
|
||||||
|
|
||||||
|
public BlockHive() {
|
||||||
super(new MaterialHive());
|
super(new MaterialHive());
|
||||||
this.setLightLevel(0.8f);
|
this.setLightLevel(0.8f);
|
||||||
setHardness(1f);
|
setHardness(1f);
|
||||||
@@ -31,23 +31,19 @@ public class BlockHive extends Block
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity)
|
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity entity) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int meta)
|
public int damageDropped(int meta) {
|
||||||
{
|
|
||||||
return meta;
|
return meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
public int getLightValue(IBlockAccess world, int x, int y, int z) {
|
||||||
{
|
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
if (meta < 0 || meta > HiveType.values().length)
|
if (meta < 0 || meta > HiveType.VALUES.length) {
|
||||||
{
|
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
return HiveType.getHiveFromMeta(meta).getLightValue();
|
return HiveType.getHiveFromMeta(meta).getLightValue();
|
||||||
@@ -56,55 +52,45 @@ public class BlockHive extends Block
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
@Override
|
@Override
|
||||||
public void getSubBlocks(Item item, CreativeTabs tab, List itemsList)
|
public void getSubBlocks(Item item, CreativeTabs tab, List itemsList) {
|
||||||
{
|
|
||||||
// Java bitches about raw types & types not being checked. Sorry, but the API sucks.
|
// Java bitches about raw types & types not being checked. Sorry, but the API sucks.
|
||||||
for (HiveType type : HiveType.values())
|
for (HiveType type : HiveType.VALUES) {
|
||||||
{
|
if (type.show || Config.forestryDebugEnabled) {
|
||||||
if (type.show || Config.forestryDebugEnabled)
|
|
||||||
{
|
|
||||||
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||||
{
|
|
||||||
return HiveType.getHiveFromMeta(metadata).getDrops(world, x, y, z, fortune);
|
return HiveType.getHiveFromMeta(metadata).getDrops(world, x, y, z, fortune);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister register)
|
public void registerBlockIcons(IIconRegister register) {
|
||||||
{
|
|
||||||
HiveType.registerIcons(register);
|
HiveType.registerIcons(register);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int meta)
|
public IIcon getIcon(int side, int meta) {
|
||||||
{
|
if (meta < 0 || meta > HiveType.VALUES.length) {
|
||||||
if (meta < 0 || meta > HiveType.values().length)
|
|
||||||
{
|
|
||||||
meta = 0;
|
meta = 0;
|
||||||
}
|
}
|
||||||
return HiveType.getHiveFromMeta(meta).getIconForSide(side);
|
return HiveType.getHiveFromMeta(meta).getIconForSide(side);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
|
|
||||||
if (block.isAir(world, x, y, z))
|
if (block.isAir(world, x, y, z)) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item item = Item.getItemFromBlock(block);
|
Item item = Item.getItemFromBlock(block);
|
||||||
if (item == null)
|
if (item == null) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import magicbees.client.gui.UIScreens;
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.MagicBees;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import magicbees.tileentity.TileEntityMagicApiary;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@@ -16,16 +11,21 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.client.gui.UIScreens;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.MagicBees;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
import magicbees.tileentity.TileEntityMagicApiary;
|
||||||
|
|
||||||
|
public class BlockMagicApiary extends BlockContainer {
|
||||||
|
|
||||||
public class BlockMagicApiary extends BlockContainer
|
|
||||||
{
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon[] icons;
|
private IIcon[] icons;
|
||||||
|
|
||||||
public BlockMagicApiary()
|
public BlockMagicApiary() {
|
||||||
{
|
|
||||||
super(Material.wood);
|
super(Material.wood);
|
||||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||||
this.setBlockName("magicApiary");
|
this.setBlockName("magicApiary");
|
||||||
@@ -35,13 +35,14 @@ public class BlockMagicApiary extends BlockContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9 )
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7,
|
||||||
{
|
float par8, float par9) {
|
||||||
boolean activate = false;
|
boolean activate = false;
|
||||||
|
|
||||||
if (!player.isSneaking())
|
if (!player.isSneaking()) {
|
||||||
{
|
if (!world.isRemote) {
|
||||||
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
||||||
|
}
|
||||||
activate = true;
|
activate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,8 +66,7 @@ public class BlockMagicApiary extends BlockContainer
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister register)
|
public void registerBlockIcons(IIconRegister register) {
|
||||||
{
|
|
||||||
icons = new IIcon[4];
|
icons = new IIcon[4];
|
||||||
|
|
||||||
icons[0] = register.registerIcon(CommonProxy.DOMAIN + ":thaumicapiary.0");
|
icons[0] = register.registerIcon(CommonProxy.DOMAIN + ":thaumicapiary.0");
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import magicbees.tileentity.TileEntityManaAuraProvider;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.ITileEntityProvider;
|
import net.minecraft.block.ITileEntityProvider;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@@ -10,8 +7,12 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
import magicbees.tileentity.TileEntityManaAuraProvider;
|
||||||
|
|
||||||
public class BlockManaAuraProvider extends Block implements ITileEntityProvider {
|
public class BlockManaAuraProvider extends Block implements ITileEntityProvider {
|
||||||
|
|
||||||
@@ -40,9 +41,7 @@ public class BlockManaAuraProvider extends Block implements ITileEntityProvider
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int meta)
|
public IIcon getIcon(int side, int meta) {
|
||||||
{
|
|
||||||
return (side == 0 || side == 1) ? this.topIcon : this.blockIcon;
|
return (side == 0 || side == 1) ? this.topIcon : this.blockIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||||
|
|
||||||
public class BlockVisAuraProvider extends BlockContainer {
|
public class BlockVisAuraProvider extends BlockContainer {
|
||||||
|
|
||||||
@@ -24,8 +25,7 @@ public class BlockVisAuraProvider extends BlockContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube()
|
public boolean isOpaqueCube() {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,8 +35,7 @@ public class BlockVisAuraProvider extends BlockContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderType()
|
public int getRenderType() {
|
||||||
{
|
|
||||||
return CommonProxy.RenderIdVisAuraProvider;
|
return CommonProxy.RenderIdVisAuraProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,5 +44,4 @@ public class BlockVisAuraProvider extends BlockContainer {
|
|||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
this.blockIcon = Blocks.planks.getIcon(0, 5);
|
this.blockIcon = Blocks.planks.getIcon(0, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,14 +3,11 @@ package magicbees.block;
|
|||||||
import net.minecraft.block.material.MapColor;
|
import net.minecraft.block.material.MapColor;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
|
||||||
public class MaterialHive extends Material
|
public class MaterialHive extends Material {
|
||||||
{
|
|
||||||
|
|
||||||
public MaterialHive()
|
public MaterialHive() {
|
||||||
{
|
|
||||||
super(MapColor.stoneColor);
|
super(MapColor.stoneColor);
|
||||||
this.setImmovableMobility();
|
this.setImmovableMobility();
|
||||||
this.setRequiresTool();
|
this.setRequiresTool();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,15 @@ package magicbees.block.types;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.apiculture.IHiveDrop;
|
||||||
import magicbees.bees.BeeGenomeManager;
|
import magicbees.bees.BeeGenomeManager;
|
||||||
import magicbees.bees.BeeSpecies;
|
import magicbees.bees.BeeSpecies;
|
||||||
import magicbees.bees.HiveDrop;
|
import magicbees.bees.HiveDrop;
|
||||||
@@ -10,24 +19,17 @@ import magicbees.item.types.CombType;
|
|||||||
import magicbees.main.CommonProxy;
|
import magicbees.main.CommonProxy;
|
||||||
import magicbees.main.Config;
|
import magicbees.main.Config;
|
||||||
import magicbees.main.utils.compat.ForestryHelper;
|
import magicbees.main.utils.compat.ForestryHelper;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import forestry.api.apiculture.IHiveDrop;
|
|
||||||
|
|
||||||
public enum HiveType
|
public enum HiveType {
|
||||||
{
|
|
||||||
CURIOUS("curious", BeeSpecies.MYSTICAL, 12, true),
|
CURIOUS("curious", BeeSpecies.MYSTICAL, 12, true),
|
||||||
UNUSUAL("unusual", BeeSpecies.UNUSUAL, 12, true),
|
UNUSUAL("unusual", BeeSpecies.UNUSUAL, 12, true),
|
||||||
RESONANT("resonant", BeeSpecies.SORCEROUS, 12, true),
|
RESONANT("resonant", BeeSpecies.SORCEROUS, 12, true),
|
||||||
DEEP("deep", BeeSpecies.ATTUNED, 4, false),
|
DEEP("deep", BeeSpecies.ATTUNED, 4, true),
|
||||||
INFERNAL("infernal", BeeSpecies.INFERNAL, 15, false),
|
INFERNAL("infernal", BeeSpecies.INFERNAL, 15, true),
|
||||||
OBLIVION("oblivion", BeeSpecies.OBLIVION, 7, false),
|
OBLIVION("oblivion", BeeSpecies.OBLIVION, 7, true),;
|
||||||
;
|
|
||||||
|
public static final HiveType[] VALUES = values();
|
||||||
|
|
||||||
private static String[] nameList;
|
private static String[] nameList;
|
||||||
|
|
||||||
@@ -40,22 +42,22 @@ public enum HiveType
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon[] icons;
|
private IIcon[] icons;
|
||||||
|
|
||||||
public static HiveType getHiveFromMeta(int meta)
|
public static HiveType getHiveFromMeta(int meta) {
|
||||||
{
|
|
||||||
HiveType type = CURIOUS;
|
HiveType type = CURIOUS;
|
||||||
|
|
||||||
if (meta > 0 && meta < HiveType.values().length)
|
if (meta > 0 && meta < HiveType.VALUES.length) {
|
||||||
{
|
type = HiveType.VALUES[meta];
|
||||||
type = HiveType.values()[meta];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initHiveData()
|
public static void initHiveData() {
|
||||||
{
|
|
||||||
ItemStack[] combs = new ItemStack[] { Config.combs.getStackForType(CombType.MUNDANE) };
|
ItemStack[] combs = new ItemStack[] { Config.combs.getStackForType(CombType.MUNDANE) };
|
||||||
HiveDrop valiantDrop = new HiveDrop(BeeGenomeManager.addRainResist(ForestryHelper.getTemplateForestryForSpecies("Valiant")), combs, 5);
|
HiveDrop valiantDrop = new HiveDrop(
|
||||||
|
BeeGenomeManager.addRainResist(ForestryHelper.getTemplateForestryForSpecies("Valiant")),
|
||||||
|
combs,
|
||||||
|
5);
|
||||||
|
|
||||||
CURIOUS.drops.add(new HiveDrop(BeeSpecies.MYSTICAL.getGenome(), combs, 80).setIgnoblePercentage(0.7f));
|
CURIOUS.drops.add(new HiveDrop(BeeSpecies.MYSTICAL.getGenome(), combs, 80).setIgnoblePercentage(0.7f));
|
||||||
CURIOUS.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.MYSTICAL.getGenome()), combs, 15));
|
CURIOUS.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.MYSTICAL.getGenome()), combs, 15));
|
||||||
@@ -73,19 +75,20 @@ public enum HiveType
|
|||||||
DEEP.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.ATTUNED.getGenome()), combs, 20));
|
DEEP.drops.add(new HiveDrop(BeeGenomeManager.addRainResist(BeeSpecies.ATTUNED.getGenome()), combs, 20));
|
||||||
DEEP.drops.add(valiantDrop);
|
DEEP.drops.add(valiantDrop);
|
||||||
|
|
||||||
combs = new ItemStack[] { Config.combs.getStackForType(CombType.MOLTEN), new ItemStack(Items.glowstone_dust, 6) };
|
combs = new ItemStack[] { Config.combs.getStackForType(CombType.MOLTEN),
|
||||||
|
new ItemStack(Items.glowstone_dust, 6) };
|
||||||
|
|
||||||
INFERNAL.drops.add(new HiveDrop(BeeSpecies.INFERNAL.getGenome(), combs, 80).setIgnoblePercentage(0.5f));
|
INFERNAL.drops.add(new HiveDrop(BeeSpecies.INFERNAL.getGenome(), combs, 80).setIgnoblePercentage(0.5f));
|
||||||
INFERNAL.drops.add(new HiveDrop(ForestryHelper.getTemplateForestryForSpecies("Steadfast"), combs, 3));
|
INFERNAL.drops.add(new HiveDrop(ForestryHelper.getTemplateForestryForSpecies("Steadfast"), combs, 3));
|
||||||
|
|
||||||
combs = new ItemStack[] { Config.combs.getStackForType(CombType.FORGOTTEN), new ItemStack(Items.ender_pearl, 1) };
|
combs = new ItemStack[] { Config.combs.getStackForType(CombType.FORGOTTEN),
|
||||||
|
new ItemStack(Items.ender_pearl, 1) };
|
||||||
|
|
||||||
OBLIVION.drops.add(new HiveDrop(BeeSpecies.OBLIVION.getGenome(), combs, 80));
|
OBLIVION.drops.add(new HiveDrop(BeeSpecies.OBLIVION.getGenome(), combs, 80));
|
||||||
OBLIVION.drops.add(new HiveDrop(ForestryHelper.getTemplateForestryForSpecies("Steadfast"), combs, 9));
|
OBLIVION.drops.add(new HiveDrop(ForestryHelper.getTemplateForestryForSpecies("Steadfast"), combs, 9));
|
||||||
}
|
}
|
||||||
|
|
||||||
private HiveType(String hiveName, BeeSpecies occupant, int light, boolean visible)
|
private HiveType(String hiveName, BeeSpecies occupant, int light, boolean visible) {
|
||||||
{
|
|
||||||
this.name = hiveName;
|
this.name = hiveName;
|
||||||
this.occupant = occupant;
|
this.occupant = occupant;
|
||||||
this.lightLevel = light;
|
this.lightLevel = light;
|
||||||
@@ -94,10 +97,8 @@ public enum HiveType
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public static void registerIcons(IIconRegister register)
|
public static void registerIcons(IIconRegister register) {
|
||||||
{
|
for (HiveType type : HiveType.VALUES) {
|
||||||
for (HiveType type : HiveType.values())
|
|
||||||
{
|
|
||||||
type.icons = new IIcon[2];
|
type.icons = new IIcon[2];
|
||||||
|
|
||||||
type.icons[0] = register.registerIcon(CommonProxy.DOMAIN + ":beehive." + type.ordinal() + ".top");
|
type.icons[0] = register.registerIcon(CommonProxy.DOMAIN + ":beehive." + type.ordinal() + ".top");
|
||||||
@@ -106,25 +107,21 @@ public enum HiveType
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIconForSide(int side)
|
public IIcon getIconForSide(int side) {
|
||||||
{
|
|
||||||
IIcon i = this.icons[0];
|
IIcon i = this.icons[0];
|
||||||
|
|
||||||
if (side != 0 && side != 1)
|
if (side != 0 && side != 1) {
|
||||||
{
|
|
||||||
i = this.icons[1];
|
i = this.icons[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getLightValue()
|
public int getLightValue() {
|
||||||
{
|
|
||||||
return this.lightLevel;
|
return this.lightLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int fortune)
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int fortune) {
|
||||||
{
|
|
||||||
ArrayList<ItemStack> hiveDrops = new ArrayList<ItemStack>();
|
ArrayList<ItemStack> hiveDrops = new ArrayList<ItemStack>();
|
||||||
int dart;
|
int dart;
|
||||||
|
|
||||||
@@ -132,14 +129,11 @@ public enum HiveType
|
|||||||
|
|
||||||
// Get a princess.
|
// Get a princess.
|
||||||
int throttle = 0;
|
int throttle = 0;
|
||||||
while (hiveDrops.size() <= 0 && throttle < 10)
|
while (hiveDrops.size() <= 0 && throttle < 10) {
|
||||||
{
|
|
||||||
++throttle;
|
++throttle;
|
||||||
for (IHiveDrop drop : drops)
|
for (IHiveDrop drop : drops) {
|
||||||
{
|
|
||||||
dart = world.rand.nextInt(100);
|
dart = world.rand.nextInt(100);
|
||||||
if (dart <= drop.getChance(world, x, y, z))
|
if (dart <= drop.getChance(world, x, y, z)) {
|
||||||
{
|
|
||||||
hiveDrops.add(drop.getPrincess(world, x, y, z, fortune));
|
hiveDrops.add(drop.getPrincess(world, x, y, z, fortune));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -147,22 +141,18 @@ public enum HiveType
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get a drone, maybe.
|
// Get a drone, maybe.
|
||||||
for (IHiveDrop drop : drops)
|
for (IHiveDrop drop : drops) {
|
||||||
{
|
|
||||||
dart = world.rand.nextInt(100);
|
dart = world.rand.nextInt(100);
|
||||||
if (dart <= drop.getChance(world, x, y, z))
|
if (dart <= drop.getChance(world, x, y, z)) {
|
||||||
{
|
|
||||||
hiveDrops.addAll(drop.getDrones(world, x, y, z, fortune));
|
hiveDrops.addAll(drop.getDrones(world, x, y, z, fortune));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get additional drops.
|
// Get additional drops.
|
||||||
for (IHiveDrop drop : drops)
|
for (IHiveDrop drop : drops) {
|
||||||
{
|
|
||||||
dart = world.rand.nextInt(100);
|
dart = world.rand.nextInt(100);
|
||||||
if (dart <= drop.getChance(world, x, y, z))
|
if (dart <= drop.getChance(world, x, y, z)) {
|
||||||
{
|
|
||||||
hiveDrops.addAll(drop.getAdditional(world, x, y, z, fortune));
|
hiveDrops.addAll(drop.getAdditional(world, x, y, z, fortune));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,8 +160,7 @@ public enum HiveType
|
|||||||
return hiveDrops;
|
return hiveDrops;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String[] getAllNames()
|
public static String[] getAllNames() {
|
||||||
{
|
|
||||||
return (nameList == null) ? nameList = generateNames() : nameList;
|
return (nameList == null) ? nameList = generateNames() : nameList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,12 +168,10 @@ public enum HiveType
|
|||||||
return this.occupant;
|
return this.occupant;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] generateNames()
|
private static String[] generateNames() {
|
||||||
{
|
String[] names = new String[VALUES.length];
|
||||||
String[] names = new String[values().length];
|
for (int i = 0; i < names.length; ++i) {
|
||||||
for (int i = 0; i < names.length; ++i)
|
names[i] = VALUES[i].name;
|
||||||
{
|
|
||||||
names[i] = values()[i].name;
|
|
||||||
}
|
}
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,43 +1,36 @@
|
|||||||
package magicbees.block.types;
|
package magicbees.block.types;
|
||||||
|
|
||||||
public enum PlankType
|
public enum PlankType {
|
||||||
{
|
|
||||||
GREATWOOD("greatwood", 48),
|
GREATWOOD("greatwood", 48),
|
||||||
SILVERWOOD("silverwood", 49),
|
SILVERWOOD("silverwood", 49),;
|
||||||
;
|
|
||||||
|
|
||||||
public String name;
|
public String name;
|
||||||
public int textureIdx;
|
public int textureIdx;
|
||||||
private static String[] nameList;
|
private static String[] nameList;
|
||||||
|
|
||||||
private PlankType(String n, int idx)
|
private PlankType(String n, int idx) {
|
||||||
{
|
|
||||||
this.name = n;
|
this.name = n;
|
||||||
this.textureIdx = idx;
|
this.textureIdx = idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static PlankType getType(int meta)
|
public static PlankType getType(int meta) {
|
||||||
{
|
|
||||||
PlankType type = null;
|
PlankType type = null;
|
||||||
|
|
||||||
if (meta >= 0 && meta <= values().length)
|
if (meta >= 0 && meta <= values().length) {
|
||||||
{
|
|
||||||
type = values()[meta];
|
type = values()[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String[] getAllNames()
|
public static String[] getAllNames() {
|
||||||
{
|
|
||||||
return (nameList == null) ? nameList = generateNames() : nameList;
|
return (nameList == null) ? nameList = generateNames() : nameList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String[] generateNames()
|
private static String[] generateNames() {
|
||||||
{
|
|
||||||
String[] names = new String[values().length];
|
String[] names = new String[values().length];
|
||||||
for (int i = 0; i < names.length; ++i)
|
for (int i = 0; i < names.length; ++i) {
|
||||||
{
|
|
||||||
names[i] = values()[i].name;
|
names[i] = values()[i].name;
|
||||||
}
|
}
|
||||||
return names;
|
return names;
|
||||||
|
|||||||
@@ -1,44 +1,41 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import magicbees.tileentity.TileEntityEffectJar;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.ICrafting;
|
import net.minecraft.inventory.ICrafting;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ContainerEffectJar extends Container
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
{
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.tileentity.TileEntityEffectJar;
|
||||||
|
|
||||||
|
public class ContainerEffectJar extends Container {
|
||||||
|
|
||||||
public TileEntityEffectJar jar;
|
public TileEntityEffectJar jar;
|
||||||
|
|
||||||
public int lastBeeHealth = 0;
|
public int lastBeeHealth = 0;
|
||||||
public int speciesColour = 0xffffff;
|
public int speciesColour = 0xffffff;
|
||||||
|
|
||||||
public ContainerEffectJar(TileEntityEffectJar tileEntityEffectJar, EntityPlayer player)
|
public ContainerEffectJar(TileEntityEffectJar tileEntityEffectJar, EntityPlayer player) {
|
||||||
{
|
|
||||||
this.jar = tileEntityEffectJar;
|
this.jar = tileEntityEffectJar;
|
||||||
this.addSlotToContainer(new SlotCustomItems(this.jar, 0, 80, 22, GameRegistry.findItemStack("Forestry", "beeDroneGE", 1)));
|
this.addSlotToContainer(
|
||||||
|
new SlotCustomItems(this.jar, 0, 80, 22, GameRegistry.findItemStack("Forestry", "beeDroneGE", 1)));
|
||||||
|
|
||||||
for (int i = 0; i < 3; ++i)
|
for (int i = 0; i < 3; ++i) {
|
||||||
{
|
for (int j = 0; j < 9; ++j) {
|
||||||
for (int j = 0; j < 9; ++j)
|
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
this.addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 74 + i * 18));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 9; ++i)
|
for (int i = 0; i < 9; ++i) {
|
||||||
{
|
|
||||||
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 132));
|
this.addSlotToContainer(new Slot(player.inventory, i, 8 + i * 18, 132));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCraftingToCrafters(ICrafting crafting)
|
public void addCraftingToCrafters(ICrafting crafting) {
|
||||||
{
|
|
||||||
super.addCraftingToCrafters(crafting);
|
super.addCraftingToCrafters(crafting);
|
||||||
|
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.jar.currentBeeHealth);
|
crafting.sendProgressBarUpdate(this, 0, this.jar.currentBeeHealth);
|
||||||
@@ -46,21 +43,17 @@ public class ContainerEffectJar extends Container
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void detectAndSendChanges()
|
public void detectAndSendChanges() {
|
||||||
{
|
|
||||||
super.detectAndSendChanges();
|
super.detectAndSendChanges();
|
||||||
|
|
||||||
for (int i = 0; i < this.crafters.size(); ++i)
|
for (int i = 0; i < this.crafters.size(); ++i) {
|
||||||
{
|
|
||||||
ICrafting crafting = (ICrafting) this.crafters.get(i);
|
ICrafting crafting = (ICrafting) this.crafters.get(i);
|
||||||
|
|
||||||
if (this.lastBeeHealth != this.jar.currentBeeHealth)
|
if (this.lastBeeHealth != this.jar.currentBeeHealth) {
|
||||||
{
|
|
||||||
crafting.sendProgressBarUpdate(this, 0, this.jar.currentBeeHealth);
|
crafting.sendProgressBarUpdate(this, 0, this.jar.currentBeeHealth);
|
||||||
this.lastBeeHealth = this.jar.currentBeeHealth;
|
this.lastBeeHealth = this.jar.currentBeeHealth;
|
||||||
}
|
}
|
||||||
if (this.speciesColour != this.jar.currentBeeColour)
|
if (this.speciesColour != this.jar.currentBeeColour) {
|
||||||
{
|
|
||||||
crafting.sendProgressBarUpdate(this, 1, this.jar.currentBeeColour);
|
crafting.sendProgressBarUpdate(this, 1, this.jar.currentBeeColour);
|
||||||
this.speciesColour = this.jar.currentBeeColour;
|
this.speciesColour = this.jar.currentBeeColour;
|
||||||
}
|
}
|
||||||
@@ -69,48 +62,36 @@ public class ContainerEffectJar extends Container
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void updateProgressBar(int craftingId, int value)
|
public void updateProgressBar(int craftingId, int value) {
|
||||||
{
|
if (craftingId == 0) {
|
||||||
if (craftingId == 0)
|
|
||||||
{
|
|
||||||
this.jar.currentBeeHealth = value;
|
this.jar.currentBeeHealth = value;
|
||||||
}
|
} else if (craftingId == 1) {
|
||||||
else if (craftingId == 1)
|
|
||||||
{
|
|
||||||
this.jar.currentBeeColour = value;
|
this.jar.currentBeeColour = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canInteractWith(EntityPlayer entityplayer)
|
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||||
{
|
|
||||||
return this.jar.isUseableByPlayer(entityplayer);
|
return this.jar.isUseableByPlayer(entityplayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack transferStackInSlot(EntityPlayer player, int slot)
|
public ItemStack transferStackInSlot(EntityPlayer player, int slot) {
|
||||||
{
|
|
||||||
Slot itemSlot = this.getSlot(slot);
|
Slot itemSlot = this.getSlot(slot);
|
||||||
boolean clearSlot = false;
|
boolean clearSlot = false;
|
||||||
|
|
||||||
if (itemSlot != null && itemSlot.getHasStack())
|
if (itemSlot != null && itemSlot.getHasStack()) {
|
||||||
{
|
|
||||||
ItemStack srcStack = itemSlot.getStack();
|
ItemStack srcStack = itemSlot.getStack();
|
||||||
if (slot == 0 && srcStack != null)
|
if (slot == 0 && srcStack != null) {
|
||||||
{
|
|
||||||
clearSlot = this.mergeItemStack(srcStack, 1, 36 + 1, false);
|
clearSlot = this.mergeItemStack(srcStack, 1, 36 + 1, false);
|
||||||
}
|
} else {
|
||||||
else
|
if (this.getSlot(0).isItemValid(srcStack)) {
|
||||||
{
|
|
||||||
if (this.getSlot(0).isItemValid(srcStack))
|
|
||||||
{
|
|
||||||
clearSlot = this.mergeItemStack(srcStack, 0, 1, false);
|
clearSlot = this.mergeItemStack(srcStack, 0, 1, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clearSlot)
|
if (clearSlot) {
|
||||||
{
|
|
||||||
itemSlot.putStack(null);
|
itemSlot.putStack(null);
|
||||||
}
|
}
|
||||||
itemSlot.onSlotChanged();
|
itemSlot.onSlotChanged();
|
||||||
@@ -118,5 +99,4 @@ public class ContainerEffectJar extends Container
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package magicbees.client.gui;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import forestry.core.gui.ContainerItemInventory;
|
||||||
|
import magicbees.main.utils.compat.baubles.InventoryBeeRing;
|
||||||
|
|
||||||
|
public class ContainerEffectRing extends ContainerItemInventory<InventoryBeeRing> {
|
||||||
|
|
||||||
|
public ContainerEffectRing(InventoryBeeRing inventory, InventoryPlayer playerInventory) {
|
||||||
|
super(inventory, playerInventory, 8, 74);
|
||||||
|
addSlotToContainer(
|
||||||
|
new SlotCustomItems(inventory, 0, 80, 22, GameRegistry.findItemStack("Forestry", "beeDroneGE", 1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,15 +5,15 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
|
|
||||||
public class ContainerMB extends Container
|
public class ContainerMB extends Container {
|
||||||
{
|
|
||||||
protected final int PLAYER_INVENTORY_ROWS = 3;
|
protected final int PLAYER_INVENTORY_ROWS = 3;
|
||||||
protected final int PLAYER_INVENTORY_COLUMNS = 9;
|
protected final int PLAYER_INVENTORY_COLUMNS = 9;
|
||||||
|
|
||||||
public void addPlayerInventory(InventoryPlayer inventoryPlayer, int xStart, int yStart)
|
public void addPlayerInventory(InventoryPlayer inventoryPlayer, int xStart, int yStart) {
|
||||||
{
|
|
||||||
for (int x = 0; x < PLAYER_INVENTORY_COLUMNS; x++) {
|
for (int x = 0; x < PLAYER_INVENTORY_COLUMNS; x++) {
|
||||||
addSlotToContainer(new Slot(inventoryPlayer, x, xStart + 8 + 18 * x, yStart + 4 + PLAYER_INVENTORY_ROWS * 18));
|
addSlotToContainer(
|
||||||
|
new Slot(inventoryPlayer, x, xStart + 8 + 18 * x, yStart + 4 + PLAYER_INVENTORY_ROWS * 18));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int y = 0; y < PLAYER_INVENTORY_ROWS; y++) {
|
for (int y = 0; y < PLAYER_INVENTORY_ROWS; y++) {
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
import forestry.api.apiculture.IHiveFrame;
|
|
||||||
import magicbees.bees.BeeManager;
|
|
||||||
import magicbees.main.utils.ItemInterface;
|
|
||||||
import magicbees.tileentity.TileEntityMagicApiary;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.ICrafting;
|
import net.minecraft.inventory.ICrafting;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.IHiveFrame;
|
||||||
|
import magicbees.bees.BeeManager;
|
||||||
|
import magicbees.main.utils.ItemInterface;
|
||||||
|
import magicbees.tileentity.TileEntityMagicApiary;
|
||||||
|
|
||||||
public class ContainerMagicApiary extends ContainerMB {
|
public class ContainerMagicApiary extends ContainerMB {
|
||||||
|
|
||||||
public TileEntityMagicApiary apiary;
|
public TileEntityMagicApiary apiary;
|
||||||
@@ -27,9 +28,17 @@ public class ContainerMagicApiary extends ContainerMB {
|
|||||||
this.apiary = thaumicApiary;
|
this.apiary = thaumicApiary;
|
||||||
|
|
||||||
// Queen/Princess slot
|
// Queen/Princess slot
|
||||||
addSlotToContainer(new SlotCustomItems(this.apiary, 0, 29, 39, ItemInterface.getItemStack("Forestry", "beeQueenGE", 1), ItemInterface.getItemStack("Forestry", "beePrincessGE", 1)));
|
addSlotToContainer(
|
||||||
|
new SlotCustomItems(
|
||||||
|
this.apiary,
|
||||||
|
0,
|
||||||
|
29,
|
||||||
|
39,
|
||||||
|
ItemInterface.getItemStack("Forestry", "beeQueenGE", 1),
|
||||||
|
ItemInterface.getItemStack("Forestry", "beePrincessGE", 1)));
|
||||||
// Drone slot
|
// Drone slot
|
||||||
addSlotToContainer(new SlotCustomItems(this.apiary, 1, 29, 65, ItemInterface.getItemStack("Forestry", "beeDroneGE", 64)));
|
addSlotToContainer(
|
||||||
|
new SlotCustomItems(this.apiary, 1, 29, 65, ItemInterface.getItemStack("Forestry", "beeDroneGE", 64)));
|
||||||
|
|
||||||
int currentSlot = 1;
|
int currentSlot = 1;
|
||||||
|
|
||||||
@@ -59,7 +68,6 @@ public class ContainerMagicApiary extends ContainerMB {
|
|||||||
addPlayerInventory(inventoryPlayer, 0, 110);
|
addPlayerInventory(inventoryPlayer, 0, 110);
|
||||||
|
|
||||||
maxSlot = currentSlot;
|
maxSlot = currentSlot;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -85,12 +93,11 @@ public class ContainerMagicApiary extends ContainerMB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (srcStack.getItem() instanceof IHiveFrame) {
|
} else if (srcStack.getItem() instanceof IHiveFrame) {
|
||||||
clearSlot = this.mergeItemStack(srcStack, SLOT_FRAME_START, SLOT_FRAME_START + SLOT_FRAME_COUNT, false);
|
clearSlot = this
|
||||||
|
.mergeItemStack(srcStack, SLOT_FRAME_START, SLOT_FRAME_START + SLOT_FRAME_COUNT, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clearSlot) {
|
if (clearSlot) {
|
||||||
@@ -108,7 +115,6 @@ public class ContainerMagicApiary extends ContainerMB {
|
|||||||
return apiary.isUseableByPlayer(entityPlayer);
|
return apiary.isUseableByPlayer(entityPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateProgressBar(int i, int j) {
|
public void updateProgressBar(int i, int j) {
|
||||||
apiary.getGUINetworkData(i, j);
|
apiary.getGUINetworkData(i, j);
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.tileentity.TileEntityEffectJar;
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.tileentity.TileEntityEffectJar;
|
||||||
|
|
||||||
|
public class GUIEffectJar extends GuiContainer {
|
||||||
|
|
||||||
public class GUIEffectJar extends GuiContainer
|
|
||||||
{
|
|
||||||
public static final String BACKGROUND_FILE = "jarScreen.png";
|
public static final String BACKGROUND_FILE = "jarScreen.png";
|
||||||
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.GUI_TEXTURE + "jarScreen.png");
|
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(
|
||||||
|
CommonProxy.DOMAIN,
|
||||||
|
CommonProxy.GUI_TEXTURE + "jarScreen.png");
|
||||||
|
|
||||||
private static final int WIDTH = 176;
|
private static final int WIDTH = 176;
|
||||||
private static final int HEIGHT = 156;
|
private static final int HEIGHT = 156;
|
||||||
|
|
||||||
private static final int SLOT_JAR_X = 80;
|
|
||||||
private static final int SLOT_JAR_Y = 22;
|
|
||||||
private static final int SLOT_INVENTORY_X = 8;
|
|
||||||
private static final int SLOT_INVENTORY_Y = 74;
|
|
||||||
private static final int BAR_DEST_X = 117;
|
private static final int BAR_DEST_X = 117;
|
||||||
private static final int BAR_DEST_Y = 10;
|
private static final int BAR_DEST_Y = 10;
|
||||||
|
|
||||||
@@ -29,22 +29,19 @@ public class GUIEffectJar extends GuiContainer
|
|||||||
private static final int BAR_WIDTH = 10;
|
private static final int BAR_WIDTH = 10;
|
||||||
private static final int BAR_HEIGHT = 40;
|
private static final int BAR_HEIGHT = 40;
|
||||||
|
|
||||||
public GUIEffectJar(TileEntityEffectJar jar, EntityPlayer player)
|
public GUIEffectJar(TileEntityEffectJar jar, EntityPlayer player) {
|
||||||
{
|
|
||||||
super(new ContainerEffectJar(jar, player));
|
super(new ContainerEffectJar(jar, player));
|
||||||
this.xSize = WIDTH;
|
this.xSize = WIDTH;
|
||||||
this.ySize = HEIGHT;
|
this.ySize = HEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||||
{
|
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 9, 63, 0);
|
||||||
fontRendererObj.drawString("Inventory", 9, 63, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
|
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||||
{
|
|
||||||
GL11.glColor4f(1f, 1f, 1f, 1f);
|
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_SRC_ALPHA);
|
||||||
this.mc.getTextureManager().bindTexture(BACKGROUND_LOCATION);
|
this.mc.getTextureManager().bindTexture(BACKGROUND_LOCATION);
|
||||||
@@ -59,7 +56,12 @@ public class GUIEffectJar extends GuiContainer
|
|||||||
GL11.glColor3f(r, g, b);
|
GL11.glColor3f(r, g, b);
|
||||||
|
|
||||||
int value = BAR_HEIGHT - (jar.currentBeeHealth * BAR_HEIGHT) / 100;
|
int value = BAR_HEIGHT - (jar.currentBeeHealth * BAR_HEIGHT) / 100;
|
||||||
this.drawTexturedModalRect(this.guiLeft + BAR_DEST_X, this.guiTop + value + BAR_DEST_Y, BAR_SRC_X, BAR_SRC_Y, BAR_WIDTH, BAR_HEIGHT - value);
|
this.drawTexturedModalRect(
|
||||||
|
this.guiLeft + BAR_DEST_X,
|
||||||
|
this.guiTop + value + BAR_DEST_Y,
|
||||||
|
BAR_SRC_X,
|
||||||
|
BAR_SRC_Y,
|
||||||
|
BAR_WIDTH,
|
||||||
|
BAR_HEIGHT - value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package magicbees.client.gui;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import forestry.core.gui.GuiForestry;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.compat.baubles.InventoryBeeRing;
|
||||||
|
|
||||||
|
public class GUIEffectRing extends GuiForestry<ContainerEffectRing, IInventory> {
|
||||||
|
|
||||||
|
public static final String BACKGROUND_FILE = "ringScreen.png";
|
||||||
|
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(
|
||||||
|
CommonProxy.DOMAIN,
|
||||||
|
CommonProxy.GUI_TEXTURE + BACKGROUND_FILE);
|
||||||
|
|
||||||
|
private static final int BAR_DEST_X = 117;
|
||||||
|
private static final int BAR_DEST_Y = 10;
|
||||||
|
|
||||||
|
private static final int BAR_SRC_X = 176;
|
||||||
|
private static final int BAR_SRC_Y = 0;
|
||||||
|
|
||||||
|
private static final int BAR_WIDTH = 10;
|
||||||
|
private static final int BAR_HEIGHT = 40;
|
||||||
|
|
||||||
|
private final InventoryBeeRing inventoryBeeRing;
|
||||||
|
|
||||||
|
protected GUIEffectRing(InventoryBeeRing inventory, InventoryPlayer playerInventory) {
|
||||||
|
super(BACKGROUND_LOCATION, new ContainerEffectRing(inventory, playerInventory), inventory);
|
||||||
|
this.inventoryBeeRing = inventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||||
|
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||||
|
|
||||||
|
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||||
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_SRC_ALPHA);
|
||||||
|
this.mc.getTextureManager().bindTexture(BACKGROUND_LOCATION);
|
||||||
|
|
||||||
|
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, xSize, ySize);
|
||||||
|
|
||||||
|
int currentBeeColour = this.inventoryBeeRing.getCurrentBeeColour();
|
||||||
|
float r = ((currentBeeColour >> 16) & 255) / 255f;
|
||||||
|
float g = ((currentBeeColour >> 8) & 255) / 255f;
|
||||||
|
float b = (currentBeeColour & 255) / 255f;
|
||||||
|
|
||||||
|
GL11.glColor3f(r, g, b);
|
||||||
|
|
||||||
|
int value = BAR_HEIGHT - (this.inventoryBeeRing.getCurrentBeeHealth() * BAR_HEIGHT) / 100;
|
||||||
|
this.drawTexturedModalRect(
|
||||||
|
this.guiLeft + BAR_DEST_X,
|
||||||
|
this.guiTop + value + BAR_DEST_Y,
|
||||||
|
BAR_SRC_X,
|
||||||
|
BAR_SRC_Y,
|
||||||
|
BAR_WIDTH,
|
||||||
|
BAR_HEIGHT - value);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,48 +1,41 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.IGuiHandler;
|
||||||
|
import magicbees.main.utils.compat.baubles.InventoryBeeRing;
|
||||||
import magicbees.tileentity.TileEntityEffectJar;
|
import magicbees.tileentity.TileEntityEffectJar;
|
||||||
import magicbees.tileentity.TileEntityMagicApiary;
|
import magicbees.tileentity.TileEntityMagicApiary;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import cpw.mods.fml.common.network.IGuiHandler;
|
|
||||||
|
|
||||||
public class GUIHandler implements IGuiHandler
|
public class GUIHandler implements IGuiHandler {
|
||||||
{
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
{
|
|
||||||
Object value = null;
|
Object value = null;
|
||||||
|
|
||||||
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
if (ID == UIScreens.EFFECT_JAR.ordinal()) {
|
||||||
{
|
|
||||||
value = new ContainerEffectJar((TileEntityEffectJar) world.getTileEntity(x, y, z), player);
|
value = new ContainerEffectJar((TileEntityEffectJar) world.getTileEntity(x, y, z), player);
|
||||||
}
|
} else if (ID == UIScreens.THAUMIC_APIARY.ordinal()) {
|
||||||
else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
|
|
||||||
{
|
|
||||||
TileEntityMagicApiary tileEntityThaumicApiary = (TileEntityMagicApiary) world.getTileEntity(x, y, z);
|
TileEntityMagicApiary tileEntityThaumicApiary = (TileEntityMagicApiary) world.getTileEntity(x, y, z);
|
||||||
value = new ContainerMagicApiary(player.inventory, tileEntityThaumicApiary);
|
value = new ContainerMagicApiary(player.inventory, tileEntityThaumicApiary);
|
||||||
|
} else if (ID == UIScreens.EFFECT_RING.ordinal()) {
|
||||||
|
value = new ContainerEffectRing(new InventoryBeeRing(player.getHeldItem(), player), player.inventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
{
|
if (ID == UIScreens.EFFECT_JAR.ordinal()) {
|
||||||
Object value = null;
|
return new GUIEffectJar((TileEntityEffectJar) world.getTileEntity(x, y, z), player);
|
||||||
|
} else if (ID == UIScreens.THAUMIC_APIARY.ordinal()) {
|
||||||
if (ID == UIScreens.EFFECT_JAR.ordinal())
|
|
||||||
{
|
|
||||||
value = new GUIEffectJar((TileEntityEffectJar)world.getTileEntity(x, y, z), player);
|
|
||||||
}else if (ID == UIScreens.THAUMIC_APIARY.ordinal())
|
|
||||||
{
|
|
||||||
TileEntityMagicApiary tileEntityThaumicApiary = (TileEntityMagicApiary) world.getTileEntity(x, y, z);
|
TileEntityMagicApiary tileEntityThaumicApiary = (TileEntityMagicApiary) world.getTileEntity(x, y, z);
|
||||||
value = new GuiMagicApiary(player.inventory, tileEntityThaumicApiary);
|
return new GuiMagicApiary(player.inventory, tileEntityThaumicApiary);
|
||||||
|
} else if (ID == UIScreens.EFFECT_RING.ordinal()) {
|
||||||
|
return new GUIEffectRing(new InventoryBeeRing(player.getHeldItem(), player), player.inventory);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
return value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,34 +2,28 @@ package magicbees.client.gui;
|
|||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import cpw.mods.fml.client.IModGuiFactory;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
|
||||||
public class GuiFactory implements IModGuiFactory
|
import cpw.mods.fml.client.IModGuiFactory;
|
||||||
{
|
|
||||||
|
public class GuiFactory implements IModGuiFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(Minecraft minecraftInstance)
|
public void initialize(Minecraft minecraftInstance) {}
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Class<? extends GuiScreen> mainConfigGuiClass()
|
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||||
{
|
|
||||||
return ModGuiConfig.class;
|
return ModGuiConfig.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories()
|
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element)
|
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,24 +1,27 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.tileentity.TileEntityMagicApiary;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.tileentity.TileEntityMagicApiary;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class GuiMagicApiary extends GuiContainer
|
public class GuiMagicApiary extends GuiContainer {
|
||||||
{
|
|
||||||
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.GUI_TEXTURE + "apiary.png");
|
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(
|
||||||
|
CommonProxy.DOMAIN,
|
||||||
|
CommonProxy.GUI_TEXTURE + "apiary.png");
|
||||||
|
|
||||||
private static final int WIDTH = 176;
|
private static final int WIDTH = 176;
|
||||||
private static final int HEIGHT = 190;
|
private static final int HEIGHT = 192;
|
||||||
|
|
||||||
private static final int LIFEBAR_WIDTH = 2;
|
private static final int LIFEBAR_WIDTH = 2;
|
||||||
private static final int LIFEBAR_HEIGHT = 46;
|
private static final int LIFEBAR_HEIGHT = 46;
|
||||||
@@ -61,13 +64,11 @@ public class GuiMagicApiary extends GuiContainer
|
|||||||
|
|
||||||
this.xSize = WIDTH;
|
this.xSize = WIDTH;
|
||||||
this.ySize = HEIGHT;
|
this.ySize = HEIGHT;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int par1, int par2)
|
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||||
{
|
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 9, 99, 0);
|
||||||
fontRendererObj.drawString("Inventory", 9, 99, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -88,47 +89,63 @@ public class GuiMagicApiary extends GuiContainer
|
|||||||
|
|
||||||
private void drawMutationIcon(TileEntityMagicApiary apiary) {
|
private void drawMutationIcon(TileEntityMagicApiary apiary) {
|
||||||
if (apiary.isMutationBoosted()) {
|
if (apiary.isMutationBoosted()) {
|
||||||
this.drawTexturedModalRect(this.guiLeft + MUTATIONBOOST_DEST_X, this.guiTop + MUTATIONBOOST_DEST_Y,
|
this.drawTexturedModalRect(
|
||||||
MUTATIONBOOST_SRC_X, MUTATIONBOOST_SRC_Y, MUTATIONBOOST_WIDTH, MUTATIONBOOST_HEIGHT);
|
this.guiLeft + MUTATIONBOOST_DEST_X,
|
||||||
|
this.guiTop + MUTATIONBOOST_DEST_Y,
|
||||||
|
MUTATIONBOOST_SRC_X,
|
||||||
|
MUTATIONBOOST_SRC_Y,
|
||||||
|
MUTATIONBOOST_WIDTH,
|
||||||
|
MUTATIONBOOST_HEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawDeathRateIcon(TileEntityMagicApiary apiary) {
|
private void drawDeathRateIcon(TileEntityMagicApiary apiary) {
|
||||||
if (apiary.isDeathRateBoosted()) {
|
if (apiary.isDeathRateBoosted()) {
|
||||||
this.drawTexturedModalRect(this.guiLeft + DEATHBOOST_DEST_X, this.guiTop + DEATHBOOST_DEST_Y,
|
this.drawTexturedModalRect(
|
||||||
DEATHBOOST_SRC_X, DEATHBOOST_SRC_Y, DEATHBOOST_WIDTH, DEATHBOOST_HEIGHT);
|
this.guiLeft + DEATHBOOST_DEST_X,
|
||||||
|
this.guiTop + DEATHBOOST_DEST_Y,
|
||||||
|
DEATHBOOST_SRC_X,
|
||||||
|
DEATHBOOST_SRC_Y,
|
||||||
|
DEATHBOOST_WIDTH,
|
||||||
|
DEATHBOOST_HEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawWorkBoostIcon(TileEntityMagicApiary apiary) {
|
private void drawWorkBoostIcon(TileEntityMagicApiary apiary) {
|
||||||
if (apiary.isProductionBoosted()) {
|
if (apiary.isProductionBoosted()) {
|
||||||
this.drawTexturedModalRect(this.guiLeft + WORKBOOST_DEST_X, this.guiTop + WORKBOOST_DEST_Y,
|
this.drawTexturedModalRect(
|
||||||
WORKBOOST_SRC_X, WORKBOOST_SRC_Y, WORKBOOST_WIDTH, WORKBOOST_HEIGHT);
|
this.guiLeft + WORKBOOST_DEST_X,
|
||||||
|
this.guiTop + WORKBOOST_DEST_Y,
|
||||||
|
WORKBOOST_SRC_X,
|
||||||
|
WORKBOOST_SRC_Y,
|
||||||
|
WORKBOOST_WIDTH,
|
||||||
|
WORKBOOST_HEIGHT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawLifebar(TileEntityMagicApiary apiary) {
|
private void drawLifebar(TileEntityMagicApiary apiary) {
|
||||||
int value = LIFEBAR_HEIGHT - apiary.getHealthScaled(LIFEBAR_HEIGHT);
|
int value = LIFEBAR_HEIGHT - apiary.getHealthScaled(LIFEBAR_HEIGHT);
|
||||||
int lifebarSrc = getLifebarSrc(apiary);
|
int lifebarSrc = getLifebarSrc(apiary);
|
||||||
this.drawTexturedModalRect(this.guiLeft + LIFEBAR_DEST_X, this.guiTop + value + LIFEBAR_DEST_Y,
|
this.drawTexturedModalRect(
|
||||||
lifebarSrc, LIFEBAR_SRC_Y, LIFEBAR_WIDTH, LIFEBAR_HEIGHT - value);
|
this.guiLeft + LIFEBAR_DEST_X,
|
||||||
|
this.guiTop + value + LIFEBAR_DEST_Y,
|
||||||
|
lifebarSrc,
|
||||||
|
LIFEBAR_SRC_Y,
|
||||||
|
LIFEBAR_WIDTH,
|
||||||
|
LIFEBAR_HEIGHT - value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getLifebarSrc(TileEntityMagicApiary apiary) {
|
private int getLifebarSrc(TileEntityMagicApiary apiary) {
|
||||||
int value = apiary.getHealthScaled(5);
|
int value = apiary.getHealthScaled(5);
|
||||||
if (value >= 5) {
|
if (value >= 5) {
|
||||||
return LIFEBAR_SRC_STAGE1_X;
|
return LIFEBAR_SRC_STAGE1_X;
|
||||||
}
|
} else if (value >= 4) {
|
||||||
else if (value >= 4) {
|
|
||||||
return LIFEBAR_SRC_STAGE2_X;
|
return LIFEBAR_SRC_STAGE2_X;
|
||||||
}
|
} else if (value >= 3) {
|
||||||
else if (value >= 3) {
|
|
||||||
return LIFEBAR_SRC_STAGE3_X;
|
return LIFEBAR_SRC_STAGE3_X;
|
||||||
}
|
} else if (value >= 2) {
|
||||||
else if (value >= 2) {
|
|
||||||
return LIFEBAR_SRC_STAGE4_X;
|
return LIFEBAR_SRC_STAGE4_X;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return LIFEBAR_SRC_STAGE5_X;
|
return LIFEBAR_SRC_STAGE5_X;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,20 +3,24 @@ package magicbees.client.gui;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.main.Config;
|
|
||||||
import magicbees.main.utils.VersionInfo;
|
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraftforge.common.config.ConfigElement;
|
import net.minecraftforge.common.config.ConfigElement;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
|
||||||
import cpw.mods.fml.client.config.DummyConfigElement;
|
import cpw.mods.fml.client.config.DummyConfigElement;
|
||||||
import cpw.mods.fml.client.config.GuiConfig;
|
import cpw.mods.fml.client.config.GuiConfig;
|
||||||
import cpw.mods.fml.client.config.IConfigElement;
|
import cpw.mods.fml.client.config.IConfigElement;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.VersionInfo;
|
||||||
|
|
||||||
public class ModGuiConfig extends GuiConfig
|
public class ModGuiConfig extends GuiConfig {
|
||||||
{
|
|
||||||
public ModGuiConfig(GuiScreen guiScreen)
|
public ModGuiConfig(GuiScreen guiScreen) {
|
||||||
{
|
super(
|
||||||
super(guiScreen, configElements(), VersionInfo.ModName, false, false,
|
guiScreen,
|
||||||
|
configElements(),
|
||||||
|
VersionInfo.ModName,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
GuiConfig.getAbridgedConfigPath(Config.configuration.toString()));
|
GuiConfig.getAbridgedConfigPath(Config.configuration.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +36,9 @@ public class ModGuiConfig extends GuiConfig
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static IConfigElement categoryElement(String category, String name, String tooltip_key) {
|
private static IConfigElement categoryElement(String category, String name, String tooltip_key) {
|
||||||
return new DummyConfigElement.DummyCategoryElement(name, tooltip_key,
|
return new DummyConfigElement.DummyCategoryElement(
|
||||||
|
name,
|
||||||
|
tooltip_key,
|
||||||
new ConfigElement(Config.configuration.getCategory(category)).getChildElements());
|
new ConfigElement(Config.configuration.getCategory(category)).getChildElements());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -12,12 +12,11 @@ import net.minecraftforge.oredict.OreDictionary;
|
|||||||
/**
|
/**
|
||||||
* @author MysteriousAges
|
* @author MysteriousAges
|
||||||
*/
|
*/
|
||||||
public class SlotCustomItems extends Slot
|
public class SlotCustomItems extends Slot {
|
||||||
{
|
|
||||||
private List<ItemStack> items;
|
private List<ItemStack> items;
|
||||||
|
|
||||||
public SlotCustomItems(IInventory inventory, int slotIndex, int xPos, int yPos, ItemStack... items)
|
public SlotCustomItems(IInventory inventory, int slotIndex, int xPos, int yPos, ItemStack... items) {
|
||||||
{
|
|
||||||
super(inventory, slotIndex, xPos, yPos);
|
super(inventory, slotIndex, xPos, yPos);
|
||||||
this.items = new ArrayList<ItemStack>(items.length);
|
this.items = new ArrayList<ItemStack>(items.length);
|
||||||
|
|
||||||
@@ -27,33 +26,25 @@ public class SlotCustomItems extends Slot
|
|||||||
/**
|
/**
|
||||||
* @return List of valid ItemStacks
|
* @return List of valid ItemStacks
|
||||||
*/
|
*/
|
||||||
public List<ItemStack> getValidItems()
|
public List<ItemStack> getValidItems() {
|
||||||
{
|
|
||||||
return this.items;
|
return this.items;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addValidItem(ItemStack newItem)
|
public void addValidItem(ItemStack newItem) {
|
||||||
{
|
|
||||||
boolean contains = false;
|
boolean contains = false;
|
||||||
for (int i = 0; i < this.items.size(); ++i)
|
for (int i = 0; i < this.items.size(); ++i) {
|
||||||
{
|
|
||||||
ItemStack s = this.items.get(i);
|
ItemStack s = this.items.get(i);
|
||||||
if (s.getItem() == newItem.getItem())
|
if (s.getItem() == newItem.getItem()) {
|
||||||
{
|
if (s.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||||
if (s.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
|
||||||
{
|
|
||||||
contains = true;
|
contains = true;
|
||||||
break;
|
break;
|
||||||
}
|
} else if (s.getItemDamage() == newItem.getItemDamage()) {
|
||||||
else if (s.getItemDamage() == newItem.getItemDamage())
|
|
||||||
{
|
|
||||||
contains = true;
|
contains = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!contains)
|
if (!contains) {
|
||||||
{
|
|
||||||
this.items.add(newItem);
|
this.items.add(newItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -61,20 +52,14 @@ public class SlotCustomItems extends Slot
|
|||||||
/**
|
/**
|
||||||
* @param removeItem ItemStack to remove.
|
* @param removeItem ItemStack to remove.
|
||||||
*/
|
*/
|
||||||
public void removeValidItem(ItemStack removeItem)
|
public void removeValidItem(ItemStack removeItem) {
|
||||||
{
|
for (int i = 0; i < this.items.size(); ++i) {
|
||||||
for (int i = 0; i < this.items.size(); ++i)
|
|
||||||
{
|
|
||||||
ItemStack s = this.items.get(i);
|
ItemStack s = this.items.get(i);
|
||||||
if (s.getItem() == removeItem.getItem())
|
if (s.getItem() == removeItem.getItem()) {
|
||||||
{
|
if (s.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||||
if (s.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
|
||||||
{
|
|
||||||
this.items.remove(i);
|
this.items.remove(i);
|
||||||
break;
|
break;
|
||||||
}
|
} else if (s.getItemDamage() == removeItem.getItemDamage()) {
|
||||||
else if (s.getItemDamage() == removeItem.getItemDamage())
|
|
||||||
{
|
|
||||||
this.items.remove(i);
|
this.items.remove(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -83,19 +68,15 @@ public class SlotCustomItems extends Slot
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValid(ItemStack itemStack)
|
public boolean isItemValid(ItemStack itemStack) {
|
||||||
{
|
for (ItemStack item : this.items) {
|
||||||
for (ItemStack item : this.items)
|
if (item != null && item.getItem() == itemStack.getItem()) {
|
||||||
{
|
if (item.getItemDamage() == itemStack.getItemDamage()
|
||||||
if (item != null && item.getItem() == itemStack.getItem())
|
|| item.getItemDamage() == OreDictionary.WILDCARD_VALUE) {
|
||||||
{
|
|
||||||
if (item.getItemDamage() == itemStack.getItemDamage() || item.getItemDamage() == OreDictionary.WILDCARD_VALUE)
|
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
import forestry.api.apiculture.IHiveFrame;
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.IHiveFrame;
|
||||||
|
|
||||||
public class SlotFrame extends SlotCustomItems {
|
public class SlotFrame extends SlotCustomItems {
|
||||||
|
|
||||||
public SlotFrame(IInventory inventory, int slotIndex, int xPos, int yPos) {
|
public SlotFrame(IInventory inventory, int slotIndex, int xPos, int yPos) {
|
||||||
super(inventory, slotIndex, xPos, yPos);
|
super(inventory, slotIndex, xPos, yPos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
public enum UIScreens
|
public enum UIScreens {
|
||||||
{
|
|
||||||
EFFECT_JAR,
|
EFFECT_JAR,
|
||||||
THAUMIC_APIARY,;
|
THAUMIC_APIARY,
|
||||||
|
EFFECT_RING
|
||||||
}
|
}
|
||||||
@@ -1,30 +1,34 @@
|
|||||||
package magicbees.client.model;
|
package magicbees.client.model;
|
||||||
|
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||||
|
import net.minecraftforge.client.model.IModelCustom;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import magicbees.main.CommonProxy;
|
import magicbees.main.CommonProxy;
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
|
||||||
import net.minecraftforge.client.model.IModelCustom;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class ModelEffectJar
|
public class ModelEffectJar {
|
||||||
{
|
|
||||||
public static final ResourceLocation objFile = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "effectJar.obj");
|
public static final ResourceLocation objFile = new ResourceLocation(
|
||||||
public static final ResourceLocation textureLocation = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "jarTexture.png");
|
CommonProxy.DOMAIN,
|
||||||
|
CommonProxy.MODEL + "effectJar.obj");
|
||||||
|
public static final ResourceLocation textureLocation = new ResourceLocation(
|
||||||
|
CommonProxy.DOMAIN,
|
||||||
|
CommonProxy.MODEL + "jarTexture.png");
|
||||||
|
|
||||||
public static final ModelEffectJar model = new ModelEffectJar();
|
public static final ModelEffectJar model = new ModelEffectJar();
|
||||||
|
|
||||||
private IModelCustom effectJarObj;
|
private IModelCustom effectJarObj;
|
||||||
|
|
||||||
public ModelEffectJar()
|
public ModelEffectJar() {
|
||||||
{
|
|
||||||
this.effectJarObj = AdvancedModelLoader.loadModel(objFile);
|
this.effectJarObj = AdvancedModelLoader.loadModel(objFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void render()
|
public void render() {
|
||||||
{
|
|
||||||
this.effectJarObj.renderPart("jarLid");
|
this.effectJarObj.renderPart("jarLid");
|
||||||
|
|
||||||
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
||||||
@@ -34,6 +38,5 @@ public class ModelEffectJar
|
|||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
this.effectJarObj.renderPart("jarBase");
|
this.effectJarObj.renderPart("jarBase");
|
||||||
GL11.glPopAttrib();
|
GL11.glPopAttrib();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,24 @@
|
|||||||
package magicbees.client.model;
|
package magicbees.client.model;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||||
import net.minecraftforge.client.model.IModelCustom;
|
import net.minecraftforge.client.model.IModelCustom;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class ModelVisAuraProvider {
|
public class ModelVisAuraProvider {
|
||||||
public static final ResourceLocation objFile = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "visAuraConverter.obj");
|
|
||||||
public static final ResourceLocation textureLocation = new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "visAuraProvider.png");
|
public static final ResourceLocation objFile = new ResourceLocation(
|
||||||
|
CommonProxy.DOMAIN,
|
||||||
|
CommonProxy.MODEL + "visAuraConverter.obj");
|
||||||
|
public static final ResourceLocation textureLocation = new ResourceLocation(
|
||||||
|
CommonProxy.DOMAIN,
|
||||||
|
CommonProxy.MODEL + "visAuraProvider.png");
|
||||||
|
|
||||||
public static final ModelVisAuraProvider model = new ModelVisAuraProvider();
|
public static final ModelVisAuraProvider model = new ModelVisAuraProvider();
|
||||||
|
|
||||||
@@ -26,7 +32,10 @@ public class ModelVisAuraProvider {
|
|||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glRotated(Math.sin(tick * Math.PI * 2 / 80) * 0.7, 0, 1, 0);
|
GL11.glRotated(Math.sin(tick * Math.PI * 2 / 80) * 0.7, 0, 1, 0);
|
||||||
GL11.glRotated(Math.sin((tick + 25) * Math.PI * 2 / 150) * 0.75, 0.5, 0, 0.5);
|
GL11.glRotated(Math.sin((tick + 25) * Math.PI * 2 / 150) * 0.75, 0.5, 0, 0.5);
|
||||||
GL11.glTranslated(Math.sin(tick * Math.PI * 2 / 1000) * 0.025, 0, Math.sin((tick + 30) * Math.PI * 2 / 650) * 0.03);
|
GL11.glTranslated(
|
||||||
|
Math.sin(tick * Math.PI * 2 / 1000) * 0.025,
|
||||||
|
0,
|
||||||
|
Math.sin((tick + 30) * Math.PI * 2 / 650) * 0.03);
|
||||||
float red = (float) (Math.sin(tick * Math.PI * 2 / 130) * 0.2 + 0.8);
|
float red = (float) (Math.sin(tick * Math.PI * 2 / 130) * 0.2 + 0.8);
|
||||||
float green = (float) (Math.cos((tick + 2) * Math.PI * 2 / 140) * 0.2 + 0.8);
|
float green = (float) (Math.cos((tick + 2) * Math.PI * 2 / 140) * 0.2 + 0.8);
|
||||||
float blue = (float) (Math.sin((tick + 5) * Math.PI * 2 / 99) * 0.2 + 0.8);
|
float blue = (float) (Math.sin((tick + 5) * Math.PI * 2 / 99) * 0.2 + 0.8);
|
||||||
|
|||||||
@@ -1,44 +1,40 @@
|
|||||||
package magicbees.client.render;
|
package magicbees.client.render;
|
||||||
|
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
|
||||||
import magicbees.client.model.ModelEffectJar;
|
|
||||||
import magicbees.tileentity.TileEntityEffectJar;
|
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraftforge.client.IItemRenderer;
|
import net.minecraftforge.client.IItemRenderer;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
public class RendererEffectJar extends TileEntitySpecialRenderer implements IItemRenderer
|
import cpw.mods.fml.client.FMLClientHandler;
|
||||||
{
|
import magicbees.client.model.ModelEffectJar;
|
||||||
|
import magicbees.tileentity.TileEntityEffectJar;
|
||||||
|
|
||||||
|
public class RendererEffectJar extends TileEntitySpecialRenderer implements IItemRenderer {
|
||||||
|
|
||||||
public static RendererEffectJar instance = new RendererEffectJar();
|
public static RendererEffectJar instance = new RendererEffectJar();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
|
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick) {
|
||||||
{
|
if (tileEntity instanceof TileEntityEffectJar) {
|
||||||
if (tileEntity instanceof TileEntityEffectJar)
|
|
||||||
{
|
|
||||||
this.doRender(x, y, z, 1f);
|
this.doRender(x, y, z, 1f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||||
{
|
switch (type) {
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
default:
|
default:
|
||||||
case ENTITY:
|
case ENTITY:
|
||||||
doRender(0, 0, 0, 1.8f);
|
doRender(0, 0, 0, 1.8f);
|
||||||
@@ -58,8 +54,7 @@ public class RendererEffectJar extends TileEntitySpecialRenderer implements IIte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doRender(double x, double y, double z, float scale)
|
private void doRender(double x, double y, double z, float scale) {
|
||||||
{
|
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
|
||||||
@@ -73,5 +68,4 @@ public class RendererEffectJar extends TileEntitySpecialRenderer implements IIte
|
|||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package magicbees.client.render;
|
package magicbees.client.render;
|
||||||
|
|
||||||
import magicbees.client.model.ModelVisAuraProvider;
|
|
||||||
import magicbees.tileentity.TileEntityVisAuraProvider;
|
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@@ -10,8 +8,11 @@ import net.minecraftforge.client.IItemRenderer;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
import cpw.mods.fml.client.FMLClientHandler;
|
||||||
|
import magicbees.client.model.ModelVisAuraProvider;
|
||||||
|
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||||
|
|
||||||
public class RendererVisAuraProvider extends TileEntitySpecialRenderer implements IItemRenderer {
|
public class RendererVisAuraProvider extends TileEntitySpecialRenderer implements IItemRenderer {
|
||||||
|
|
||||||
public static RendererVisAuraProvider instance = new RendererVisAuraProvider();
|
public static RendererVisAuraProvider instance = new RendererVisAuraProvider();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -46,5 +47,4 @@ public class RendererVisAuraProvider extends TileEntitySpecialRenderer implement
|
|||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,25 +2,25 @@ package magicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.item.types.CapsuleType;
|
|
||||||
import magicbees.item.types.FluidType;
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.item.types.CapsuleType;
|
||||||
|
import magicbees.item.types.FluidType;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
|
||||||
|
public class ItemCapsule extends Item {
|
||||||
|
|
||||||
public class ItemCapsule extends Item
|
|
||||||
{
|
|
||||||
private CapsuleType capsuleType;
|
private CapsuleType capsuleType;
|
||||||
|
|
||||||
public ItemCapsule(CapsuleType type, int maxStackSize)
|
public ItemCapsule(CapsuleType type, int maxStackSize) {
|
||||||
{
|
|
||||||
super();
|
super();
|
||||||
this.capsuleType = type;
|
this.capsuleType = type;
|
||||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||||
@@ -30,31 +30,27 @@ public class ItemCapsule extends Item
|
|||||||
GameRegistry.registerItem(this, "capsule." + type.toString().toLowerCase());
|
GameRegistry.registerItem(this, "capsule." + type.toString().toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
public CapsuleType getType()
|
public CapsuleType getType() {
|
||||||
{
|
|
||||||
return this.capsuleType;
|
return this.capsuleType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack itemStack)
|
public String getItemStackDisplayName(ItemStack itemStack) {
|
||||||
{
|
return String.format(
|
||||||
return String.format(this.capsuleType.getLocalizedName(), FluidType.values()[itemStack.getItemDamage()].getDisplayName());
|
this.capsuleType.getLocalizedName(),
|
||||||
|
FluidType.VALUES[itemStack.getItemDamage()].getDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getCapsuleForLiquid(FluidType l)
|
public ItemStack getCapsuleForLiquid(FluidType l) {
|
||||||
{
|
|
||||||
return new ItemStack(this, 1, l.ordinal());
|
return new ItemStack(this, 1, l.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(Item item, CreativeTabs tab, List itemList)
|
public void getSubItems(Item item, CreativeTabs tab, List itemList) {
|
||||||
{
|
for (FluidType l : FluidType.VALUES) {
|
||||||
for (FluidType l : FluidType.values())
|
if (l.available) {
|
||||||
{
|
|
||||||
if (l.available)
|
|
||||||
{
|
|
||||||
itemList.add(new ItemStack(this, 1, l.ordinal()));
|
itemList.add(new ItemStack(this, 1, l.ordinal()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,20 +58,18 @@ public class ItemCapsule extends Item
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean requiresMultipleRenderPasses()
|
public boolean requiresMultipleRenderPasses() {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister iconRegister)
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
{
|
this.itemIcon = iconRegister.registerIcon(
|
||||||
this.itemIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":capsule" + this.capsuleType.getName().substring(0, 1).toUpperCase()
|
CommonProxy.DOMAIN + ":capsule"
|
||||||
|
+ this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||||
+ this.capsuleType.getName().substring(1));
|
+ this.capsuleType.getName().substring(1));
|
||||||
for (FluidType t : FluidType.values())
|
for (FluidType t : FluidType.VALUES) {
|
||||||
{
|
if (t != FluidType.EMPTY) {
|
||||||
if (t != FluidType.EMPTY)
|
|
||||||
{
|
|
||||||
t.liquidIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":liquids/" + t.liquidID);
|
t.liquidIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":liquids/" + t.liquidID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -83,19 +77,16 @@ public class ItemCapsule extends Item
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIconFromDamageForRenderPass(int metadata, int pass)
|
public IIcon getIconFromDamageForRenderPass(int metadata, int pass) {
|
||||||
{
|
|
||||||
IIcon i = this.itemIcon;
|
IIcon i = this.itemIcon;
|
||||||
if (metadata != 0 && pass == 0)
|
if (metadata != 0 && pass == 0) {
|
||||||
{
|
i = FluidType.VALUES[metadata % FluidType.VALUES.length].liquidIcon;
|
||||||
i = FluidType.values()[metadata % FluidType.values().length].liquidIcon;
|
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderPasses(int metadata)
|
public int getRenderPasses(int metadata) {
|
||||||
{
|
|
||||||
return (metadata == 0) ? 1 : 2;
|
return (metadata == 0) ? 1 : 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,23 +2,23 @@ package magicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import magicbees.item.types.CombType;
|
|
||||||
import magicbees.main.Config;
|
|
||||||
import magicbees.main.utils.compat.ForestryHelper;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import forestry.api.core.Tabs;
|
import forestry.api.core.Tabs;
|
||||||
|
import magicbees.item.types.CombType;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.compat.ForestryHelper;
|
||||||
|
|
||||||
public class ItemComb extends Item
|
public class ItemComb extends Item {
|
||||||
{
|
|
||||||
public ItemComb()
|
public ItemComb() {
|
||||||
{
|
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(Tabs.tabApiculture);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
@@ -26,25 +26,20 @@ public class ItemComb extends Item
|
|||||||
GameRegistry.registerItem(this, "comb");
|
GameRegistry.registerItem(this, "comb");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getStackForType(CombType type)
|
public ItemStack getStackForType(CombType type) {
|
||||||
{
|
|
||||||
return new ItemStack(this, 1, type.ordinal());
|
return new ItemStack(this, 1, type.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getStackForType(CombType type, int count)
|
public ItemStack getStackForType(CombType type, int count) {
|
||||||
{
|
|
||||||
return new ItemStack(this, count, type.ordinal());
|
return new ItemStack(this, count, type.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||||
{
|
for (CombType type : CombType.VALUES) {
|
||||||
for (CombType type : CombType.values())
|
if (type.showInList || Config.forestryDebugEnabled) {
|
||||||
{
|
|
||||||
if (type.showInList || Config.forestryDebugEnabled)
|
|
||||||
{
|
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,14 +47,12 @@ public class ItemComb extends Item
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean requiresMultipleRenderPasses()
|
public boolean requiresMultipleRenderPasses() {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderPasses(int meta)
|
public int getRenderPasses(int meta) {
|
||||||
{
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,46 +60,39 @@ public class ItemComb extends Item
|
|||||||
private IIcon secondIcon;
|
private IIcon secondIcon;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister par1IconRegister)
|
public void registerIcons(IIconRegister par1IconRegister) {
|
||||||
{
|
|
||||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.0");
|
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.0");
|
||||||
this.secondIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.1");
|
this.secondIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":beeCombs.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(ItemStack stack, int pass)
|
public IIcon getIcon(ItemStack stack, int pass) {
|
||||||
{
|
|
||||||
return (pass == 0) ? itemIcon : secondIcon;
|
return (pass == 0) ? itemIcon : secondIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||||
{
|
int meta = Math.max(0, Math.min(CombType.VALUES.length - 1, stack.getItemDamage()));
|
||||||
int meta = Math.max(0, Math.min(CombType.values().length - 1, stack.getItemDamage()));
|
int colour = CombType.VALUES[meta].getColours()[0];
|
||||||
int colour = CombType.values()[meta].getColours()[0];
|
|
||||||
|
|
||||||
if (pass >= 1)
|
if (pass >= 1) {
|
||||||
{
|
colour = CombType.VALUES[meta].getColours()[1];
|
||||||
colour = CombType.values()[meta].getColours()[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack stack)
|
public String getItemStackDisplayName(ItemStack stack) {
|
||||||
{
|
return CombType.VALUES[stack.getItemDamage()].getName();
|
||||||
return CombType.values()[stack.getItemDamage()].getName();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getDamage(ItemStack stack) {
|
public int getDamage(ItemStack stack) {
|
||||||
if (CombType.values().length < super.getDamage(stack)) {
|
if (CombType.VALUES.length < super.getDamage(stack)) {
|
||||||
stack.setItemDamage(0);
|
stack.setItemDamage(0);
|
||||||
}
|
}
|
||||||
return super.getDamage(stack);
|
return super.getDamage(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,22 +2,22 @@ package magicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import magicbees.item.types.DropType;
|
|
||||||
import magicbees.main.utils.compat.ForestryHelper;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import forestry.api.core.Tabs;
|
|
||||||
|
|
||||||
public class ItemDrop extends Item
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
{
|
import cpw.mods.fml.relauncher.Side;
|
||||||
public ItemDrop()
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
{
|
import forestry.api.core.Tabs;
|
||||||
|
import magicbees.item.types.DropType;
|
||||||
|
import magicbees.main.utils.compat.ForestryHelper;
|
||||||
|
|
||||||
|
public class ItemDrop extends Item {
|
||||||
|
|
||||||
|
public ItemDrop() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(Tabs.tabApiculture);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
@@ -25,37 +25,31 @@ public class ItemDrop extends Item
|
|||||||
GameRegistry.registerItem(this, "drop");
|
GameRegistry.registerItem(this, "drop");
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getStackForType(DropType type)
|
public ItemStack getStackForType(DropType type) {
|
||||||
{
|
|
||||||
return new ItemStack(this, 1, type.ordinal());
|
return new ItemStack(this, 1, type.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getStackForType(DropType type, int count)
|
public ItemStack getStackForType(DropType type, int count) {
|
||||||
{
|
|
||||||
return new ItemStack(this, count, type.ordinal());
|
return new ItemStack(this, count, type.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||||
{
|
for (DropType type : DropType.VALUES) {
|
||||||
for (DropType type : DropType.values())
|
|
||||||
{
|
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public boolean requiresMultipleRenderPasses()
|
public boolean requiresMultipleRenderPasses() {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderPasses(int metadata)
|
public int getRenderPasses(int metadata) {
|
||||||
{
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,37 +57,31 @@ public class ItemDrop extends Item
|
|||||||
private IIcon secondIcon;
|
private IIcon secondIcon;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister par1IconRegister)
|
public void registerIcons(IIconRegister par1IconRegister) {
|
||||||
{
|
|
||||||
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.0");
|
this.itemIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.0");
|
||||||
this.secondIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.1");
|
this.secondIcon = par1IconRegister.registerIcon(ForestryHelper.Name.toLowerCase() + ":honeyDrop.1");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(ItemStack stack, int pass)
|
public IIcon getIcon(ItemStack stack, int pass) {
|
||||||
{
|
|
||||||
return (pass == 0) ? this.itemIcon : this.secondIcon;
|
return (pass == 0) ? this.itemIcon : this.secondIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||||
{
|
int meta = Math.max(0, Math.min(DropType.VALUES.length - 1, stack.getItemDamage()));
|
||||||
int meta = Math.max(0, Math.min(DropType.values().length - 1, stack.getItemDamage()));
|
int colour = DropType.VALUES[meta].combColour[0];
|
||||||
int colour = DropType.values()[meta].combColour[0];
|
|
||||||
|
|
||||||
if (pass >= 1)
|
if (pass >= 1) {
|
||||||
{
|
colour = DropType.VALUES[meta].combColour[1];
|
||||||
colour = DropType.values()[meta].combColour[1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack stack)
|
public String getItemStackDisplayName(ItemStack stack) {
|
||||||
{
|
return DropType.VALUES[stack.getItemDamage()].getName();
|
||||||
return DropType.values()[stack.getItemDamage()].getName();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import magicbees.main.Config;
|
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
@@ -9,7 +7,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.arboriculture.IToolGrafter;
|
import forestry.api.arboriculture.IToolGrafter;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
|
||||||
public class ItemGrafter extends Item implements IToolGrafter {
|
public class ItemGrafter extends Item implements IToolGrafter {
|
||||||
|
|
||||||
@@ -26,17 +27,15 @@ public class ItemGrafter extends Item implements IToolGrafter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) {
|
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int x, int y, int z,
|
||||||
|
EntityLivingBase entityLiving) {
|
||||||
int damage = 1;
|
int damage = 1;
|
||||||
if (ThaumcraftHelper.isActive()) {
|
if (ThaumcraftHelper.isActive()) {
|
||||||
if (block == ThaumcraftHelper.leaf)
|
if (block == ThaumcraftHelper.leaf) {
|
||||||
{
|
|
||||||
int meta = world.getBlockMetadata(x, y, z) & 1;
|
int meta = world.getBlockMetadata(x, y, z) & 1;
|
||||||
if (meta == 0 || meta == 1)
|
if (meta == 0 || meta == 1) {
|
||||||
{
|
|
||||||
double chance = Math.random();
|
double chance = Math.random();
|
||||||
if (chance <= Config.thaumcraftSaplingDroprate)
|
if (chance <= Config.thaumcraftSaplingDroprate) {
|
||||||
{
|
|
||||||
this.dropItem(world, x, y, z, new ItemStack(ThaumcraftHelper.plant, 1, meta));
|
this.dropItem(world, x, y, z, new ItemStack(ThaumcraftHelper.plant, 1, meta));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,5 +56,4 @@ public class ItemGrafter extends Item implements IToolGrafter {
|
|||||||
world.spawnEntityInWorld(entityitem);
|
world.spawnEntityInWorld(entityitem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import magicbees.block.types.HiveType;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.block.types.HiveType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Allen on 7/29/2014.
|
* Created by Allen on 7/29/2014.
|
||||||
*/
|
*/
|
||||||
public class ItemMagicHive extends ItemBlock
|
public class ItemMagicHive extends ItemBlock {
|
||||||
{
|
|
||||||
public ItemMagicHive(Block block)
|
public ItemMagicHive(Block block) {
|
||||||
{
|
|
||||||
super(block);
|
super(block);
|
||||||
setMaxDamage(0);
|
setMaxDamage(0);
|
||||||
setHasSubtypes(true);
|
setHasSubtypes(true);
|
||||||
@@ -36,8 +36,8 @@ public class ItemMagicHive extends ItemBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName(ItemStack itemstack)
|
public String getUnlocalizedName(ItemStack itemstack) {
|
||||||
{
|
return getBlock().getUnlocalizedName() + "."
|
||||||
return getBlock().getUnlocalizedName() + "." + HiveType.getHiveFromMeta(itemstack.getItemDamage()).name().toLowerCase();
|
+ HiveType.getHiveFromMeta(itemstack.getItemDamage()).name().toLowerCase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,26 +1,25 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import magicbees.item.types.HiveFrameType;
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import forestry.api.apiculture.IBee;
|
import forestry.api.apiculture.IBee;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
import forestry.api.apiculture.IHiveFrame;
|
import forestry.api.apiculture.IHiveFrame;
|
||||||
|
import magicbees.item.types.HiveFrameType;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
|
||||||
|
public class ItemMagicHiveFrame extends Item implements IHiveFrame {
|
||||||
|
|
||||||
public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
|
||||||
{
|
|
||||||
private HiveFrameType type;
|
private HiveFrameType type;
|
||||||
|
|
||||||
public ItemMagicHiveFrame(HiveFrameType frameType)
|
public ItemMagicHiveFrame(HiveFrameType frameType) {
|
||||||
{
|
|
||||||
super();
|
super();
|
||||||
this.type = frameType;
|
this.type = frameType;
|
||||||
this.setMaxDamage(this.type.maxDamage);
|
this.setMaxDamage(this.type.maxDamage);
|
||||||
@@ -31,8 +30,7 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister par1IconRegister)
|
public void registerIcons(IIconRegister par1IconRegister) {
|
||||||
{
|
|
||||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":frame" + type.getName());
|
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":frame" + type.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,9 +54,7 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2)
|
public boolean isBookEnchantable(ItemStack itemstack1, ItemStack itemstack2) {
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loaded 100 of 332 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user