mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Compare commits
274
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 |
No files matched your search
@@ -0,0 +1,2 @@
|
|||||||
|
# Ignore spotlessApply reformat
|
||||||
|
f1069a91f1b2ea9469775696c097dd6fb484e6e8
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# bashsupport disable=BP5006 # Global environment variables
|
|
||||||
RUNDIR="run" \
|
|
||||||
CRASH="crash-reports" \
|
|
||||||
SERVERLOG="server.log"
|
|
||||||
|
|
||||||
# enable nullglob to get 0 results when no match rather than the pattern
|
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
# store matches in array
|
|
||||||
crash_reports=("$RUNDIR/$CRASH/crash"*.txt)
|
|
||||||
|
|
||||||
# if array not empty there are crash_reports
|
|
||||||
if [ "${#crash_reports[@]}" -gt 0 ]; then
|
|
||||||
# get the latest crash_report from array
|
|
||||||
latest_crash_report="${crash_reports[-1]}"
|
|
||||||
{
|
|
||||||
printf 'Latest crash report detected %s:\n' "${latest_crash_report##*/}"
|
|
||||||
cat "$latest_crash_report"
|
|
||||||
} >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep --quiet --fixed-strings 'Fatal errors were detected' "$SERVERLOG"; then
|
|
||||||
{
|
|
||||||
printf 'Fatal errors detected:\n'
|
|
||||||
cat server.log
|
|
||||||
} >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep --quiet --fixed-strings 'The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED' \
|
|
||||||
"$SERVERLOG"; then
|
|
||||||
{
|
|
||||||
printf 'Server force stopped:'
|
|
||||||
cat server.log
|
|
||||||
} >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! grep --quiet --perl-regexp --only-matching '.+Done \(.+\)\! For help, type "help" or "\?"' "$SERVERLOG"; then
|
|
||||||
{
|
|
||||||
printf 'Server did not finish startup:'
|
|
||||||
cat server.log
|
|
||||||
} >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf 'No crash reports detected'
|
|
||||||
exit 0
|
|
||||||
@@ -3,9 +3,9 @@ name: Build and test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
push:
|
push:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -29,3 +29,4 @@ src/main/resources/mixins.*.json
|
|||||||
*.bat
|
*.bat
|
||||||
*.DS_Store
|
*.DS_Store
|
||||||
!gradlew.bat
|
!gradlew.bat
|
||||||
|
layout.json
|
||||||
+2
-1118
File diff suppressed because it is too large.
Load diff
+12
-3
@@ -1,9 +1,18 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile('com.github.GTNewHorizons:ForestryMC:4.5.2:dev')
|
api('com.github.GTNewHorizons:ForestryMC:4.12.1:dev')
|
||||||
|
|
||||||
compileOnly('com.github.GTNewHorizons:Baubles:1.0.1.14:dev') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:BloodMagic:1.10.0:dev')
|
||||||
compileOnly('com.github.GTNewHorizons:Botania:1.9.2-GTNH:api') {transitive = false}
|
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('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')
|
||||||
}
|
}
|
||||||
|
|
||||||
+198
-24
@@ -1,64 +1,238 @@
|
|||||||
|
# ExampleMod tag to use as Blowdryer (Spotless, etc.) settings version, leave empty to disable.
|
||||||
|
# LOCAL to test local config updates.
|
||||||
|
gtnh.settings.blowdryerTag = 0.2.0
|
||||||
|
|
||||||
|
# Human-readable mod name, available for mcmod.info population.
|
||||||
modName = Magic Bees
|
modName = Magic Bees
|
||||||
|
|
||||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
# Case-sensitive identifier string, available for mcmod.info population and used for automatic mixin JSON generation.
|
||||||
|
# Conventionally lowercase.
|
||||||
modId = MagicBees
|
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
|
modGroup = magicbees
|
||||||
|
|
||||||
# WHY is there no version field?
|
# Whether to use modGroup as the maven publishing group.
|
||||||
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
|
# When false, com.github.GTNewHorizons is used.
|
||||||
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
|
useModGroupForPublishing = false
|
||||||
|
|
||||||
# Will update your build.gradle automatically whenever an update is available
|
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||||
autoUpdateBuildScript = false
|
autoUpdateBuildScript = false
|
||||||
|
|
||||||
|
# Version of Minecraft to target
|
||||||
minecraftVersion = 1.7.10
|
minecraftVersion = 1.7.10
|
||||||
|
|
||||||
|
# Version of Minecraft Forge to target
|
||||||
forgeVersion = 10.13.4.1614
|
forgeVersion = 10.13.4.1614
|
||||||
|
|
||||||
# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you
|
# Specify an MCP channel for dependency deobfuscation and the deobfParams task.
|
||||||
# restart Minecraft in development. Choose this dependent on your mod:
|
channel = stable
|
||||||
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
|
|
||||||
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
|
# 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
|
developmentEnvironmentUserName = Developer
|
||||||
|
|
||||||
# Define a source file of your project with:
|
# Enables modern Java syntax support. Valid values:
|
||||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
# - false: No modern syntax, Java 8 only
|
||||||
# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's
|
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
||||||
# version in @Mod([...], version = VERSION, [...])
|
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
||||||
# Leave these properties empty to skip individual token replacements
|
# - modern: Native modern Java bytecode, no downgrading
|
||||||
replaceGradleTokenInFile = VersionInfo.java
|
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 =
|
gradleTokenModId =
|
||||||
|
|
||||||
|
# [DEPRECATED] Mod name replacement token.
|
||||||
gradleTokenModName =
|
gradleTokenModName =
|
||||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
|
||||||
|
# [DEPRECATED] Mod Group replacement token.
|
||||||
gradleTokenGroupName =
|
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
|
# 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.
|
# leave this property empty.
|
||||||
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
|
# Example value: (apiPackage = api) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.api
|
||||||
apiPackage = api
|
apiPackage = api
|
||||||
|
|
||||||
# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/
|
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
|
||||||
# Example value: mymodid_at.cfg
|
# There can be multiple files in a space-separated list.
|
||||||
|
# Example value: mymodid_at.cfg nei_at.cfg
|
||||||
accessTransformersFile =
|
accessTransformersFile =
|
||||||
|
|
||||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||||
usesMixins = false
|
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.
|
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||||
mixinPlugin =
|
mixinPlugin =
|
||||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
|
||||||
|
# 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 =
|
mixinsPackage =
|
||||||
|
|
||||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||||
# This parameter is for legacy compatibility only
|
# This parameter is for legacy compatibility only
|
||||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
|
||||||
coreModClass =
|
coreModClass =
|
||||||
|
|
||||||
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
|
# 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!
|
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||||
containsMixinsAndOrCoreModOnly = false
|
containsMixinsAndOrCoreModOnly = false
|
||||||
|
|
||||||
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
|
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
|
||||||
# responsibility check the licence and request permission for distribution, if required.
|
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
|
usesShadowedDependencies = false
|
||||||
|
|
||||||
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
|
# 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.
|
# projects. New projects should not use this parameter.
|
||||||
customArchiveBaseName = magicbees
|
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
-1
@@ -1,5 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
|
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
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright 2015 the original author or authors.
|
# Copyright © 2015 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@@ -15,80 +15,114 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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/.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
app_path=$0
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
# Need this for daisy-chained symlinks.
|
||||||
ls=`ls -ld "$PRG"`
|
while
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
[ -h "$app_path" ]
|
||||||
PRG="$link"
|
do
|
||||||
else
|
ls=$( ls -ld "$app_path" )
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
link=${ls#*' -> '}
|
||||||
fi
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
# This is normally unused
|
||||||
APP_BASE_NAME=`basename "$0"`
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
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
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "`uname`" in
|
case "$( uname )" in #(
|
||||||
CYGWIN* )
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
cygwin=true
|
Darwin* ) darwin=true ;; #(
|
||||||
;;
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
Darwin* )
|
NONSTOP* ) nonstop=true ;;
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
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
|
||||||
@@ -97,92 +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" -a "$nonstop" = "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 or MSYS, switch paths to Windows format before running java
|
|
||||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
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
|
||||||
|
|
||||||
# Escape application args
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
save () {
|
# * args from the command line
|
||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
# * the main class name
|
||||||
echo " "
|
# * -classpath
|
||||||
}
|
# * -D...appname settings
|
||||||
APP_ARGS=$(save "$@")
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
|
||||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
|
||||||
cd "$(dirname "$0")"
|
# 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
|
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" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
Vendored
+27
-34
@@ -13,8 +13,10 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -25,10 +27,14 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
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.
|
@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"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@@ -37,13 +43,13 @@ 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
|
||||||
|
|
||||||
@@ -51,48 +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 Windows variants
|
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
|
||||||
|
|
||||||
:win9xME_args
|
|
||||||
@rem Slurp the command line arguments.
|
|
||||||
set CMD_LINE_ARGS=
|
|
||||||
set _SKIP=2
|
|
||||||
|
|
||||||
:win9xME_args_slurp
|
|
||||||
if "x%~1" == "x" goto execute
|
|
||||||
|
|
||||||
set CMD_LINE_ARGS=%*
|
|
||||||
|
|
||||||
:execute
|
: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
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
before_install:
|
|
||||||
- ./gradlew setupCIWorkspace
|
|
||||||
@@ -1,26 +1,4 @@
|
|||||||
// Add any additional repositories for your dependencies here
|
// Add any additional repositories for your dependencies here
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
|
||||||
name 'GTNH Maven'
|
|
||||||
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
|
|
||||||
allowInsecureProtocol
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
name 'ic2'
|
|
||||||
url 'https://maven.ic2.player.to/'
|
|
||||||
metadataSources {
|
|
||||||
mavenPom()
|
|
||||||
artifact()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
url 'https://jitpack.io'
|
|
||||||
}
|
|
||||||
maven {
|
|
||||||
url 'https://cursemaven.com'
|
|
||||||
content {
|
|
||||||
includeGroup 'curse.maven'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
+19
-6
@@ -1,10 +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 {
|
plugins {
|
||||||
id 'com.diffplug.blowdryerSetup' version '1.6.0'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.24'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.diffplug.blowdryerSetup'
|
|
||||||
|
|
||||||
blowdryerSetup {
|
|
||||||
github('GTNewHorizons/ExampleMod1.7.10', 'tag', '0.1.5')
|
|
||||||
//devLocal '.' // Use this when testing config updates locally
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,7 @@ 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,12 +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,27 +5,26 @@ 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
|
||||||
* @param biome Biome information for current coordinates
|
* @param biome Biome information for current coordinates
|
||||||
* @param sourceBlock ItemStack representing the block at current coordinates
|
* @param sourceBlock ItemStack representing the block at current coordinates
|
||||||
* @param x Current X coordinate to attempt a transmute
|
* @param x Current X coordinate to attempt a transmute
|
||||||
* @param y Current Y coordinate to attempt a transmute
|
* @param y Current Y coordinate to attempt a transmute
|
||||||
* @param z Current Z coordinate to attempt a transmute
|
* @param z Current Z coordinate to attempt a transmute
|
||||||
* @return true if a block was changed.
|
* @return true if a block was changed.
|
||||||
*/
|
*/
|
||||||
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);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.potion.Potion;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||||
@@ -37,7 +39,6 @@ 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;
|
||||||
|
|
||||||
public class Allele implements IAllele {
|
public class Allele implements IAllele {
|
||||||
@@ -120,50 +121,35 @@ public class Allele implements IAllele {
|
|||||||
effectSlowSpeed = new AlleleEffectPotion("SlowSpeed", Potion.moveSlowdown, 3, false).setMalicious();
|
effectSlowSpeed = new AlleleEffectPotion("SlowSpeed", Potion.moveSlowdown, 3, false).setMalicious();
|
||||||
effectWithering = new AlleleEffectPotion("Withering", Potion.wither, 10, false).setMalicious();
|
effectWithering = new AlleleEffectPotion("Withering", Potion.wither, 10, false).setMalicious();
|
||||||
|
|
||||||
TransmutationEffectController controller =
|
TransmutationEffectController controller = new TransmutationEffectController(
|
||||||
new TransmutationEffectController(new TransmutationEffectRailcraft(), new TransmutationEffectVanilla());
|
new TransmutationEffectRailcraft(),
|
||||||
|
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);
|
||||||
@@ -172,27 +158,32 @@ 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 =
|
effectNodeConversionTaint = new AlleleEffectNodeConversion(
|
||||||
new AlleleEffectNodeConversion(EFFECT_NODE_TAINTING, NodeType.TAINTED, false, 250);
|
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 =
|
effectNodeConversionHungry = new AlleleEffectNodeConversion(
|
||||||
new AlleleEffectNodeConversion(EFFECT_NODE_RAVENING, NodeType.HUNGRY, false, 2);
|
EFFECT_NODE_RAVENING,
|
||||||
|
NodeType.HUNGRY,
|
||||||
|
false,
|
||||||
|
2);
|
||||||
|
|
||||||
spawnBrainyZombie = new AlleleEffectSpawnMob(
|
spawnBrainyZombie = new AlleleEffectSpawnMob(
|
||||||
EFFECT_BRAINY, false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID)
|
EFFECT_BRAINY,
|
||||||
.setAggrosPlayerOnSpawn()
|
false,
|
||||||
.setThrottle(800)
|
ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID).setAggrosPlayerOnSpawn().setThrottle(800)
|
||||||
.setSpawnsOnPlayerNear(null)
|
.setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||||
.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(
|
spawnWisp = new AlleleEffectSpawnWisp(
|
||||||
EFFECT_WISPY, false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive")
|
EFFECT_WISPY,
|
||||||
.setThrottle(1800)
|
false,
|
||||||
.setChanceToSpawn(79);
|
ThaumcraftHelper.Entity.WISP.entityID,
|
||||||
|
"thaumcraft.wisplive").setThrottle(1800).setChanceToSpawn(79);
|
||||||
} else {
|
} else {
|
||||||
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, "Bat").setThrottle(150);
|
spawnBats = new AlleleEffectSpawnMob(EFFECT_BATTY, false, "Bat").setThrottle(150);
|
||||||
|
|
||||||
@@ -226,15 +217,15 @@ public class Allele implements IAllele {
|
|||||||
EFFECT_MANA_DRAIN,
|
EFFECT_MANA_DRAIN,
|
||||||
true,
|
true,
|
||||||
20,
|
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(
|
spawnWispOrHecate = new AlleleEffectSpawnMobWeighted(
|
||||||
EFFECT_AM_WISP,
|
EFFECT_AM_WISP,
|
||||||
true,
|
true,
|
||||||
20,
|
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);
|
||||||
@@ -244,26 +235,20 @@ public class Allele implements IAllele {
|
|||||||
// TODO TE spawning
|
// TODO TE spawning
|
||||||
if (ThermalModsHelper.isActive()) {
|
if (ThermalModsHelper.isActive()) {
|
||||||
spawnBlizz = new AlleleEffectSpawnMob(
|
spawnBlizz = new AlleleEffectSpawnMob(
|
||||||
EFFECT_TE_BLIZZY,
|
EFFECT_TE_BLIZZY,
|
||||||
true,
|
true,
|
||||||
ThermalModsHelper.Entity.BLIZZ.entityID,
|
ThermalModsHelper.Entity.BLIZZ.entityID,
|
||||||
ThermalModsHelper.Entity.BLIZZ.soundName)
|
ThermalModsHelper.Entity.BLIZZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||||
.setThrottle(100)
|
|
||||||
.setChanceToSpawn(80);
|
|
||||||
spawnBlitz = new AlleleEffectSpawnMob(
|
spawnBlitz = new AlleleEffectSpawnMob(
|
||||||
EFFECT_TE_BLITZ,
|
EFFECT_TE_BLITZ,
|
||||||
true,
|
true,
|
||||||
ThermalModsHelper.Entity.BLITZ.entityID,
|
ThermalModsHelper.Entity.BLITZ.entityID,
|
||||||
ThermalModsHelper.Entity.BLITZ.soundName)
|
ThermalModsHelper.Entity.BLITZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||||
.setThrottle(100)
|
|
||||||
.setChanceToSpawn(80);
|
|
||||||
spawnBasalz = new AlleleEffectSpawnMob(
|
spawnBasalz = new AlleleEffectSpawnMob(
|
||||||
EFFECT_TE_BASALZ,
|
EFFECT_TE_BASALZ,
|
||||||
true,
|
true,
|
||||||
ThermalModsHelper.Entity.BASALZ.entityID,
|
ThermalModsHelper.Entity.BASALZ.entityID,
|
||||||
ThermalModsHelper.Entity.BASALZ.soundName)
|
ThermalModsHelper.Entity.BASALZ.soundName).setThrottle(100).setChanceToSpawn(80);
|
||||||
.setThrottle(100)
|
|
||||||
.setChanceToSpawn(80);
|
|
||||||
} else {
|
} 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);
|
||||||
@@ -279,23 +264,24 @@ public class Allele implements IAllele {
|
|||||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", effectNodeConversionTaint);
|
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeFlux", effectNodeConversionTaint);
|
||||||
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", effectNodeEmpower);
|
registry.registerDeprecatedAlleleReplacement("magicbees.effectNodeCharge", effectNodeEmpower);
|
||||||
registry.registerDeprecatedAlleleReplacement(
|
registry.registerDeprecatedAlleleReplacement(
|
||||||
"magicbees.speciesTCAttractive", BeeSpecies.TC_EMPOWERING.getSpecies());
|
"magicbees.speciesTCAttractive",
|
||||||
|
BeeSpecies.TC_EMPOWERING.getSpecies());
|
||||||
registry.registerDeprecatedAlleleReplacement(
|
registry.registerDeprecatedAlleleReplacement(
|
||||||
"magicbees.speciesBMBloodyBMBloody", BeeSpecies.EARTHY.getSpecies());
|
"magicbees.speciesBMBloodyBMBloody",
|
||||||
|
BeeSpecies.EARTHY.getSpecies());
|
||||||
registry.registerDeprecatedAlleleReplacement(
|
registry.registerDeprecatedAlleleReplacement(
|
||||||
"magicbees.speciesBMBloodyBMBound", BeeSpecies.ARCANE.getSpecies());
|
"magicbees.speciesBMBloodyBMBound",
|
||||||
|
BeeSpecies.ARCANE.getSpecies());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IAlleleBeeSpecies getBaseSpecies(String name) {
|
public static IAlleleBeeSpecies getBaseSpecies(String name) {
|
||||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele(
|
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry
|
||||||
(new StringBuilder()).append("forestry.species").append(name).toString());
|
.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())
|
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry
|
||||||
.append("extrabees.species.")
|
.getAllele((new StringBuilder()).append("extrabees.species.").append(name.toLowerCase()).toString());
|
||||||
.append(name.toLowerCase())
|
|
||||||
.toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IAllele getBaseAllele(String name) {
|
public static IAllele getBaseAllele(String name) {
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
|
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
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 java.util.List;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@@ -58,8 +61,8 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
protected <T extends Entity> List<T> getEntitiesWithinRange(
|
protected <T extends Entity> List<T> getEntitiesWithinRange(IBeeGenome genome, IBeeHousing housing,
|
||||||
IBeeGenome genome, IBeeHousing housing, Class<T> entityClass) {
|
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();
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ 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) {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ 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) {
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ 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;
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
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 java.util.ArrayList;
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
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"),
|
||||||
@@ -35,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;
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
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.ItemInterface;
|
||||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.nbt.NBTTagList;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -15,9 +16,10 @@ import net.minecraft.nbt.NBTTagList;
|
|||||||
* @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");
|
||||||
@@ -716,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();
|
||||||
|
|
||||||
@@ -843,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();
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeIconColourProvider;
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
|
|
||||||
|
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) {
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
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 java.util.Locale;
|
|
||||||
import magicbees.main.CommonProxy;
|
import magicbees.main.CommonProxy;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
|
|
||||||
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/");
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
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;
|
||||||
@@ -7,22 +14,17 @@ 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 java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
import magicbees.block.types.HiveType;
|
import magicbees.block.types.HiveType;
|
||||||
import magicbees.item.types.DropType;
|
import magicbees.item.types.DropType;
|
||||||
import magicbees.main.Config;
|
import magicbees.main.Config;
|
||||||
import magicbees.main.utils.Tuple;
|
import magicbees.main.utils.Tuple;
|
||||||
import magicbees.main.utils.compat.ExtraBeesHelper;
|
import magicbees.main.utils.compat.ExtraBeesHelper;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
public class BeeManager {
|
public class BeeManager {
|
||||||
|
|
||||||
public static IBeeRoot beeRoot;
|
public static IBeeRoot beeRoot;
|
||||||
|
|
||||||
private static List<Tuple<IAlleleBeeSpecies, Double>> worldgenSpeciesWeights =
|
private static List<Tuple<IAlleleBeeSpecies, Double>> worldgenSpeciesWeights = new ArrayList<Tuple<IAlleleBeeSpecies, Double>>();
|
||||||
new ArrayList<Tuple<IAlleleBeeSpecies, Double>>();
|
|
||||||
private static double worldgenSpeciesWeightsTotal = 0;
|
private static double worldgenSpeciesWeightsTotal = 0;
|
||||||
|
|
||||||
public static void getBeeRoot() {
|
public static void getBeeRoot() {
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1,7 +1,137 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
import static magicbees.bees.BeeSpecies.*;
|
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;
|
||||||
@@ -19,10 +149,6 @@ 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 net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
public class BeeProductHelper {
|
public class BeeProductHelper {
|
||||||
|
|
||||||
@@ -40,8 +166,7 @@ public class BeeProductHelper {
|
|||||||
|
|
||||||
CHARMED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.18f);
|
CHARMED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.18f);
|
||||||
ENCHANTED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.20f);
|
ENCHANTED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.20f);
|
||||||
SUPERNATURAL
|
SUPERNATURAL.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.25f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.25f)
|
|
||||||
.addSpecialty(Config.pollen.getStackForType(PollenType.UNUSUAL), 0.08f);
|
.addSpecialty(Config.pollen.getStackForType(PollenType.UNUSUAL), 0.08f);
|
||||||
|
|
||||||
ETHEREAL.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
ETHEREAL.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
||||||
@@ -67,33 +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.20f);
|
.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);
|
||||||
|
|
||||||
@@ -129,13 +248,11 @@ public class BeeProductHelper {
|
|||||||
|
|
||||||
MUTABLE.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.30f)
|
MUTABLE.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.30f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.10f);
|
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.10f);
|
||||||
TRANSMUTING
|
TRANSMUTING.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
||||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.30f)
|
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.30f)
|
||||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 0.05f)
|
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 0.05f)
|
||||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SIMMERING.ordinal()), 0.05f);
|
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.SIMMERING.ordinal()), 0.05f);
|
||||||
CRUMBLING
|
CRUMBLING.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
||||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.PARCHED.ordinal()), 0.10f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.30f)
|
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.30f)
|
||||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.POWDERY.ordinal()), 0.10f)
|
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.POWDERY.ordinal()), 0.10f)
|
||||||
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.COCOA.ordinal()), 0.15f);
|
.addProduct(new ItemStack(ForestryHelper.beeComb, 1, ForestryHelper.Comb.COCOA.ordinal()), 0.15f);
|
||||||
@@ -144,20 +261,26 @@ public class BeeProductHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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),
|
||||||
|
0.16f);
|
||||||
} else {
|
} 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),
|
||||||
|
0.17f);
|
||||||
} else {
|
} 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);
|
||||||
@@ -166,77 +289,80 @@ public class BeeProductHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TE_PLATINUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
TE_PLATINUM.addProduct(ForestryHelper.itemHoneycomb, 0.10f);
|
||||||
if (OreDictionary.getOres("nuggetPlatinum").size() > 0
|
if (OreDictionary.getOres("nuggetPlatinum").size() > 0) {
|
||||||
&& OreDictionary.getOres("ingotPlatinum").size() > 0) {
|
TE_PLATINUM.addSpecialty(
|
||||||
TE_PLATINUM.addSpecialty(OreDictionary.getOres("nuggetPlatinum").get(0), 0.18f);
|
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
|
if (OreDictionary.getOres("nuggetNickel").size() > 0) {
|
||||||
&& OreDictionary.getOres("ingotNickel").size() > 0) {
|
TE_NICKEL.addSpecialty(
|
||||||
TE_NICKEL.addSpecialty(OreDictionary.getOres("nuggetNickel").get(0), 0.18f);
|
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
|
if (OreDictionary.getOres("nuggetBronze").size() > 0) {
|
||||||
&& OreDictionary.getOres("ingotBronze").size() > 0) {
|
TE_BRONZE.addSpecialty(
|
||||||
TE_BRONZE.addSpecialty(OreDictionary.getOres("nuggetBronze").get(0), 0.18f);
|
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
|
if (OreDictionary.getOres("nuggetInvar").size() > 0) {
|
||||||
&& OreDictionary.getOres("ingotInvar").size() > 0) {
|
TE_INVAR.addSpecialty(
|
||||||
TE_INVAR.addSpecialty(OreDictionary.getOres("nuggetInvar").get(0), 0.18f);
|
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
|
if (OreDictionary.getOres("nuggetElectrum").size() > 0) {
|
||||||
&& OreDictionary.getOres("ingotElectrum").size() > 0) {
|
TE_ELECTRUM.addSpecialty(
|
||||||
TE_ELECTRUM.addSpecialty(OreDictionary.getOres("nuggetElectrum").get(0), 0.18f);
|
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);
|
||||||
@@ -245,8 +371,8 @@ public class BeeProductHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
}
|
}
|
||||||
@@ -271,14 +397,17 @@ public class BeeProductHelper {
|
|||||||
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(
|
TC_EMPOWERING.addSpecialty(
|
||||||
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 0.02f);
|
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(
|
TC_NEXUS.addSpecialty(
|
||||||
new ItemStack(ForestryHelper.pollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 0.02f);
|
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(
|
TC_TAINT.addProduct(
|
||||||
new ItemStack(ForestryHelper.craftingResource, 1, ForestryHelper.Propolis.STICKY.ordinal()), 0.213f);
|
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);
|
||||||
@@ -340,29 +469,42 @@ public class BeeProductHelper {
|
|||||||
if (ArsMagicaHelper.isActive()) {
|
if (ArsMagicaHelper.isActive()) {
|
||||||
AM_QUINTESSENCE.addSpecialty(
|
AM_QUINTESSENCE.addSpecialty(
|
||||||
new ItemStack(
|
new ItemStack(
|
||||||
ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
ArsMagicaHelper.itemResource,
|
||||||
|
1,
|
||||||
|
ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||||
0.05f);
|
0.05f);
|
||||||
AM_EARTH.addSpecialty(
|
AM_EARTH.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||||
|
0.07f);
|
||||||
AM_AIR.addSpecialty(
|
AM_AIR.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.AIR.ordinal()),
|
||||||
|
0.07f);
|
||||||
AM_FIRE.addSpecialty(
|
AM_FIRE.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.FIRE.ordinal()),
|
||||||
|
0.07f);
|
||||||
AM_WATER.addSpecialty(
|
AM_WATER.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.WATER.ordinal()),
|
||||||
|
0.07f);
|
||||||
AM_LIGHTNING.addSpecialty(
|
AM_LIGHTNING.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.LIGHTNING.ordinal()),
|
||||||
|
0.07f);
|
||||||
AM_PLANT.addSpecialty(
|
AM_PLANT.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.PLANT.ordinal()),
|
||||||
|
0.07f);
|
||||||
AM_ICE.addSpecialty(
|
AM_ICE.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()), 0.07f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ICE.ordinal()),
|
||||||
|
0.07f);
|
||||||
AM_ARCANE.addSpecialty(
|
AM_ARCANE.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()), 0.11f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.ARCANE.ordinal()),
|
||||||
|
0.11f);
|
||||||
AM_VORTEX.addSpecialty(
|
AM_VORTEX.addSpecialty(
|
||||||
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()), 0.15f);
|
new ItemStack(ArsMagicaHelper.essence, 1, ArsMagicaHelper.EssenceType.EARTH.ordinal()),
|
||||||
|
0.15f);
|
||||||
AM_WIGHT.addSpecialty(
|
AM_WIGHT.addSpecialty(
|
||||||
new ItemStack(
|
new ItemStack(
|
||||||
ArsMagicaHelper.itemResource, 1, ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
ArsMagicaHelper.itemResource,
|
||||||
|
1,
|
||||||
|
ArsMagicaHelper.ResourceType.ARCANE_COMPOUND.ordinal()),
|
||||||
0.11f);
|
0.11f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -374,15 +516,13 @@ public class BeeProductHelper {
|
|||||||
TE_PYRO.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
TE_PYRO.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_powder), 0.05f);
|
.addSpecialty(new ItemStack(Items.blaze_powder), 0.05f);
|
||||||
TE_DESTABILIZED
|
TE_DESTABILIZED.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
||||||
.addSpecialty(new ItemStack(Items.redstone), 0.05f);
|
.addSpecialty(new ItemStack(Items.redstone), 0.05f);
|
||||||
TE_LUX.addProduct(Config.combs.getStackForType(CombType.TE_LUX), 0.10f)
|
TE_LUX.addProduct(Config.combs.getStackForType(CombType.TE_LUX), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f)
|
||||||
.addSpecialty(new ItemStack(Items.glowstone_dust), 0.05f);
|
.addSpecialty(new ItemStack(Items.glowstone_dust), 0.05f);
|
||||||
TE_WINSOME
|
TE_WINSOME.addProduct(Config.combs.getStackForType(CombType.FURTIVE), 0.10f)
|
||||||
.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
|
TE_ENDEARING
|
||||||
@@ -398,11 +538,9 @@ public class BeeProductHelper {
|
|||||||
TE_GROUNDED.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.16f);
|
TE_GROUNDED.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.16f);
|
||||||
TE_ROCKING.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.29f);
|
TE_ROCKING.addProduct(Config.combs.getStackForType(CombType.EARTHY), 0.29f);
|
||||||
|
|
||||||
TE_SIGNALUS
|
TE_SIGNALUS.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TE_DESTABILIZED), 0.10f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f);
|
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f);
|
||||||
TE_LUMIUS
|
TE_LUMIUS.addProduct(Config.combs.getStackForType(CombType.TE_LUX), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TE_LUX), 0.10f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f);
|
.addProduct(Config.combs.getStackForType(CombType.OCCULT), 0.10f);
|
||||||
|
|
||||||
if (ThermalModsHelper.isActive()) {
|
if (ThermalModsHelper.isActive()) {
|
||||||
@@ -432,26 +570,19 @@ public class BeeProductHelper {
|
|||||||
|
|
||||||
public static void initBotaniaProducts() {
|
public static void initBotaniaProducts() {
|
||||||
BOT_ROOTED.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.10f);
|
BOT_ROOTED.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.10f);
|
||||||
BOT_BOTANIC
|
BOT_BOTANIC.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.10f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.10f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
||||||
BOT_BLOSSOM
|
BOT_BLOSSOM.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.20f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.20f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
.addProduct(Config.combs.getStackForType(CombType.TRANSMUTED), 0.05f);
|
||||||
BOT_FLORAL
|
BOT_FLORAL.addProduct(Config.combs.getStackForType(CombType.MUNDANE), 0.25f)
|
||||||
.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
|
BOT_VAZBEE.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.05f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.05f)
|
.addProduct(new ItemStack(Items.dye, 1, 9), 0.20f).addProduct(new ItemStack(Blocks.wool, 1, 9), 0.02f)
|
||||||
.addProduct(new ItemStack(Items.dye, 1, 9), 0.20f)
|
|
||||||
.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
|
BOT_SOMNOLENT.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.08f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.08f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.15f);
|
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.15f);
|
||||||
BOT_DREAMING
|
BOT_DREAMING.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.16f)
|
||||||
.addProduct(Config.combs.getStackForType(CombType.WATERY), 0.16f)
|
|
||||||
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.33f);
|
.addProduct(Config.combs.getStackForType(CombType.SOUL), 0.33f);
|
||||||
BOT_ALFHEIM.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.28f);
|
BOT_ALFHEIM.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 0.28f);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -1,14 +1,21 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.biome.BiomeGenBase;
|
||||||
|
import net.minecraftforge.common.BiomeDictionary;
|
||||||
|
|
||||||
import forestry.api.apiculture.hives.HiveManager;
|
import forestry.api.apiculture.hives.HiveManager;
|
||||||
import forestry.api.apiculture.hives.IHiveDescription;
|
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 java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Random;
|
|
||||||
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;
|
||||||
@@ -17,47 +24,20 @@ import magicbees.world.feature.FeatureOreVein;
|
|||||||
import magicbees.world.feature.HiveGenNether;
|
import magicbees.world.feature.HiveGenNether;
|
||||||
import magicbees.world.feature.HiveGenOblivion;
|
import magicbees.world.feature.HiveGenOblivion;
|
||||||
import magicbees.world.feature.HiveGenUnderground;
|
import magicbees.world.feature.HiveGenUnderground;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
import net.minecraftforge.common.BiomeDictionary;
|
|
||||||
|
|
||||||
public enum HiveDescription implements IHiveDescription {
|
public enum HiveDescription implements IHiveDescription {
|
||||||
CURIOUS(
|
|
||||||
HiveType.CURIOUS,
|
CURIOUS(HiveType.CURIOUS, 3.0f, HiveManager.genHelper.tree(), false, BiomeDictionary.Type.FOREST,
|
||||||
3.0f,
|
BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.HILLS),
|
||||||
HiveManager.genHelper.tree(),
|
UNUSUAL(HiveType.UNUSUAL, 1.0f, HiveManager.genHelper.ground(Blocks.dirt, Blocks.grass), false,
|
||||||
false,
|
BiomeDictionary.Type.PLAINS, BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.HILLS,
|
||||||
BiomeDictionary.Type.FOREST,
|
|
||||||
BiomeDictionary.Type.PLAINS,
|
|
||||||
BiomeDictionary.Type.HILLS),
|
|
||||||
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.RIVER),
|
||||||
RESONANT(
|
RESONANT(HiveType.RESONANT, 0.9f, HiveManager.genHelper.ground(Blocks.sand, Blocks.sandstone), false,
|
||||||
HiveType.RESONANT,
|
BiomeDictionary.Type.SANDY, BiomeDictionary.Type.MESA, BiomeDictionary.Type.HOT,
|
||||||
0.9f,
|
|
||||||
HiveManager.genHelper.ground(Blocks.sand, Blocks.sandstone),
|
|
||||||
false,
|
|
||||||
BiomeDictionary.Type.SANDY,
|
|
||||||
BiomeDictionary.Type.MESA,
|
|
||||||
BiomeDictionary.Type.HOT,
|
|
||||||
BiomeDictionary.Type.MAGICAL),
|
BiomeDictionary.Type.MAGICAL),
|
||||||
DEEP(
|
DEEP(HiveType.DEEP, 5.0f, new HiveGenUnderground(10, 15, 5), true, BiomeDictionary.Type.HILLS,
|
||||||
HiveType.DEEP,
|
BiomeDictionary.Type.MOUNTAIN, BiomeDictionary.Type.MAGICAL) {
|
||||||
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);
|
||||||
@@ -71,6 +51,7 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
INFERNAL(HiveType.INFERNAL, 50.0f, new HiveGenNether(0, 175, 6), true, BiomeDictionary.Type.NETHER) {
|
INFERNAL(HiveType.INFERNAL, 50.0f, new HiveGenNether(0, 175, 6), true, 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);
|
||||||
@@ -83,13 +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(
|
INFERNAL_OVERWORLD(HiveType.INFERNAL, 0.95f, new HiveGenUnderground(5, 13, 6), true, BiomeDictionary.Type.MAGICAL,
|
||||||
HiveType.INFERNAL,
|
|
||||||
0.95f,
|
|
||||||
new HiveGenUnderground(5, 13, 6),
|
|
||||||
true,
|
|
||||||
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);
|
||||||
@@ -110,6 +87,7 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
OBLIVION(HiveType.OBLIVION, 20.0f, new HiveGenOblivion(), true, BiomeDictionary.Type.END) {
|
OBLIVION(HiveType.OBLIVION, 20.0f, new HiveGenOblivion(), true, 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);
|
||||||
@@ -120,13 +98,9 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
OBLIVION_OVERWORLD(
|
OBLIVION_OVERWORLD(HiveType.OBLIVION, 0.87f, new HiveGenUnderground(5, 5, 5), true, BiomeDictionary.Type.MAGICAL,
|
||||||
HiveType.OBLIVION,
|
|
||||||
0.87f,
|
|
||||||
new HiveGenUnderground(5, 5, 5),
|
|
||||||
true,
|
|
||||||
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);
|
||||||
@@ -149,11 +123,7 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
private final IHiveGen hiveGen;
|
private final IHiveGen hiveGen;
|
||||||
private final boolean spawnsIgnoreClimate;
|
private final boolean spawnsIgnoreClimate;
|
||||||
|
|
||||||
private HiveDescription(
|
private HiveDescription(HiveType type, float chance, IHiveGen genType, boolean ignoreClimate,
|
||||||
HiveType type,
|
|
||||||
float chance,
|
|
||||||
IHiveGen genType,
|
|
||||||
boolean ignoreClimate,
|
|
||||||
BiomeDictionary.Type... goodBiomeTypes) {
|
BiomeDictionary.Type... goodBiomeTypes) {
|
||||||
hiveType = type;
|
hiveType = type;
|
||||||
genChance = chance;
|
genChance = chance;
|
||||||
@@ -209,8 +179,9 @@ public enum HiveDescription implements IHiveDescription {
|
|||||||
@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().toLowerCase(Locale.ENGLISH) + " hive at: X " + x + ", Y: " + y
|
LogHelper.info(
|
||||||
+ ", Z: " + z);
|
"Spawned " + this.toString()
|
||||||
|
.toLowerCase(Locale.ENGLISH) + " hive at: X " + x + ", Y: " + y + ", Z: " + z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,18 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
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;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
@@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.core.IClimateProvider;
|
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;
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
// 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;
|
||||||
@@ -27,16 +29,8 @@ public class MoonPhaseMutationBonus implements IMutationCondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getChance(
|
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
|
||||||
World world,
|
IGenome genome1, IClimateProvider climate) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
package magicbees.bees;
|
package magicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.core.IClimateProvider;
|
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;
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@@ -23,16 +25,8 @@ public class MoonPhaseMutationRestriction implements IMutationCondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getChance(
|
public float getChance(World world, int x, int y, int z, IAllele allele0, IAllele allele1, IGenome genome0,
|
||||||
World world,
|
IGenome genome1, IClimateProvider climate) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
|
||||||
import forestry.api.genetics.IEffectData;
|
|
||||||
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;
|
||||||
@@ -14,7 +9,15 @@ 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.IBeeHousing;
|
||||||
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
|
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) {
|
||||||
@@ -56,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) {
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Items;
|
||||||
|
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 java.util.List;
|
|
||||||
import magicbees.bees.AlleleEffect;
|
import magicbees.bees.AlleleEffect;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
public class AlleleEffectCure extends AlleleEffect {
|
public class AlleleEffectCure extends AlleleEffect {
|
||||||
|
|
||||||
|
|||||||
@@ -3,22 +3,24 @@ package magicbees.bees.allele.effect;
|
|||||||
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.getWeightedRandomAspect;
|
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.getWeightedRandomAspect;
|
||||||
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.updateNode;
|
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.updateNode;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.chunk.Chunk;
|
||||||
|
|
||||||
import forestry.api.apiculture.IAlleleBeeAcceleratableEffect;
|
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 java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
import magicbees.bees.AlleleEffect;
|
import magicbees.bees.AlleleEffect;
|
||||||
import magicbees.bees.BeeManager;
|
import magicbees.bees.BeeManager;
|
||||||
import magicbees.main.Config;
|
import magicbees.main.Config;
|
||||||
import magicbees.main.utils.BlockUtil;
|
import magicbees.main.utils.BlockUtil;
|
||||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.chunk.Chunk;
|
|
||||||
import thaumcraft.api.aspects.Aspect;
|
import thaumcraft.api.aspects.Aspect;
|
||||||
import thaumcraft.api.aspects.AspectList;
|
import thaumcraft.api.aspects.AspectList;
|
||||||
import thaumcraft.api.nodes.INode;
|
import thaumcraft.api.nodes.INode;
|
||||||
@@ -43,8 +45,8 @@ public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAc
|
|||||||
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 =
|
int range = Math
|
||||||
Math.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
.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)) {
|
||||||
@@ -60,8 +62,8 @@ public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAc
|
|||||||
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 =
|
int range = Math
|
||||||
Math.max((int) Math.ceil(genome.getTerritory()[0] * beeModifier.getTerritoryModifier(genome, 1f)), 1);
|
.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);
|
||||||
|
|
||||||
int idid = (int) did;
|
int idid = (int) did;
|
||||||
@@ -92,6 +94,8 @@ public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAc
|
|||||||
if (world.rand.nextInt(randBase) < 120) {
|
if (world.rand.nextInt(randBase) < 120) {
|
||||||
Aspect aspectToAdd;
|
Aspect aspectToAdd;
|
||||||
int rollAttempts = 0;
|
int rollAttempts = 0;
|
||||||
|
short amount = (short) Math
|
||||||
|
.min((int) did + world.rand.nextInt((int) (2f * did)), Config.thaumcraftNodeMaxSize);
|
||||||
do {
|
do {
|
||||||
aspectToAdd = getWeightedRandomAspect(world.rand);
|
aspectToAdd = getWeightedRandomAspect(world.rand);
|
||||||
++rollAttempts;
|
++rollAttempts;
|
||||||
@@ -101,7 +105,8 @@ public class AlleleEffectEmpowering extends AlleleEffect implements IAlleleBeeAc
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
short amount = (short) ((int) did + world.rand.nextInt((int) (2f * did)));
|
amount = (short) Math.min(Config.thaumcraftNodeMaxSize - aspectsBase.getAmount(aspectToAdd), amount);
|
||||||
|
|
||||||
aspectsBase.add(aspectToAdd, amount);
|
aspectsBase.add(aspectToAdd, amount);
|
||||||
node.getAspects().add(aspectToAdd, amount);
|
node.getAspects().add(aspectToAdd, amount);
|
||||||
updateNode(node, world);
|
updateNode(node, world);
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
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;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
import java.util.List;
|
|
||||||
import magicbees.bees.AlleleEffect;
|
import magicbees.bees.AlleleEffect;
|
||||||
import magicbees.bees.BeeManager;
|
import magicbees.bees.BeeManager;
|
||||||
import magicbees.main.utils.BlockUtil;
|
import magicbees.main.utils.BlockUtil;
|
||||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.chunk.Chunk;
|
|
||||||
import thaumcraft.api.nodes.NodeType;
|
import thaumcraft.api.nodes.NodeType;
|
||||||
|
|
||||||
public class AlleleEffectNodeConversion extends AlleleEffect {
|
public class AlleleEffectNodeConversion extends AlleleEffect {
|
||||||
@@ -39,8 +41,8 @@ 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(
|
if (NodeHelper
|
||||||
chunks, world, coords.posX, coords.posY, coords.posZ, range, targetType)) {
|
.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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
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;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
import java.util.List;
|
|
||||||
import magicbees.bees.AlleleEffect;
|
import magicbees.bees.AlleleEffect;
|
||||||
import magicbees.bees.BeeManager;
|
import magicbees.bees.BeeManager;
|
||||||
import magicbees.main.utils.BlockUtil;
|
import magicbees.main.utils.BlockUtil;
|
||||||
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
import magicbees.main.utils.compat.thaumcraft.NodeHelper;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.chunk.Chunk;
|
|
||||||
|
|
||||||
public class AlleleEffectNodeRepair extends AlleleEffect {
|
public class AlleleEffectNodeRepair extends AlleleEffect {
|
||||||
|
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import forestry.api.apiculture.BeeManager;
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
|
||||||
import forestry.api.genetics.IEffectData;
|
|
||||||
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;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.BeeManager;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
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,19 +1,31 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import static magicbees.main.utils.compat.thaumcraft.NodeHelper.updateNode;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
import java.util.ArrayList;
|
||||||
import forestry.api.genetics.IEffectData;
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import magicbees.bees.AlleleEffect;
|
import java.util.Map;
|
||||||
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;
|
||||||
|
|
||||||
public class AlleleEffectRecharge extends AlleleEffect {
|
import forestry.api.apiculture.IAlleleBeeAcceleratableEffect;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
|
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 implements IAlleleBeeAcceleratableEffect {
|
||||||
|
|
||||||
public AlleleEffectRecharge(String id, boolean isDominant) {
|
public AlleleEffectRecharge(String id, boolean isDominant) {
|
||||||
super(id, isDominant, 20);
|
super(id, isDominant, 20);
|
||||||
@@ -22,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;
|
||||||
@@ -42,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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,7 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
|
||||||
import forestry.api.apiculture.IBeeModifier;
|
|
||||||
import forestry.api.genetics.IEffectData;
|
|
||||||
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;
|
||||||
@@ -15,7 +10,15 @@ 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.IBeeHousing;
|
||||||
|
import forestry.api.apiculture.IBeeModifier;
|
||||||
|
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;
|
||||||
@@ -111,8 +114,8 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean spawnMob(
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing,
|
||||||
IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate) {
|
boolean spawnAlternate) {
|
||||||
boolean spawnedFlag = false;
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
EntityLiving mob;
|
EntityLiving mob;
|
||||||
@@ -126,15 +129,14 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
|||||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||||
|
|
||||||
int entitiesCount = world.getEntitiesWithinAABB(
|
int entitiesCount = world.getEntitiesWithinAABB(
|
||||||
mob.getClass(),
|
mob.getClass(),
|
||||||
AxisAlignedBB.getBoundingBox(
|
AxisAlignedBB.getBoundingBox(
|
||||||
(int) pos[0],
|
(int) pos[0],
|
||||||
(int) pos[1],
|
(int) pos[1],
|
||||||
(int) pos[2],
|
(int) pos[2],
|
||||||
(int) pos[0] + 1,
|
(int) pos[0] + 1,
|
||||||
(int) pos[1] + 1,
|
(int) pos[1] + 1,
|
||||||
(int) pos[2] + 1)
|
(int) pos[2] + 1).expand(8.0D, 4.0D, 8.0D))
|
||||||
.expand(8.0D, 4.0D, 8.0D))
|
|
||||||
.size();
|
.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);
|
||||||
@@ -142,9 +144,8 @@ public class AlleleEffectSpawnMob extends AlleleEffect {
|
|||||||
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(
|
if (forestry.api.apiculture.BeeManager.armorApiaristHelper
|
||||||
(EntityLivingBase) player, getUID(), true)
|
.wearsItems((EntityLivingBase) player, getUID(), true) < 4) {
|
||||||
< 4) {
|
|
||||||
// Protect fully suited player from initial murder intent.
|
// Protect fully suited player from initial murder intent.
|
||||||
mob.setAttackTarget(player);
|
mob.setAttackTarget(player);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityList;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
|
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.AlleleEffect;
|
||||||
import magicbees.bees.BeeManager;
|
import magicbees.bees.BeeManager;
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.EntityList;
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class AlleleEffectSpawnMobWeighted extends AlleleEffect {
|
public class AlleleEffectSpawnMobWeighted extends AlleleEffect {
|
||||||
|
|
||||||
private String[] entityNames;
|
private String[] entityNames;
|
||||||
private int[] spawnChance;
|
private int[] spawnChance;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import forestry.api.apiculture.BeeManager;
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
|
||||||
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;
|
||||||
@@ -12,20 +9,23 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.BeeManager;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
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, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31,
|
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 };
|
||||||
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(
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing,
|
||||||
IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate) {
|
boolean spawnAlternate) {
|
||||||
boolean spawnedFlag = false;
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
EntityLiving mob;
|
EntityLiving mob;
|
||||||
@@ -39,15 +39,14 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
|||||||
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||||
|
|
||||||
int entitiesCount = world.getEntitiesWithinAABB(
|
int entitiesCount = world.getEntitiesWithinAABB(
|
||||||
mob.getClass(),
|
mob.getClass(),
|
||||||
AxisAlignedBB.getBoundingBox(
|
AxisAlignedBB.getBoundingBox(
|
||||||
(int) pos[0],
|
(int) pos[0],
|
||||||
(int) pos[1],
|
(int) pos[1],
|
||||||
(int) pos[2],
|
(int) pos[2],
|
||||||
(int) pos[0] + 1,
|
(int) pos[0] + 1,
|
||||||
(int) pos[1] + 1,
|
(int) pos[1] + 1,
|
||||||
(int) pos[2] + 1)
|
(int) pos[2] + 1).expand(8.0D, 4.0D, 8.0D))
|
||||||
.expand(8.0D, 4.0D, 8.0D))
|
|
||||||
.size();
|
.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);
|
||||||
@@ -60,8 +59,7 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob {
|
|||||||
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
|
* Last time I had a request to post error messages, I regretted it.
|
||||||
* error messages, I regretted it.
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
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.AlleleEffect;
|
||||||
import magicbees.bees.BeeManager;
|
import magicbees.bees.BeeManager;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.BiomeGenBase;
|
|
||||||
|
|
||||||
public class AlleleEffectTransmuting extends AlleleEffect {
|
public class AlleleEffectTransmuting extends AlleleEffect {
|
||||||
|
|
||||||
private TransmutationEffectController transmutationController;
|
private TransmutationEffectController transmutationController;
|
||||||
|
|
||||||
public AlleleEffectTransmuting(
|
public AlleleEffectTransmuting(String id, boolean isDominant, TransmutationEffectController effectController,
|
||||||
String id, boolean isDominant, TransmutationEffectController effectController, int timeoutBeeTicks) {
|
int timeoutBeeTicks) {
|
||||||
super(id, isDominant, timeoutBeeTicks);
|
super(id, isDominant, timeoutBeeTicks);
|
||||||
this.transmutationController = effectController;
|
this.transmutationController = effectController;
|
||||||
}
|
}
|
||||||
@@ -36,20 +37,26 @@ 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(
|
transmutationController.attemptTransmutations(
|
||||||
world,
|
world,
|
||||||
biome,
|
biome,
|
||||||
new ItemStack(
|
new ItemStack(
|
||||||
world.getBlock(xCoord, yCoord, zCoord), 1, world.getBlockMetadata(xCoord, yCoord, zCoord)),
|
world.getBlock(xCoord, yCoord, zCoord),
|
||||||
|
1,
|
||||||
|
world.getBlockMetadata(xCoord, yCoord, zCoord)),
|
||||||
xCoord,
|
xCoord,
|
||||||
yCoord,
|
yCoord,
|
||||||
zCoord);
|
zCoord);
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import forestry.api.genetics.IEffectData;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|||||||
@@ -3,14 +3,17 @@ package magicbees.bees.allele.effect;
|
|||||||
import java.util.ArrayList;
|
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) {
|
||||||
@@ -28,9 +31,10 @@ public class TransmutationEffectController implements ITransmutationEffectContro
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LogHelper.warn(String.format(
|
LogHelper.warn(
|
||||||
"Magic Bees encountered an issue with an ITransmutationEffectLogic provider %s. Debug information follows.",
|
String.format(
|
||||||
logic.getClass().getName()));
|
"Magic Bees encountered an issue with an ITransmutationEffectLogic provider %s. Debug information follows.",
|
||||||
|
logic.getClass().getName()));
|
||||||
LogHelper.info(e.getMessage());
|
LogHelper.info(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package magicbees.bees.allele.effect;
|
package magicbees.bees.allele.effect;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
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;
|
||||||
@@ -11,7 +10,11 @@ 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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
|
||||||
import forestry.api.apiculture.FlowerManager;
|
import forestry.api.apiculture.FlowerManager;
|
||||||
import forestry.api.genetics.IFlower;
|
import forestry.api.genetics.IFlower;
|
||||||
import forestry.api.genetics.IFlowerGrowthRule;
|
import forestry.api.genetics.IFlowerGrowthRule;
|
||||||
import forestry.api.genetics.IFlowerProvider;
|
import forestry.api.genetics.IFlowerProvider;
|
||||||
import java.util.Set;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
|
|
||||||
public abstract class FlowerProvider implements IFlowerProvider {
|
public abstract class FlowerProvider implements IFlowerProvider {
|
||||||
|
|
||||||
|
|||||||
+7
-6
@@ -1,5 +1,10 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.genetics.IFlowerGrowthHelper;
|
import forestry.api.genetics.IFlowerGrowthHelper;
|
||||||
import forestry.api.genetics.IFlowerGrowthRule;
|
import forestry.api.genetics.IFlowerGrowthRule;
|
||||||
import forestry.api.genetics.IFlowerRegistry;
|
import forestry.api.genetics.IFlowerRegistry;
|
||||||
@@ -7,10 +12,6 @@ import forestry.api.genetics.IIndividual;
|
|||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
import magicbees.main.utils.LocalizationManager;
|
import magicbees.main.utils.LocalizationManager;
|
||||||
import magicbees.main.utils.compat.ArsMagicaHelper;
|
import magicbees.main.utils.compat.ArsMagicaHelper;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFlowerGrowthRule {
|
public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFlowerGrowthRule {
|
||||||
|
|
||||||
@@ -56,8 +57,8 @@ public class FlowerProviderArsMagicaFlower extends FlowerProvider implements IFl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean growFlower(
|
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||||
IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
int z) {
|
||||||
return growFlower(world, x, y, z);
|
return growFlower(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
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.LocalizationManager;
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class FlowerProviderAuraNode extends FlowerProvider {
|
public class FlowerProviderAuraNode extends FlowerProvider {
|
||||||
|
|
||||||
@@ -45,8 +46,7 @@ public class FlowerProviderAuraNode extends FlowerProvider {
|
|||||||
if (stack.getItem() == itemStack.getItem() && stack.getItemDamage() == itemStack.getItemDamage()) {
|
if (stack.getItem() == itemStack.getItem() && stack.getItemDamage() == itemStack.getItemDamage()) {
|
||||||
if (stack.stackSize < stack.getItem().getItemStackLimit(stack)) {
|
if (stack.stackSize < stack.getItem().getItemStackLimit(stack)) {
|
||||||
stack.stackSize += itemStack.stackSize;
|
stack.stackSize += itemStack.stackSize;
|
||||||
itemStack.stackSize =
|
itemStack.stackSize = Math.max(stack.stackSize - stack.getItem().getItemStackLimit(stack), 0);
|
||||||
Math.max(stack.stackSize - stack.getItem().getItemStackLimit(stack), 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
import forestry.api.genetics.IIndividual;
|
|
||||||
import forestry.api.genetics.IPollinatable;
|
|
||||||
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.IPollinatable;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
|
||||||
public class FlowerProviderBookshelf extends FlowerProvider {
|
public class FlowerProviderBookshelf extends FlowerProvider {
|
||||||
|
|
||||||
public FlowerProviderBookshelf() {
|
public FlowerProviderBookshelf() {
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
import forestry.api.genetics.IFlowerGrowthHelper;
|
import forestry.api.genetics.IFlowerGrowthHelper;
|
||||||
import forestry.api.genetics.IFlowerGrowthRule;
|
import forestry.api.genetics.IFlowerGrowthRule;
|
||||||
import forestry.api.genetics.IFlowerRegistry;
|
import forestry.api.genetics.IFlowerRegistry;
|
||||||
@@ -7,9 +11,6 @@ import forestry.api.genetics.IIndividual;
|
|||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
import magicbees.main.utils.LocalizationManager;
|
import magicbees.main.utils.LocalizationManager;
|
||||||
import magicbees.main.utils.compat.BotaniaHelper;
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrowthRule {
|
public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrowthRule {
|
||||||
|
|
||||||
@@ -31,8 +32,8 @@ public class FlowerProviderBotania extends FlowerProvider implements IFlowerGrow
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean growFlower(
|
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||||
IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
int z) {
|
||||||
return growFlower(world, x, y, z);
|
return growFlower(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-6
@@ -1,5 +1,10 @@
|
|||||||
package magicbees.bees.allele.flowerProvider;
|
package magicbees.bees.allele.flowerProvider;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import forestry.api.genetics.IFlowerGrowthHelper;
|
import forestry.api.genetics.IFlowerGrowthHelper;
|
||||||
import forestry.api.genetics.IFlowerGrowthRule;
|
import forestry.api.genetics.IFlowerGrowthRule;
|
||||||
import forestry.api.genetics.IFlowerRegistry;
|
import forestry.api.genetics.IFlowerRegistry;
|
||||||
@@ -7,10 +12,6 @@ import forestry.api.genetics.IIndividual;
|
|||||||
import forestry.api.genetics.IPollinatable;
|
import forestry.api.genetics.IPollinatable;
|
||||||
import magicbees.main.utils.LocalizationManager;
|
import magicbees.main.utils.LocalizationManager;
|
||||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IFlowerGrowthRule {
|
public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IFlowerGrowthRule {
|
||||||
|
|
||||||
@@ -53,8 +54,8 @@ public class FlowerProviderThaumcraftFlower extends FlowerProvider implements IF
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean growFlower(
|
public boolean growFlower(IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y,
|
||||||
IFlowerRegistry fr, String flowerType, World world, IIndividual individual, int x, int y, int z) {
|
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,7 +11,16 @@ 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;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
public class BlockEffectJar extends BlockContainer {
|
public class BlockEffectJar extends BlockContainer {
|
||||||
|
|
||||||
public BlockEffectJar() {
|
public BlockEffectJar() {
|
||||||
super(Material.glass);
|
super(Material.glass);
|
||||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||||
@@ -29,12 +31,14 @@ public class BlockEffectJar extends BlockContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7,
|
||||||
World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
float par8, float par9) {
|
||||||
boolean activate = false;
|
boolean activate = false;
|
||||||
|
|
||||||
if (!player.isSneaking()) {
|
if (!player.isSneaking()) {
|
||||||
player.openGui(MagicBees.object, UIScreens.EFFECT_JAR.ordinal(), world, x, y, z);
|
if (!world.isRemote) {
|
||||||
|
player.openGui(MagicBees.object, UIScreens.EFFECT_JAR.ordinal(), world, x, y, z);
|
||||||
|
}
|
||||||
activate = true;
|
activate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
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;
|
||||||
@@ -14,6 +11,11 @@ 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.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
|
||||||
public class BlockEnchantedEarth extends Block {
|
public class BlockEnchantedEarth extends Block {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -26,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
|
||||||
@@ -53,8 +56,8 @@ public class BlockEnchantedEarth extends Block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canSustainPlant(
|
public boolean canSustainPlant(IBlockAccess world, int x, int y, int z, ForgeDirection direction,
|
||||||
IBlockAccess world, int x, int y, int z, ForgeDirection direction, IPlantable plantable) {
|
IPlantable plantable) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import forestry.api.core.Tabs;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
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;
|
||||||
@@ -18,7 +14,14 @@ 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 cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
|
import magicbees.block.types.HiveType;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
|
||||||
public class BlockHive extends Block {
|
public class BlockHive extends Block {
|
||||||
|
|
||||||
public BlockHive() {
|
public BlockHive() {
|
||||||
super(new MaterialHive());
|
super(new MaterialHive());
|
||||||
this.setLightLevel(0.8f);
|
this.setLightLevel(0.8f);
|
||||||
@@ -40,18 +43,18 @@ public class BlockHive extends Block {
|
|||||||
@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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@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()));
|
||||||
}
|
}
|
||||||
@@ -72,7 +75,7 @@ public class BlockHive extends Block {
|
|||||||
@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);
|
||||||
|
|||||||
@@ -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.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;
|
||||||
@@ -19,7 +12,16 @@ 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.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;
|
||||||
|
|
||||||
@@ -33,12 +35,14 @@ public class BlockMagicApiary extends BlockContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7,
|
||||||
World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) {
|
float par8, float par9) {
|
||||||
boolean activate = false;
|
boolean activate = false;
|
||||||
|
|
||||||
if (!player.isSneaking()) {
|
if (!player.isSneaking()) {
|
||||||
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
if (!world.isRemote) {
|
||||||
|
player.openGui(MagicBees.object, UIScreens.THAUMIC_APIARY.ordinal(), world, x, y, z);
|
||||||
|
}
|
||||||
activate = true;
|
activate = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
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;
|
||||||
@@ -13,6 +8,12 @@ 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.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 {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -1,10 +1,5 @@
|
|||||||
package magicbees.block;
|
package magicbees.block;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
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;
|
||||||
@@ -12,6 +7,12 @@ 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.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
import magicbees.tileentity.TileEntityVisAuraProvider;
|
||||||
|
|
||||||
public class BlockVisAuraProvider extends BlockContainer {
|
public class BlockVisAuraProvider extends BlockContainer {
|
||||||
|
|
||||||
public BlockVisAuraProvider() {
|
public BlockVisAuraProvider() {
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
package magicbees.block.types;
|
package magicbees.block.types;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
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.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import forestry.api.apiculture.IHiveDrop;
|
import forestry.api.apiculture.IHiveDrop;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import magicbees.bees.BeeGenomeManager;
|
import magicbees.bees.BeeGenomeManager;
|
||||||
import magicbees.bees.BeeSpecies;
|
import magicbees.bees.BeeSpecies;
|
||||||
import magicbees.bees.HiveDrop;
|
import magicbees.bees.HiveDrop;
|
||||||
@@ -12,20 +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;
|
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@@ -41,17 +45,19 @@ public enum HiveType {
|
|||||||
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(
|
HiveDrop valiantDrop = new HiveDrop(
|
||||||
BeeGenomeManager.addRainResist(ForestryHelper.getTemplateForestryForSpecies("Valiant")), combs, 5);
|
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));
|
||||||
@@ -69,12 +75,14 @@ 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));
|
||||||
@@ -90,7 +98,7 @@ 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");
|
||||||
@@ -161,9 +169,9 @@ public enum HiveType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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,9 +1,9 @@
|
|||||||
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;
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
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;
|
||||||
|
|
||||||
|
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 class ContainerEffectJar extends Container {
|
||||||
|
|
||||||
public TileEntityEffectJar jar;
|
public TileEntityEffectJar jar;
|
||||||
|
|
||||||
public int lastBeeHealth = 0;
|
public int lastBeeHealth = 0;
|
||||||
|
|||||||
@@ -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)));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ 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;
|
||||||
|
|
||||||
|
|||||||
@@ -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,13 +28,14 @@ public class ContainerMagicApiary extends ContainerMB {
|
|||||||
this.apiary = thaumicApiary;
|
this.apiary = thaumicApiary;
|
||||||
|
|
||||||
// Queen/Princess slot
|
// Queen/Princess slot
|
||||||
addSlotToContainer(new SlotCustomItems(
|
addSlotToContainer(
|
||||||
this.apiary,
|
new SlotCustomItems(
|
||||||
0,
|
this.apiary,
|
||||||
29,
|
0,
|
||||||
39,
|
29,
|
||||||
ItemInterface.getItemStack("Forestry", "beeQueenGE", 1),
|
39,
|
||||||
ItemInterface.getItemStack("Forestry", "beePrincessGE", 1)));
|
ItemInterface.getItemStack("Forestry", "beeQueenGE", 1),
|
||||||
|
ItemInterface.getItemStack("Forestry", "beePrincessGE", 1)));
|
||||||
// Drone slot
|
// Drone slot
|
||||||
addSlotToContainer(
|
addSlotToContainer(
|
||||||
new SlotCustomItems(this.apiary, 1, 29, 65, ItemInterface.getItemStack("Forestry", "beeDroneGE", 64)));
|
new SlotCustomItems(this.apiary, 1, 29, 65, ItemInterface.getItemStack("Forestry", "beeDroneGE", 64)));
|
||||||
@@ -91,8 +93,8 @@ public class ContainerMagicApiary extends ContainerMB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (srcStack.getItem() instanceof IHiveFrame) {
|
} else if (srcStack.getItem() instanceof IHiveFrame) {
|
||||||
clearSlot = this.mergeItemStack(
|
clearSlot = this
|
||||||
srcStack, SLOT_FRAME_START, SLOT_FRAME_START + SLOT_FRAME_COUNT, false);
|
.mergeItemStack(srcStack, SLOT_FRAME_START, SLOT_FRAME_START + SLOT_FRAME_COUNT, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +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 =
|
public static final ResourceLocation BACKGROUND_LOCATION = new ResourceLocation(
|
||||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.GUI_TEXTURE + "jarScreen.png");
|
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;
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ public class GUIEffectJar extends GuiContainer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||||
fontRendererObj.drawString("Inventory", 9, 63, 0);
|
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 9, 63, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -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,11 +1,13 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.IGuiHandler;
|
|
||||||
import magicbees.tileentity.TileEntityEffectJar;
|
|
||||||
import magicbees.tileentity.TileEntityMagicApiary;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.world.World;
|
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.TileEntityMagicApiary;
|
||||||
|
|
||||||
public class GUIHandler implements IGuiHandler {
|
public class GUIHandler implements IGuiHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -17,6 +19,8 @@ public class GUIHandler implements IGuiHandler {
|
|||||||
} 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;
|
||||||
@@ -29,8 +33,9 @@ public class GUIHandler implements IGuiHandler {
|
|||||||
} 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);
|
||||||
return new GuiMagicApiary(player.inventory, tileEntityThaumicApiary);
|
return new GuiMagicApiary(player.inventory, tileEntityThaumicApiary);
|
||||||
} else {
|
} else if (ID == UIScreens.EFFECT_RING.ordinal()) {
|
||||||
return null;
|
return new GUIEffectRing(new InventoryBeeRing(player.getHeldItem(), player), player.inventory);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
import cpw.mods.fml.client.IModGuiFactory;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.IModGuiFactory;
|
||||||
|
|
||||||
public class GuiFactory implements IModGuiFactory {
|
public class GuiFactory implements IModGuiFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,22 +1,27 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.GuiButton;
|
||||||
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
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 magicbees.tileentity.TileEntityMagicApiary;
|
import magicbees.tileentity.TileEntityMagicApiary;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
@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;
|
||||||
@@ -63,7 +68,7 @@ public class GuiMagicApiary extends GuiContainer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
|
||||||
fontRendererObj.drawString("Inventory", 9, 99, 0);
|
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 9, 99, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
package magicbees.client.gui;
|
package magicbees.client.gui;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraftforge.common.config.ConfigElement;
|
||||||
|
|
||||||
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 java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import magicbees.main.Config;
|
import magicbees.main.Config;
|
||||||
import magicbees.main.utils.VersionInfo;
|
import magicbees.main.utils.VersionInfo;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
|
||||||
import net.minecraftforge.common.config.ConfigElement;
|
|
||||||
|
|
||||||
public class ModGuiConfig extends GuiConfig {
|
public class ModGuiConfig extends GuiConfig {
|
||||||
|
|
||||||
public ModGuiConfig(GuiScreen guiScreen) {
|
public ModGuiConfig(GuiScreen guiScreen) {
|
||||||
super(
|
super(
|
||||||
guiScreen,
|
guiScreen,
|
||||||
@@ -34,6 +37,8 @@ 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(
|
return new DummyConfigElement.DummyCategoryElement(
|
||||||
name, tooltip_key, new ConfigElement(Config.configuration.getCategory(category)).getChildElements());
|
name,
|
||||||
|
tooltip_key,
|
||||||
|
new ConfigElement(Config.configuration.getCategory(category)).getChildElements());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ package magicbees.client.gui;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@@ -12,6 +13,7 @@ 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) {
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ package magicbees.client.gui;
|
|||||||
public enum UIScreens {
|
public enum UIScreens {
|
||||||
EFFECT_JAR,
|
EFFECT_JAR,
|
||||||
THAUMIC_APIARY,
|
THAUMIC_APIARY,
|
||||||
;
|
EFFECT_RING
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,24 @@
|
|||||||
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 =
|
CommonProxy.DOMAIN,
|
||||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "jarTexture.png");
|
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();
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,24 @@
|
|||||||
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 ModelVisAuraProvider {
|
public class ModelVisAuraProvider {
|
||||||
public static final ResourceLocation objFile =
|
|
||||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "visAuraConverter.obj");
|
public static final ResourceLocation objFile = new ResourceLocation(
|
||||||
public static final ResourceLocation textureLocation =
|
CommonProxy.DOMAIN,
|
||||||
new ResourceLocation(CommonProxy.DOMAIN, CommonProxy.MODEL + "visAuraProvider.png");
|
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();
|
||||||
|
|
||||||
@@ -28,7 +33,9 @@ public class ModelVisAuraProvider {
|
|||||||
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(
|
GL11.glTranslated(
|
||||||
Math.sin(tick * Math.PI * 2 / 1000) * 0.025, 0, Math.sin((tick + 30) * Math.PI * 2 / 650) * 0.03);
|
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,15 +1,18 @@
|
|||||||
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;
|
||||||
|
|
||||||
|
import cpw.mods.fml.client.FMLClientHandler;
|
||||||
|
import magicbees.client.model.ModelEffectJar;
|
||||||
|
import magicbees.tileentity.TileEntityEffectJar;
|
||||||
|
|
||||||
public class RendererEffectJar extends TileEntitySpecialRenderer implements IItemRenderer {
|
public class RendererEffectJar extends TileEntitySpecialRenderer implements IItemRenderer {
|
||||||
|
|
||||||
public static RendererEffectJar instance = new RendererEffectJar();
|
public static RendererEffectJar instance = new RendererEffectJar();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
package magicbees.client.render;
|
package magicbees.client.render;
|
||||||
|
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
|
||||||
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;
|
||||||
import net.minecraftforge.client.IItemRenderer;
|
import net.minecraftforge.client.IItemRenderer;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
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
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
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 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.relauncher.Side;
|
||||||
|
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) {
|
||||||
@@ -34,18 +37,19 @@ public class ItemCapsule extends Item {
|
|||||||
@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()));
|
||||||
}
|
}
|
||||||
@@ -60,10 +64,11 @@ public class ItemCapsule extends Item {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister iconRegister) {
|
public void registerIcons(IIconRegister iconRegister) {
|
||||||
this.itemIcon = iconRegister.registerIcon(CommonProxy.DOMAIN + ":capsule"
|
this.itemIcon = iconRegister.registerIcon(
|
||||||
+ this.capsuleType.getName().substring(0, 1).toUpperCase()
|
CommonProxy.DOMAIN + ":capsule"
|
||||||
+ this.capsuleType.getName().substring(1));
|
+ this.capsuleType.getName().substring(0, 1).toUpperCase()
|
||||||
for (FluidType t : FluidType.values()) {
|
+ this.capsuleType.getName().substring(1));
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
@@ -75,7 +80,7 @@ public class ItemCapsule extends Item {
|
|||||||
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
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 forestry.api.core.Tabs;
|
|
||||||
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.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
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);
|
||||||
@@ -31,11 +34,11 @@ public class ItemComb extends Item {
|
|||||||
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));
|
||||||
}
|
}
|
||||||
@@ -70,11 +73,11 @@ public class ItemComb extends Item {
|
|||||||
@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;
|
||||||
@@ -82,12 +85,12 @@ public class ItemComb extends Item {
|
|||||||
|
|
||||||
@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);
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
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 forestry.api.core.Tabs;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
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 cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
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 class ItemDrop extends Item {
|
||||||
|
|
||||||
public ItemDrop() {
|
public ItemDrop() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(Tabs.tabApiculture);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
@@ -32,9 +35,9 @@ public class ItemDrop extends Item {
|
|||||||
|
|
||||||
@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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,11 +70,11 @@ public class ItemDrop extends Item {
|
|||||||
@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;
|
||||||
@@ -79,6 +82,6 @@ public class ItemDrop extends Item {
|
|||||||
|
|
||||||
@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,8 +1,5 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import forestry.api.arboriculture.IToolGrafter;
|
|
||||||
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;
|
||||||
@@ -11,6 +8,10 @@ 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 magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
|
||||||
public class ItemGrafter extends Item implements IToolGrafter {
|
public class ItemGrafter extends Item implements IToolGrafter {
|
||||||
|
|
||||||
public ItemGrafter() {
|
public ItemGrafter() {
|
||||||
@@ -26,8 +27,8 @@ public class ItemGrafter extends Item implements IToolGrafter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockDestroyed(
|
public boolean onBlockDestroyed(ItemStack itemstack, World world, Block block, int x, int y, int z,
|
||||||
ItemStack itemstack, World world, Block block, int x, int y, int z, EntityLivingBase entityLiving) {
|
EntityLivingBase entityLiving) {
|
||||||
int damage = 1;
|
int damage = 1;
|
||||||
if (ThaumcraftHelper.isActive()) {
|
if (ThaumcraftHelper.isActive()) {
|
||||||
if (block == ThaumcraftHelper.leaf) {
|
if (block == ThaumcraftHelper.leaf) {
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
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.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);
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
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;
|
||||||
@@ -10,11 +14,9 @@ import forestry.api.apiculture.IHiveFrame;
|
|||||||
import magicbees.item.types.HiveFrameType;
|
import magicbees.item.types.HiveFrameType;
|
||||||
import magicbees.main.CommonProxy;
|
import magicbees.main.CommonProxy;
|
||||||
import magicbees.main.utils.TabMagicBees;
|
import magicbees.main.utils.TabMagicBees;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
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) {
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Optional;
|
import cpw.mods.fml.common.Optional;
|
||||||
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 magicbees.main.utils.compat.BotaniaHelper;
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import vazkii.botania.api.mana.IManaUsingItem;
|
import vazkii.botania.api.mana.IManaUsingItem;
|
||||||
|
|
||||||
@Optional.InterfaceList({
|
@Optional.InterfaceList({ @Optional.Interface(
|
||||||
@Optional.Interface(iface = "vazkii.botania.api.mana.IManaUsingItem", modid = BotaniaHelper.Name, striprefs = true)
|
iface = "vazkii.botania.api.mana.IManaUsingItem",
|
||||||
})
|
modid = BotaniaHelper.Name,
|
||||||
|
striprefs = true) })
|
||||||
public class ItemManasteelGrafter extends ItemGrafter implements IManaUsingItem {
|
public class ItemManasteelGrafter extends ItemGrafter implements IManaUsingItem {
|
||||||
|
|
||||||
public static final int MANA_PER_DAMAGE = 90;
|
public static final int MANA_PER_DAMAGE = 90;
|
||||||
@@ -29,7 +31,7 @@ public class ItemManasteelGrafter extends ItemGrafter implements IManaUsingItem
|
|||||||
@Optional.Method(modid = BotaniaHelper.Name)
|
@Optional.Method(modid = BotaniaHelper.Name)
|
||||||
public boolean getIsRepairable(ItemStack toolStack, ItemStack material) {
|
public boolean getIsRepairable(ItemStack toolStack, ItemStack material) {
|
||||||
return (material.getItem() == BotaniaHelper.itemManaResource
|
return (material.getItem() == BotaniaHelper.itemManaResource
|
||||||
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
||||||
|| super.getIsRepairable(toolStack, material);
|
|| super.getIsRepairable(toolStack, material);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ public class ItemManasteelGrafter extends ItemGrafter implements IManaUsingItem
|
|||||||
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5) {
|
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5) {
|
||||||
// Unsure if the server-side exclusion is necessary, but boy it looks disconcerting on the client if it's in.
|
// Unsure if the server-side exclusion is necessary, but boy it looks disconcerting on the client if it's in.
|
||||||
if (
|
if (
|
||||||
/*!world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
/* !world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
||||||
if (BotaniaHelper.requestMana(stack, (EntityPlayer) player, MANA_PER_DAMAGE, 1)) {
|
if (BotaniaHelper.requestMana(stack, (EntityPlayer) player, MANA_PER_DAMAGE, 1)) {
|
||||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Optional;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import forestry.api.core.IToolScoop;
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.utils.compat.BotaniaHelper;
|
|
||||||
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.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -14,11 +8,19 @@ 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 cpw.mods.fml.common.Optional;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.IToolScoop;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.compat.BotaniaHelper;
|
||||||
import vazkii.botania.api.mana.IManaUsingItem;
|
import vazkii.botania.api.mana.IManaUsingItem;
|
||||||
|
|
||||||
@Optional.InterfaceList({
|
@Optional.InterfaceList({ @Optional.Interface(
|
||||||
@Optional.Interface(iface = "vazkii.botania.api.mana.IManaUsingItem", modid = BotaniaHelper.Name, striprefs = true)
|
iface = "vazkii.botania.api.mana.IManaUsingItem",
|
||||||
})
|
modid = BotaniaHelper.Name,
|
||||||
|
striprefs = true) })
|
||||||
public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolScoop {
|
public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolScoop {
|
||||||
|
|
||||||
public static final int MANA_PER_DAMAGE = 30;
|
public static final int MANA_PER_DAMAGE = 30;
|
||||||
@@ -33,8 +35,8 @@ public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolSco
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockDestroyed(
|
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z,
|
||||||
ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase player) {
|
EntityLivingBase player) {
|
||||||
stack.damageItem(1, player);
|
stack.damageItem(1, player);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -48,7 +50,7 @@ public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolSco
|
|||||||
@Optional.Method(modid = BotaniaHelper.Name)
|
@Optional.Method(modid = BotaniaHelper.Name)
|
||||||
public boolean getIsRepairable(ItemStack toolStack, ItemStack material) {
|
public boolean getIsRepairable(ItemStack toolStack, ItemStack material) {
|
||||||
return (material.getItem() == BotaniaHelper.itemManaResource
|
return (material.getItem() == BotaniaHelper.itemManaResource
|
||||||
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
&& material.getItemDamage() == BotaniaHelper.ManaResource.MANASTEEL.ordinal())
|
||||||
|| super.getIsRepairable(toolStack, material);
|
|| super.getIsRepairable(toolStack, material);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,7 +64,7 @@ public class ItemManasteelScoop extends Item implements IManaUsingItem, IToolSco
|
|||||||
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5) {
|
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5) {
|
||||||
// Unsure if the server-side exclusion is necessary, but boy it looks disconcerting on the client if it's in.
|
// Unsure if the server-side exclusion is necessary, but boy it looks disconcerting on the client if it's in.
|
||||||
if (
|
if (
|
||||||
/*!world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
/* !world.isRemote && */ stack.getItemDamage() > 0 && player instanceof EntityPlayer) {
|
||||||
if (BotaniaHelper.requestMana(stack, (EntityPlayer) player, MANA_PER_DAMAGE, 1)) {
|
if (BotaniaHelper.requestMana(stack, (EntityPlayer) player, MANA_PER_DAMAGE, 1)) {
|
||||||
stack.setItemDamage(stack.getItemDamage() - 1);
|
stack.setItemDamage(stack.getItemDamage() - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
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 java.util.List;
|
import java.util.List;
|
||||||
import magicbees.item.types.ResourceType;
|
|
||||||
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.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.item.types.ResourceType;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
|
||||||
public class ItemMiscResources extends Item {
|
public class ItemMiscResources extends Item {
|
||||||
private IIcon[] icons = new IIcon[ResourceType.values().length];
|
|
||||||
|
private final IIcon[] icons = new IIcon[ResourceType.VALUES.length];
|
||||||
|
|
||||||
public ItemMiscResources() {
|
public ItemMiscResources() {
|
||||||
super();
|
super();
|
||||||
@@ -34,9 +37,9 @@ public class ItemMiscResources extends Item {
|
|||||||
|
|
||||||
@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 (ResourceType type : ResourceType.values()) {
|
for (ResourceType type : ResourceType.VALUES) {
|
||||||
if (type.showInList) {
|
if (type.showInList) {
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
}
|
}
|
||||||
@@ -45,9 +48,8 @@ public class ItemMiscResources extends Item {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister par1IconRegister) {
|
public void registerIcons(IIconRegister par1IconRegister) {
|
||||||
for (int i = 0; i < ResourceType.values().length; i++) {
|
for (int i = 0; i < ResourceType.VALUES.length; i++) {
|
||||||
this.icons[i] =
|
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + ResourceType.VALUES[i].getName());
|
||||||
par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":" + ResourceType.values()[i].getName());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,6 +61,6 @@ public class ItemMiscResources extends Item {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack stack) {
|
public String getItemStackDisplayName(ItemStack stack) {
|
||||||
return ResourceType.values()[stack.getItemDamage()].getLocalizedName();
|
return ResourceType.VALUES[stack.getItemDamage()].getLocalizedName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,23 @@
|
|||||||
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 java.util.List;
|
import java.util.List;
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.Config;
|
|
||||||
import magicbees.main.utils.MoonPhase;
|
|
||||||
import magicbees.main.utils.TabMagicBees;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
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.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.MoonPhase;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
|
||||||
public class ItemMoonDial extends Item {
|
public class ItemMoonDial extends Item {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon[] icons;
|
private IIcon[] icons;
|
||||||
|
|
||||||
@@ -37,20 +40,18 @@ public class ItemMoonDial extends Item {
|
|||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||||
return this.icons[
|
return this.icons[MoonPhase.getMoonPhaseFromTime(player.worldObj.getWorldTime()).ordinal()];
|
||||||
MoonPhase.getMoonPhaseFromTime(player.worldObj.getWorldTime()).ordinal()];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List infoList, boolean par4) {
|
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List infoList, boolean par4) {
|
||||||
if (Config.moonDialShowsPhaseInText
|
if (Config.moonDialShowsPhaseInText && entityPlayer.getCurrentEquippedItem() != null
|
||||||
&& entityPlayer.getCurrentEquippedItem() != null
|
|
||||||
&& entityPlayer.getCurrentEquippedItem().getItem() == this) {
|
&& entityPlayer.getCurrentEquippedItem().getItem() == this) {
|
||||||
infoList.add("\u00A77"
|
infoList.add(
|
||||||
+ MoonPhase.getMoonPhaseFromTime(entityPlayer.worldObj.getWorldTime())
|
"\u00A77"
|
||||||
.getLocalizedName());
|
+ MoonPhase.getMoonPhaseFromTime(entityPlayer.worldObj.getWorldTime()).getLocalizedName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,7 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import baubles.api.BaubleType;
|
|
||||||
import baubles.api.IBauble;
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
import cpw.mods.fml.common.Optional;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
import magicbees.main.Config;
|
|
||||||
import magicbees.main.utils.LocalizationManager;
|
|
||||||
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.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -25,6 +16,17 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
import baubles.api.BaubleType;
|
||||||
|
import baubles.api.IBauble;
|
||||||
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
import cpw.mods.fml.common.Optional;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
import magicbees.main.Config;
|
||||||
|
import magicbees.main.utils.LocalizationManager;
|
||||||
|
import magicbees.main.utils.TabMagicBees;
|
||||||
|
|
||||||
@Optional.Interface(modid = "Baubles", iface = "baubles.api.IBauble")
|
@Optional.Interface(modid = "Baubles", iface = "baubles.api.IBauble")
|
||||||
public class ItemMysteriousMagnet extends Item implements IBauble {
|
public class ItemMysteriousMagnet extends Item implements IBauble {
|
||||||
|
|
||||||
@@ -43,7 +45,7 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
|
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4) {
|
||||||
String s = LocalizationManager.getLocalizedString("misc.level", getMagnetLevel(itemStack));
|
String s = LocalizationManager.getLocalizedString("misc.level", getMagnetLevel(itemStack));
|
||||||
if (isMagnetActive(itemStack)) {
|
if (isMagnetActive(itemStack)) {
|
||||||
@@ -62,7 +64,7 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
|
|||||||
|
|
||||||
@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 (int i = 0; i <= getMaximumLevel(); i++) {
|
for (int i = 0; i <= getMaximumLevel(); i++) {
|
||||||
list.add(new ItemStack(this, 1, i * 2));
|
list.add(new ItemStack(this, 1, i * 2));
|
||||||
@@ -169,7 +171,11 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
|
|||||||
if ((arrow.canBePickedUp == 1 || world.rand.nextFloat() < 0.3f)
|
if ((arrow.canBePickedUp == 1 || world.rand.nextFloat() < 0.3f)
|
||||||
&& arrow.shootingEntity != entity) {
|
&& arrow.shootingEntity != entity) {
|
||||||
EntityItem replacement = new EntityItem(
|
EntityItem replacement = new EntityItem(
|
||||||
world, arrow.posX, arrow.posY, arrow.posZ, new ItemStack(Items.arrow));
|
world,
|
||||||
|
arrow.posX,
|
||||||
|
arrow.posY,
|
||||||
|
arrow.posZ,
|
||||||
|
new ItemStack(Items.arrow));
|
||||||
world.spawnEntityInWorld(replacement);
|
world.spawnEntityInWorld(replacement);
|
||||||
}
|
}
|
||||||
world.removeEntity(arrow);
|
world.removeEntity(arrow);
|
||||||
|
|||||||
@@ -1,17 +1,20 @@
|
|||||||
package magicbees.item;
|
package magicbees.item;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import magicbees.item.types.NuggetType;
|
|
||||||
import magicbees.main.CommonProxy;
|
|
||||||
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.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import magicbees.item.types.NuggetType;
|
||||||
|
import magicbees.main.CommonProxy;
|
||||||
|
|
||||||
public class ItemNugget extends Item {
|
public class ItemNugget extends Item {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon[] icons;
|
private IIcon[] icons;
|
||||||
|
|
||||||
@@ -32,9 +35,9 @@ public class ItemNugget extends Item {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||||
for (NuggetType type : NuggetType.values()) {
|
for (NuggetType type : NuggetType.VALUES) {
|
||||||
if (type.isActive()) {
|
if (type.isActive()) {
|
||||||
list.add(new ItemStack(item, 1, type.ordinal()));
|
list.add(new ItemStack(item, 1, type.ordinal()));
|
||||||
}
|
}
|
||||||
@@ -43,11 +46,12 @@ public class ItemNugget extends Item {
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerIcons(IIconRegister par1IconRegister) {
|
public void registerIcons(IIconRegister par1IconRegister) {
|
||||||
this.icons = new IIcon[NuggetType.values().length];
|
this.icons = new IIcon[NuggetType.VALUES.length];
|
||||||
for (int i = 0; i < NuggetType.values().length; i++) {
|
for (int i = 0; i < NuggetType.VALUES.length; i++) {
|
||||||
this.icons[i] = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":nugget"
|
this.icons[i] = par1IconRegister.registerIcon(
|
||||||
+ NuggetType.values()[i].name().substring(0, 1)
|
CommonProxy.DOMAIN + ":nugget"
|
||||||
+ NuggetType.values()[i].name().substring(1).toLowerCase());
|
+ NuggetType.VALUES[i].name().substring(0, 1)
|
||||||
|
+ NuggetType.VALUES[i].name().substring(1).toLowerCase());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,6 +63,6 @@ public class ItemNugget extends Item {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack stack) {
|
public String getItemStackDisplayName(ItemStack stack) {
|
||||||
return NuggetType.values()[stack.getItemDamage()].getName();
|
return NuggetType.VALUES[stack.getItemDamage()].getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,22 @@
|
|||||||
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 forestry.api.core.Tabs;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import magicbees.item.types.PollenType;
|
|
||||||
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.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
|
import magicbees.item.types.PollenType;
|
||||||
|
import magicbees.main.utils.compat.ForestryHelper;
|
||||||
|
|
||||||
public class ItemPollen extends Item {
|
public class ItemPollen extends Item {
|
||||||
|
|
||||||
public ItemPollen() {
|
public ItemPollen() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(Tabs.tabApiculture);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
@@ -32,9 +35,9 @@ public class ItemPollen extends Item {
|
|||||||
|
|
||||||
@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 (PollenType type : PollenType.values()) {
|
for (PollenType type : PollenType.VALUES) {
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -67,11 +70,11 @@ public class ItemPollen extends Item {
|
|||||||
@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(PollenType.values().length - 1, stack.getItemDamage()));
|
int meta = Math.max(0, Math.min(PollenType.VALUES.length - 1, stack.getItemDamage()));
|
||||||
int colour = PollenType.values()[meta].colour[0];
|
int colour = PollenType.VALUES[meta].colourA;
|
||||||
|
|
||||||
if (pass >= 1) {
|
if (pass >= 1) {
|
||||||
colour = PollenType.values()[meta].colour[1];
|
colour = PollenType.VALUES[meta].colourB;
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
@@ -79,6 +82,6 @@ public class ItemPollen extends Item {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemStackDisplayName(ItemStack stack) {
|
public String getItemStackDisplayName(ItemStack stack) {
|
||||||
return PollenType.values()[stack.getItemDamage()].getName();
|
return PollenType.VALUES[stack.getItemDamage()].getName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loaded 100 of 320 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user