Compare commits

...
431 Commits
Author SHA1 Message Date
Vincent Lee 16381383cb Fix wills not applying. Closes #372 2016-07-20 20:18:16 -05:00
Vincent Lee 252e3191dc Fix some particles being missing 2016-07-17 21:16:50 -05:00
Vincent Lee ce0ba85397 Made it more reliable 2016-07-17 20:58:30 -05:00
Vincent Lee aa8dc5d16c Fix something in bows not being cross proxied. Closes #398 2016-07-17 20:33:56 -05:00
Vincent Lee dff2cf2bf1 Change flavour text 2016-07-16 17:40:10 -05:00
Vincent Lee 347c100e93 Add the version txt for 1.10.2 that never got added .-. 2016-07-16 17:35:56 -05:00
Vincent Lee 003fb22733 Tidy up, add texture 2016-07-16 17:34:57 -05:00
Vincent Lee 7f5d3859e4 Added the Bergamute 2016-07-16 16:52:59 -05:00
Vincent Lee 124fdeeee3 Possible fix for #343 2016-07-13 21:44:10 -05:00
Vincent Lee 611f33a133 Fix #395 2016-07-13 21:13:36 -05:00
Vincent Lee a76efcc6fc Actually fix #386 2016-07-06 21:46:39 -05:00
Vincent Lee cd3daf2b47 Fix rod of bifrost going batshit. Closes #386 2016-07-04 13:17:57 -05:00
Vincent Lee dc05115497 Merge pull request #370 from howtonotwin/chordata
Rewrite some of the Ring of Chordata
2016-07-04 12:55:41 -05:00
Vincent Lee 44a4657cd8 Fix crafting halo crash and cleanup inventory utils, closes #385 2016-07-04 12:09:52 -05:00
Vincent Lee 8e70e9fa68 FIx starcaller not working, blacklist aura nodes from rod of shaded mesa. Closes #387: 2016-06-30 21:24:40 -05:00
Vincent Lee 0b635c5bc7 Fix missed change in gradle 2016-06-29 20:28:36 -05:00
Vincent Lee 6f69d5d154 Build 312 2016-06-29 20:28:09 -05:00
Vincent Lee 589b4e49b6 Prep buildscripts for 1.10.2 2016-06-29 20:24:25 -05:00
Vincent Lee b30ad911fa Reflect since trying to get around inlining isn't working 2016-06-29 20:22:14 -05:00
Vincent Lee be667b2ee3 Fix some items not being held right 2016-06-29 19:30:06 -05:00
Vincent Lee bea1c6ecdc Fix cross proxy detection to support 1.10.2 2016-06-29 19:29:54 -05:00
Vincent Lee 971b1ee3e2 Fix typo in king key, closes #381 2016-06-28 21:19:18 -05:00
Vincent Lee 4172637bcc Fix drum sound 2016-06-26 17:18:10 -05:00
Vincent Lee 2650813f95 Fix burst range being much smaller than it should be. Closes #376 2016-06-26 16:19:40 -05:00
Vincent Lee 1fbcb0b39b Fix desyncing in runic altar, closes #374 2016-06-26 11:29:47 -05:00
Vincent Lee e28f82dc7d Apothecary right click uses caps 2016-06-26 11:07:46 -05:00
Vincent Lee d3d94e46d7 Special flower item models fall back to poppy. Close #375 2016-06-26 09:05:35 -05:00
Vincent Lee b2d7bc2794 Pick block for entities 2016-06-25 16:09:46 -05:00
Vincent Lee 2afaac9f20 Fix flowers emitting light. Closes #369 2016-06-25 15:27:34 -05:00
Vincent Lee 28b3e5d22b Build 311 2016-06-25 15:10:02 -05:00
Vincent Lee da3958a414 Fix more build stuff 2016-06-25 14:59:39 -05:00
Vincent Lee 4ddf3767c5 Update buildscript for 1.10 2016-06-25 14:50:07 -05:00
Vincent Lee 81c45fb079 Fix ring of far reach and fix proxy selection 2016-06-25 14:43:24 -05:00
Vincent Lee 49d79abb83 Include 1.10 in accepted mc versions 2016-06-24 19:59:24 -05:00
Vincent Lee 1a3b6833b5 Update JEI 2016-06-24 19:58:57 -05:00
Vincent Lee 38cd0fbf55 Switch pain spots to using crossproxy 2016-06-24 19:43:31 -05:00
Vincent Lee 9d1e7f86cf Futureproof update json url 2016-06-24 19:35:24 -05:00
Vincent Lee 5863b165ad Added cross version proxies 2016-06-24 19:33:58 -05:00
Vincent Lee f7a1f629be JEI hack for 1.10 2016-06-24 18:59:23 -05:00
Vincent Lee 6f348e7db1 Made dispenser behaviours 1.10 safe 2016-06-24 18:55:41 -05:00
Howtonotwin b6ddefcaf4 Rewrite some of the Ring of Chordata
Add guard against having two rings equipped; the second ring will be
inactive. Fixes #340
2016-06-24 17:11:55 -04:00
Vincent Lee c6df7c260a Fix lexicon word count 2016-06-22 19:29:06 -05:00
Vincent Lee 9a11ebef1f Fix 1.8 stones not being voided, clean up ore dict registrations that are no longer needed 2016-06-22 19:16:52 -05:00
Vincent Lee 1bb254a4fc Workaround subtiles crashing when dug 2016-06-22 19:04:19 -05:00
Vincent Lee 8600b75691 Fix solegnolia not working on dediserver and threadsafe the collection. Fixes #346 2016-06-22 18:41:21 -05:00
Vincent Lee 337851994f Fix bad portuguese brick recipes. Closes #368 2016-06-21 19:44:14 -05:00
Vincent Lee b232d8bb93 Fix #367 2016-06-21 19:31:24 -05:00
Vincent Lee 2a2971f75a Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-06-21 19:26:56 -05:00
Vincent Lee dced32bf4c Merge pull request #365 from Luxor5393/patch-1
Fix two typos.
2016-06-21 19:23:58 -05:00
Luxor5393 420d4b0aa4 Fix two typos. 2016-06-21 16:57:47 +02:00
Vincent Lee d4b0d0aec9 Cleanup 2016-06-20 19:54:33 -05:00
Vincent Lee e37b3ac3e6 Soulscribe only effective when fully charged 2016-06-20 19:34:08 -05:00
Vincent Lee 6a4f8e9f4b Switch some things to tessellator 2016-06-19 10:37:32 -05:00
Vincent Lee d7929eed08 Fix terra pick darkening screen 2016-06-19 10:21:37 -05:00
Vincent Lee 028f0c4c82 Minor opt to red string interceptor 2016-06-19 10:05:10 -05:00
Vincent Lee 71edb3abb1 Fix transforms on runic altar. Closes #351 2016-06-19 09:47:58 -05:00
Vincent Lee 4fede6f49e Cleanup 2016-06-18 23:12:37 -05:00
Vincent Lee 4ef18f3347 Fully serverside enchanter 2016-06-18 23:09:27 -05:00
Vincent Lee eaa9c89684 Optimize spectator net traffic more - don't use nbt list of nbt longs just use nbt int array 2016-06-18 21:42:53 -05:00
Vincent Lee 37c2adece1 Fix spark particles not spreading out 2016-06-18 21:28:19 -05:00
Vincent Lee 9f94407be0 Fix armor format error 2016-06-18 21:09:08 -05:00
Vincent Lee 7b6d2e843e JK it's 2 overrides 2016-06-18 19:10:27 -05:00
Vincent Lee 7d87732ccb Actually prevent shoving. Why the heck does it require three overrides?? 2016-06-18 19:04:54 -05:00
Vincent Lee 3c9388702c Prevent GG from being shoved while it's still spawning 2016-06-18 18:42:27 -05:00
Vincent Lee e338735814 Allow non-melle player damage to GG (arrows) damage cap still applies. Damage reduction in hard mode now done using armor 2016-06-18 18:36:15 -05:00
Vincent Lee d34fc5a3e1 GG now deals damage if a player is in its path of teleport 2016-06-18 18:03:21 -05:00
Vincent Lee d9522fcc18 Fix gaia removed potion effects not syncing, made magic landmines deal magic (armor bypassing) damage 2016-06-18 17:25:51 -05:00
Vincent Lee 53147606c1 GG automatically distributes drops to appropriate players. Also fix mobs getting too short of a fire resist 2016-06-18 16:48:58 -05:00
Vincent Lee cfb368f67e Immutabilize vector3 as it being defensively copied all over already 2016-06-18 16:11:03 -05:00
Vincent Lee 6c307d16f4 Made Quats proper value type 2016-06-18 15:28:54 -05:00
Vincent Lee 3a8fc10cc9 Fix TE resyncs sending a bit too much stuff 2016-06-18 14:57:13 -05:00
Vincent Lee f2544a6fa4 Remove debug logging in special flower model 2016-06-18 14:37:07 -05:00
Vincent Lee b7e77936b3 Remove guards in TileMod since forge has them now 2016-06-18 14:36:36 -05:00
Vincent Lee 8767180a7b Made special flower models use a guava cache. Fixes threading issues, closes #338 2016-06-18 14:21:56 -05:00
Vincent Lee bc52c67c89 Fix tiara conflicting with spectator mode, closes #356 2016-06-18 12:42:18 -05:00
Vincent Lee 0001f9c8f1 Save flare chakram state in NBT, closes upstream issue 1620 2016-06-17 19:43:45 -05:00
Vincent Lee 9fef518968 Fix broken hsb calculation because mojang's function is broken. Also fix upstream issue 1672 2016-06-17 19:41:59 -05:00
Vincent Lee 6b10ada28a Build 310 I need sleep 2016-06-17 00:21:01 -05:00
Vincent Lee f3a3e80334 Revert "Revert "Fix other mods crashing because of alternate implementations of metadata""
This reverts commit fc23dedd05.
2016-06-17 00:17:51 -05:00
Vincent Lee 5cdd2ee32f Revert "Cleaner solution"
This reverts commit a9cc76576a.
2016-06-17 00:17:48 -05:00
Vincent Lee a9cc76576a Cleaner solution 2016-06-17 00:03:35 -05:00
Vincent Lee fc23dedd05 Revert "Fix other mods crashing because of alternate implementations of metadata"
This reverts commit 25cd574662.
2016-06-17 00:03:04 -05:00
Vincent Lee 65bf209835 Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-06-16 23:46:35 -05:00
Vincent Lee d2e84babb7 Fix flowers popping off on relay and mycelium 2016-06-16 23:44:44 -05:00
Vincent Lee 850ea37f4d Merge pull request #354 from yrsegal/patch-1
Fix other mods crashing because of alternate implementations of metadata
2016-06-16 23:32:23 -05:00
Vincent Lee 2d0af453b3 Tweak various model transforms. Closes #350: 2016-06-16 23:30:23 -05:00
Vincent Lee d5c9c7815e Clean up lightning code 2016-06-16 23:12:22 -05:00
Wire Segal 25cd574662 Fix other mods crashing because of alternate implementations of metadata
Closes #352
Closes #353
2016-06-16 23:57:43 -04:00
Vincent Lee 3cf1619b2e Build 309 2016-06-16 21:22:51 -05:00
Vincent Lee 73c06c10eb Fix server crash 2016-06-16 21:18:35 -05:00
Vincent Lee 1d5dfa149e TIL Collection.removeIf 2016-06-16 21:04:36 -05:00
Vincent Lee c1fff324d1 Remove extraneous debug print 2016-06-16 20:59:52 -05:00
Vincent Lee 95f1e768fe Update forge, fix mana blaster overrides 2016-06-16 20:40:11 -05:00
Vincent Lee ec9496b0e7 Remove some unused stuff 2016-06-16 19:48:14 -05:00
Vincent Lee 5f3951c7fa Fix solegnolia having lower range than advertised. Closes #346 2016-06-16 19:39:26 -05:00
Vincent Lee 47ac6fc65a Check for blocks with no item in overgrowth seed. Closes #347 2016-06-16 19:26:29 -05:00
Vincent Lee ae0894a8d0 Fix keybinding crash. Closes #344 2016-06-16 19:24:12 -05:00
Vincent Lee 96bf87333b Clean up lightning code, batch the render by 200's to not overflow the tess. Closes #342 2016-06-14 20:30:52 -05:00
Vincent Lee 9e09a3f42d Update forge and fix pylon transforms, closes #252 2016-06-12 13:19:31 -05:00
Vincent Lee bc0ca77960 Terra blade now respects 1.9 cooldown 2016-06-11 21:11:47 -05:00
Vincent Lee 8bca8bb5f6 Get rid of some of the many stupid parXX parameter names 2016-06-11 14:42:18 -05:00
Vincent Lee ece95aca1c Big parameter name cleanup, part 1 2016-06-11 14:28:22 -05:00
Vincent Lee c357ab68c3 Super minor optimization for object alloc 2016-06-11 13:58:05 -05:00
Vincent Lee cfc1ba8baf Gaia head can now be worn. Closes #305 2016-06-11 12:57:46 -05:00
Vincent Lee f56eca23fc Fix #330 2016-06-11 11:24:00 -05:00
Vincent Lee b7aab995db Merge pull request #337 from yrsegal/MC19
Fix all outstanding auxiliary renders.
2016-06-10 22:48:18 -05:00
yrsegal ec5fcef90c fix devil tail 2016-06-10 23:22:41 -04:00
yrsegal f4d7a80e49 Fix all cosmetic baubles and use NONE 2016-06-10 22:49:53 -04:00
Vincent Lee c289edd825 Serverside normal sparks 2016-06-10 20:31:34 -05:00
Vincent Lee 5ac09b830d Some net stuff for later 2016-06-10 19:52:05 -05:00
Vincent Lee 709fc130d5 Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-06-10 19:31:29 -05:00
Vincent Lee 873aedf4e5 Fix #332 2016-06-10 19:31:11 -05:00
Vincent Lee 27410530d6 Tweak horn sidings 2016-06-10 19:18:28 -05:00
yrsegal 491452ac7b Fix all outstanding auxiliary renders.
close #49 until the next time renders break
2016-06-10 16:56:39 -04:00
Vincent Lee 4e905ede36 Merge pull request #336 from isambourgg/patch-1
Update fr_FR.lang
2016-06-10 14:46:44 -05:00
Vincent Lee 6afc33c57b Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-06-09 20:50:15 -05:00
Vincent Lee 5f35b8aef0 Readd old overrides, not working because of forge bug 2016-06-09 20:49:49 -05:00
isambourgg 699ee5027a Update fr_FR.lang
Relecture et correction jusqu'à la Ligne 559.
2016-06-09 16:42:34 -04:00
Vincent Lee 7c32f5fbaf Merge pull request #331 from yrsegal/patch
Fix sneaking transforms being out of place for baubles
2016-06-08 18:08:35 -05:00
yrsegal 3c0fe199d5 Fix sneaking transforms being out of place for baubles 2016-06-08 17:02:41 -04:00
Vincent Lee c15f08b066 Remove unofficial port message from login nag 2016-06-07 20:18:05 -05:00
Vincent Lee c47de38ec9 Fix inventory transforms for floating flowers 2016-06-05 18:14:07 -05:00
Vincent Lee 9b3c1d721d Minor potion cleanup 2016-06-05 17:45:58 -05:00
Vincent Lee 5d19a0dd6c Workaround for armorstand helmets. Closes #23 2016-06-05 16:37:52 -05:00
Vincent Lee 89834b4053 Clean up some other models 2016-06-05 15:15:45 -05:00
Vincent Lee 85eef6c461 Steal the transforms from Psi :P 2016-06-05 15:11:17 -05:00
Vincent Lee 9897d3ed80 Merge branch 'newblaster' into MC19 2016-06-05 14:57:44 -05:00
Vincent Lee 02cfe14d94 Move bauble box to caps as well. Closes #297 2016-06-05 14:32:08 -05:00
Vincent Lee 4b4b9a308c Tweaks to previous commit 2016-06-04 23:14:33 -05:00
Vincent Lee 55df4f0619 Move flower pouch to caps 2016-06-04 22:59:53 -05:00
Vincent Lee c83578b920 Clean up basic section lexicon and some misc lang entries 2016-06-04 21:35:43 -05:00
Vincent Lee 39517588e7 Clean up some todos 2016-06-04 20:10:13 -05:00
Vincent Lee 14f0c43850 Fix armor material registration, buff terrasteel armor slightly 2016-06-04 20:00:10 -05:00
Vincent Lee 05c6a07bc2 Clean up logging and log spam. #cleanloginitiative 2016-06-04 19:01:34 -05:00
Vincent Lee d241f95bee Zap some duplicated code 2016-06-04 12:06:39 -05:00
Vincent Lee 49a6f00b41 Update Forge, some fluid cap stuff 2016-06-03 23:10:33 -05:00
Vincent Lee 14b2a35862 Clean up English present in es_ES, fr_FR. My pinkie hurts. 2016-06-03 20:41:32 -05:00
Vincent Lee 4aeed07f75 Clean up English present in nl_NL, pt_BR 2016-06-03 20:27:21 -05:00
Vincent Lee cdcfe75325 Clean up English present in es_AR, ru_RU 2016-06-03 20:20:51 -05:00
Vincent Lee 303e89f6c5 Clean up English present in ja_JP and ko_KR 2016-06-03 20:11:55 -05:00
Vincent Lee c9e501fd02 Clean up English present in zh_CN, zh_TW 2016-06-03 20:03:19 -05:00
Vincent Lee 3049ac9767 Clean up English present in de_DE 2016-06-03 19:52:54 -05:00
Vincent Lee 11c0e4b274 Add warning header to all lang files 2016-06-03 19:41:54 -05:00
Vincent Lee fab5fc0087 Remove ColoredLights integration 2016-06-03 19:28:15 -05:00
Vincent Lee a5df917d5a Update BM mod id 2016-06-03 18:56:06 -05:00
Vincent Lee c2931d1517 Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-06-02 21:41:10 -05:00
Vincent Lee b71cb163a7 Fix fallback for contributors with flowers not in main botania. Closes #321 2016-06-02 21:40:36 -05:00
Vincent Lee ff69a2e458 Merge pull request #320 from yrsegal/MC19
Make the lexicon recipe mappings accept the wildcard value
2016-06-01 21:20:35 -05:00
Vincent Lee 4cfd420cc1 Let some technical blocks drop normal drop from weight lens 2016-06-01 21:09:33 -05:00
Vincent Lee 95bd4689d6 Fix halo crashing, also tweak visuals slightly. Closes #314 2016-06-01 20:39:49 -05:00
Vincent Lee d2aa4e0ebc Fix some missing glstatemanager substitutions. Fixes #307 2016-06-01 20:19:40 -05:00
yrsegal 1bff638075 Make the lexicon recipe mappings accept the wildcard value 2016-06-01 18:39:36 -04:00
Vincent Lee 78f296d0cf Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-05-31 20:58:30 -05:00
Vincent Lee 6014df2b12 Fix a couple baubles 2016-05-31 20:57:45 -05:00
Vincent Lee 30c208aa55 Merge pull request #315 from howtonotwin/258-bhtalisman
Limit BH Talisman to world height. Fixes #258
2016-05-31 20:35:52 -05:00
Vincent Lee 96a2da61f5 Fix wrong import 2016-05-31 20:03:39 -05:00
Howtonotwin fd35d25423 Limit BH Talisman to world height. Fixes #258 2016-05-31 17:17:20 -04:00
Vincent Lee 2065f01b8d Fix pool crafting particles 2016-05-30 21:37:56 -05:00
Vincent Lee 6c52c4f5f9 Fix chakrams being weird. Closes #306 2016-05-30 17:14:06 -05:00
Vincent Lee 307068c9c4 Lower spawn fuzz to 0 in gog, fixes #287 2016-05-30 16:21:56 -05:00
Vincent Lee 688da731ab Spell cloth can no longer be enchanted at an anvil, closes #308 2016-05-30 12:57:21 -05:00
Vincent Lee ac003f1307 Gaia guardian now looks like whoever is viewing it. spooky. 2016-05-28 16:45:57 -05:00
Vincent Lee 3e0f5da01d Clean up gaia head renderer. Closes #303 2016-05-28 15:44:20 -05:00
Vincent Lee cc1b66f3cd Gradle script automatically updates update.json 2016-05-28 12:50:41 -05:00
Vincent Lee c08fa024a0 Add update.json not done yet, bump forge minimum req version 2016-05-28 11:46:06 -05:00
Vincent Lee 4f0d63f5a0 Build 308 2016-05-28 11:09:08 -05:00
Vincent Lee 8ef557e51b Remove loot debug -.- 2016-05-28 11:04:40 -05:00
Vincent Lee 974e8d0316 Build 307 2016-05-27 20:55:48 -05:00
Vincent Lee cf82603f04 Update bow methods. Closes #300 2016-05-27 20:26:54 -05:00
Vincent Lee 1d54442e01 Fix axe digging closes #301 2016-05-27 19:56:07 -05:00
Vincent Lee a07f7914ae Add chest textures, update Forge 2016-05-27 19:51:59 -05:00
Vincent Lee 51c7d310a7 Moar clenaup 2016-05-26 23:22:50 -05:00
Vincent Lee e3e6f8996f Cleanup 2016-05-26 23:08:53 -05:00
Vincent Lee 7f759c1b88 Fix ender air bottle being underpowered 2016-05-24 21:16:18 -05:00
Vincent Lee 57e1fd5b41 Merge branch 'master' of https://github.com/Vazkii/Botania into MC19 2016-05-22 13:20:39 -05:00
Vincent Lee 8b88289789 Fix issues associated with last commit 2016-05-22 13:19:11 -05:00
Vincent Lee ff2afbf037 Untested: replace most uses of common i18n with client one 2016-05-22 11:41:33 -05:00
Vincent Lee 41b3e6cd4f Use all bits for effect packet args. Closes #296 2016-05-21 23:40:10 -05:00
Vincent Lee 930703b5c1 Workaround for 'global' particles at small render distances. Close #15 (mostly) 2016-05-21 23:38:17 -05:00
Vincent Lee f52dca111f Flower bag plays sound and animation. Closes #295 2016-05-21 22:55:30 -05:00
Vincent Lee 9694664922 Fix mana cookie lasting too short (thanks wiresegal) 2016-05-21 22:13:52 -05:00
Vincent Lee e2e00f7ef1 Use chunk util method that exists instead of own thing 2016-05-21 12:13:37 -05:00
Vincent Lee c9de3bcc03 Mana pools now try catalyst recipes first before recipes without catalyst specified. Also make mana bar not render in spectator. Closes #291 2016-05-20 14:36:28 -05:00
Vincent Lee 995c19c04a Fix TE syncing on login, 2 minor optimizations 2016-05-19 14:07:52 -05:00
Vincent Lee 96983a1d6b Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-05-19 10:03:48 -05:00
Vincent Lee 8f00e9bdd6 Build 306 2016-05-19 10:03:24 -05:00
Vincent Lee 49d3004c60 Merge pull request #288 from yrsegal/MC19
Fix recipesorter complaining
2016-05-18 21:36:57 -05:00
Vincent Lee 8fb3b886a8 Get rid of all the nullable-nonnull stuff, warning huge diff 2016-05-18 21:03:12 -05:00
yrsegal 3c159e2485 Fix recipesorter complaining
Closes #269
2016-05-18 21:01:09 -04:00
Vincent Lee bdf51cbc8b Move IManaCollisionGhost to blocks. Closes #280 2016-05-18 19:16:51 -05:00
Vincent Lee 056f46b1f8 Update to 1.9.4 - untested waiting on baubles 2016-05-18 15:22:35 -05:00
Vincent Lee a59ee11da4 Build 305 2016-05-18 14:14:07 -05:00
Vincent Lee 9b06371a4e Fix dirt path and spreader binding. Closes #279 2016-05-18 11:31:12 -05:00
Vincent Lee afb3f6f44b Fix lexicon model i accidentally broke 2016-05-18 11:22:13 -05:00
Vincent Lee 1deb617f72 Fix GOG sound #285 2016-05-18 11:13:38 -05:00
Jonathan Smith 5495271fa2 Merge pull request #1849 from NatsuArashi/patch-3
Update zh_TW.lang
2016-05-18 10:49:15 +01:00
NatsuArashi 588a02f385 Update zh_TW.lang
*部分日本語使用原文
2016-05-18 17:39:27 +08:00
Vincent Lee b1fad332b8 Fix terraaxe icon when inactive, closes #281 2016-05-15 21:51:24 -05:00
Vincent Lee df478b0ff8 Fix picking root block giving bad item. Closes #282 2016-05-15 21:25:54 -05:00
Vincent Lee 68560a335e Minor cleanup 2016-05-13 22:47:18 -05:00
Vincent Lee 13905a174c Fix smoke particles 2016-05-13 00:08:35 -05:00
Vincent Lee ef0f31f2de Some probably useless optimizations 2016-05-12 20:02:57 -05:00
Vincent Lee 1d7a402c6e Optimize itemfinder heavily 2016-05-12 19:45:51 -05:00
Vincent Lee b0fad5db16 Fix hopperhock being broken with vanilla chests 2016-05-12 17:51:58 -05:00
Vincent Lee 481eb5e711 Serverside many subtiles 2016-05-12 17:38:25 -05:00
Vincent Lee 1e26be3c77 Weaken boss collection 2016-05-12 16:30:01 -05:00
Vincent Lee a2d8aa17d2 Fix petal burying #274 2016-05-12 14:47:29 -05:00
Vincent Lee ebc6f1a8c6 Loonium now can be set to a custom loot table. For mapmakers 2016-05-11 19:27:15 -05:00
Vincent Lee 6a5e37b632 Update forge, fully fix loot generation 2016-05-11 11:50:06 -05:00
Vincent Lee 6b55f97a44 Build 304 2016-05-10 23:24:27 -05:00
Vincent Lee ae71a4756c I messed that up >.>. Fix server crash on startup #272 2016-05-10 23:21:38 -05:00
Vincent Lee bf0712a75c Build 302 2016-05-10 23:18:46 -05:00
Vincent Lee 79e2ee7c0a Shim in loot table to suppress errors in public build 2016-05-10 19:54:09 -05:00
Vincent Lee fb7fda6996 Update versionchecker links 2016-05-10 19:39:02 -05:00
Vincent Lee c944512519 Fix pump rendering, pool cart rendering. Made pool cart spawn particles 2016-05-10 19:11:18 -05:00
Vincent Lee dc8104f68b Preliminary work on new loot system 2016-05-10 11:55:50 -05:00
Vincent Lee 46417330a4 Fix #266 log spam 2016-05-07 22:32:09 -05:00
Vincent Lee 2f292ed3be Fix #271 incense rendering 2016-05-07 22:29:46 -05:00
Vincent Lee 4231dc839f Add reverse petal block recipes 2016-05-07 11:56:57 -05:00
Vincent Lee be1eb570ef More minor cleaning 2016-05-06 23:50:00 -05:00
Vincent Lee d524a0b2e9 Fold a couple interfaces together, we have way too many .-. 2016-05-06 23:39:33 -05:00
Vincent Lee afc5f93b55 Fix #265 2016-05-06 22:38:07 -05:00
Vincent Lee 072f13d3db Update JEI and add support for recipe category crafting items 2016-05-06 22:24:15 -05:00
Vincent Lee 5e11fe6e06 Removed model registration for last commit 2016-05-06 19:34:33 -05:00
Vincent Lee a3abfb6aad Removed buried petals and mana flash item forms. Closes #268 2016-05-06 19:30:58 -05:00
Vincent Lee c0c1db1aa7 Fix #267 2016-05-06 19:11:33 -05:00
Vincent Lee e99d5dff63 Update to recommended forge, removed useless synchronization in ManaNetworkHandler 2016-05-06 18:49:11 -05:00
Vincent Lee 1b144e6b58 Fix #264 2016-05-04 19:32:33 -05:00
Vincent Lee 7dcd0281b8 Actually commit new zip 2016-05-04 18:58:15 -05:00
Vincent Lee 2d412ac70f Various cleanups, updated alt textures to 1.9 2016-05-04 18:38:09 -05:00
Vincent Lee a0d251fafd Update forge and close #245 2016-05-03 12:38:52 -05:00
Vincent Lee f24409f336 Add workarounds for the silly forge light bug. Closes #221, probably closes #251 as well 2016-05-03 11:31:59 -05:00
Vincent Lee 7a66a9756b Revert stupid find replace hit 2016-05-02 22:08:10 -05:00
Vincent Lee a802650289 Merge branch 'derpbranch' into MC19 2016-05-02 22:06:29 -05:00
Vincent Lee 130c67e758 Fully serverside gaia guardian, buff it a bit 2016-05-02 22:05:35 -05:00
Vincent Lee d0e2f474bc Resync hourglass whenever it flips, hopefully helps with desyncs 2016-05-02 20:14:46 -05:00
Vincent Lee 6889afc34e Delete old models 2016-05-02 19:59:08 -05:00
Vincent Lee bb152907a7 Fix TESR item transforms 2016-05-02 19:45:30 -05:00
Vincent Lee 3996c5d078 Guard against null chunk in packethandler 2016-05-02 19:24:13 -05:00
Vincent Lee 8f4f63453a Move nonfabulous pools into static renderer. Yay performance improvements! 2016-05-02 19:20:31 -05:00
Vincent Lee 725ae1cef1 Fix crystal cube, closes #253 2016-05-02 08:34:30 -05:00
Vincent Lee 93656a9d43 Fix+tweak paint lens particles 2016-05-01 22:43:33 -05:00
Vincent Lee 96a1db97a9 Serverside TilePool 2016-05-01 22:03:58 -05:00
Vincent Lee a339397fcc Some network boilerplate 2016-05-01 21:25:30 -05:00
Vincent Lee e37255a997 Make platform disappear with managlass, and fix version checker 2016-05-01 11:42:40 -05:00
Vincent Lee 95427b1c9d Fix missing texture on fungal apothecary 2016-04-30 14:03:09 -05:00
Vincent Lee 4a6bf0ed0d Fix incorrect horn sound. Closes #257 2016-04-30 13:26:05 -05:00
Vincent Lee b6827ca04e Remove new cooldown from signal flare, remove redundant check from fire/rainbowrod 2016-04-29 08:15:54 -05:00
Vincent Lee 45df392cce Close #259 2016-04-28 23:37:20 -05:00
Vincent Lee abf5d9672b Make some items use new cooldowns, closes #261 2016-04-28 23:34:40 -05:00
Vincent Lee dc35d395cf Some balance changes 2016-04-27 19:26:56 -05:00
Vincent Lee fca4e2bfa8 Properly check kekimurus. Closes #255 2016-04-27 17:23:00 -05:00
Vincent Lee 543b5a1958 Guard against null item stacks in OD -.-. Closes #254 2016-04-27 17:20:18 -05:00
Vincent Lee f8d18ae769 All other sound subtitles 2016-04-23 22:03:27 -05:00
Vincent Lee 6d350451fc Some sound subtitles 2016-04-23 21:05:11 -05:00
Vincent Lee 5d1829a00e Camo block now respects directional blocks. Closes #110 2016-04-23 18:44:32 -05:00
Vincent Lee 16f6289844 Fix dupe dropping with psi. Closes #250 2016-04-23 16:02:02 -05:00
Vasco Lavos da11e497fc Update contributors.properties 2016-04-22 02:41:54 +01:00
Vincent Lee be155e0abb Tweak lexicon hud, closes #241 2016-04-20 19:47:48 -05:00
Vincent Lee 2ad607bff3 Show all buffs on first row 2016-04-20 19:39:24 -05:00
Wire Segal b090622477 Add a ManaUpgradeRecipe. (#218)
third pr for recipes, yay
2016-04-17 22:07:41 -05:00
Vincent Lee af5e9f7751 Fix grisaia crash. Closes #242 2016-04-17 21:28:27 -05:00
Vincent Lee b32f834a73 Go back to meta for now, should close #183 2016-04-17 20:53:12 -05:00
Vincent Lee d34e3453fe Fix bow not being able to fire, Closes #238 2016-04-17 20:49:27 -05:00
Vincent Lee 5d5109d6d1 Fix some items not being colored. Closes #240 2016-04-17 20:41:51 -05:00
Vincent Lee a838427df8 Finalized migration mechanisms 2016-04-17 20:32:17 -05:00
Vincent Lee 55262cd4e5 Update nag message, add migration recipes for everything 2016-04-17 20:03:31 -05:00
Vincent Lee de0ba4ada9 Revert "Upload remapping code for troubleshooting"
This reverts commit 9309355af2.
2016-04-17 12:00:49 -05:00
Vincent Lee 5bf1c26ffb Make some conditionals smarter 2016-04-17 00:35:09 -05:00
Vincent Lee dd300ea32f Convert gaia guardian to loot tables and fix gg music 2016-04-17 00:31:47 -05:00
Vincent Lee b7fead0e4d Initial stuff 2016-04-16 17:34:17 -05:00
Vincent Lee 905a372708 Add remap for full slabs 2016-04-15 20:06:44 -05:00
Vincent Lee 9309355af2 Upload remapping code for troubleshooting 2016-04-15 19:24:36 -05:00
Vincent Lee 910dfc25db Fix derp 2016-04-15 10:17:39 -05:00
Vincent Lee 0ad2a4f218 Fix boss bar rendering, music still not playing 2016-04-15 10:16:46 -05:00
Vincent Lee b479284760 Fix throwables 2016-04-14 23:00:55 -05:00
Vincent Lee 0a396b0d82 Full optimize imports 2016-04-14 22:49:49 -05:00
Vincent Lee 3f85ca5805 Remove isFull3D as it's no longer used for anything 2016-04-14 22:45:31 -05:00
Vincent Lee 9f60ac59fa Remove old flugel code. This is what git is for :P 2016-04-14 22:42:46 -05:00
Vincent Lee f01b8a1fa9 Prevent paint lens from painting blocks illegal colors 2016-04-14 22:39:26 -05:00
Vincent Lee 8c3d1bde14 Tweak equip sounds, boost thundercaller's attack speed 2016-04-14 22:37:26 -05:00
Vincent Lee a782017852 Remove old remappers 2016-04-14 22:21:55 -05:00
Vincent Lee b9fcf9bd53 Modernize ice pendant. Now acts like frost walker VIII and doesn't require player to be touching ground 2016-04-14 22:18:37 -05:00
Vincent Lee 391eea0416 Minor optimization in jaded ama, closes #186 kinda maybe 2016-04-14 22:05:09 -05:00
Vincent Lee a4279647fa Tweak previous pr 2016-04-14 22:02:40 -05:00
Wire Segal 9e82e5357a Armor keeps enchantments when crafted (#213)
* Armor keeps enchantments when crafted

Closes #209

* Copy runic shielding as well
2016-04-14 21:59:36 -05:00
Vincent Lee d33590f7ca Fix bounding box issue causing bindings to fail. Closes #234 2016-04-14 21:39:43 -05:00
Vincent Lee 45dda5f19c Fix vine balls and tweak slightly 2016-04-14 00:23:29 -05:00
Vincent Lee be9fba512b Fix stair json weirdness 2016-04-13 17:30:26 -05:00
Vincent Lee f219836f81 update canBlockRenderInLayer 2016-04-13 16:20:38 -05:00
Vincent Lee 2c75af2359 Build 301 2016-04-13 10:09:30 -05:00
Vincent Lee 86b6962f94 Minor optimization in MathHelper, cleanup for rel 2016-04-13 09:57:17 -05:00
Vincent Lee 26831d3e98 Tweaks to heisei dream inner workings 2016-04-13 09:48:29 -05:00
Vincent Lee a6c2631946 Cleanup prev commit 2016-04-12 13:47:18 -05:00
Vincent Lee 7a36e543ad Experiemntally convert mana network to using sets 2016-04-12 12:28:58 -05:00
Vincent Lee 649dffcf71 Moar cleanups! 2016-04-12 01:32:49 -05:00
Vincent Lee b3ee6dcf7a More cleanup, brews now average their potion colors instead picking the first 2016-04-12 00:51:09 -05:00
Vincent Lee 69cbecb521 More cleanup, Full pool for JEI handlers 2016-04-11 23:22:02 -05:00
Vincent Lee effd07129c A round of FindBugs, and fix red interceptor not working at all 2016-04-11 22:47:24 -05:00
Vincent Lee e73feae688 Tweak horse inv dropping again 2016-04-11 21:44:30 -05:00
Vincent Lee cee7a965a5 Tweak horse inv dropping 2016-04-11 21:17:42 -05:00
Vincent Lee 07f3099071 Force relay tweaks, hopefully resolves #232 2016-04-11 20:55:11 -05:00
Vincent Lee 70cc32a839 Add RenderFull NBT tag override to pools. Closes #228 2016-04-11 20:18:41 -05:00
Vincent Lee 50eeb06bf6 Remove useless line. Make horse drop all items when being virused, closes #189 2016-04-11 19:43:18 -05:00
Vincent Lee d97b2ceb1d Fix pool's north wall being slightly taller, Fix pump item model 2016-04-09 22:43:50 -05:00
Vincent Lee 209970b60c Fix bauble box gui. Closes #185 2016-04-09 21:37:41 -05:00
Vincent Lee 5cdf48393a Fix top half of double flowers not sparkling with correct color. Also disable random offsetting because it's broken 2016-04-09 21:25:41 -05:00
Vincent Lee 533a287bd3 Allow vanilla flowers to be ground directly into powder. Closes #215 2016-04-09 21:03:51 -05:00
Vincent Lee 7c61b1b9d3 Misc cleanup, fix hud catalyst, test gpg sign 2016-04-09 20:26:04 -05:00
Vincent Lee 4a9c269a67 Clean up terra firma rod code 2016-04-08 13:24:44 -05:00
Vincent Lee 1a7e128ae5 Merge pull request #224 from yrsegal/19FixTerraformRod
Fix the Rod of the Terra Firma not working
2016-04-08 12:59:00 -05:00
Vincent Lee be09676053 Use == 2016-04-08 12:37:13 -05:00
Vincent Lee 11d327dcce Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-04-08 12:32:59 -05:00
Vincent Lee 5df661bf28 Merge pull request #227 from yrsegal/Catalysts
Catalysts can accept any catalyst BlockState.
2016-04-08 12:32:41 -05:00
yrsegal fa8c12d6fc Catalysts can accept any catalyst BlockState.
This constitutes a major, but not breaking, API update. All catalyst
methods previously in RecipeManaInfusion have been deprecated.
2016-04-07 21:50:28 -04:00
Jonathan Smith 3fb76acf57 Merge pull request #1835 from elbo2525/master
Update ja_JP.lang
2016-04-07 09:42:02 +01:00
elbo2525 2471642df7 Update ja_JP.lang 2016-04-07 15:53:52 +09:00
yrsegal 39a44642e4 Fix the Rod of the Terra Firma not working
Closes #191
2016-04-06 18:58:39 -04:00
Vincent Lee bcecfb9148 Merge pull request #222 from yrsegal/19FixMunchdew
Fix munchdew not working
2016-04-06 17:43:06 -05:00
yrsegal 1f11359b23 Fix munchdew not working
Closes #220
2016-04-06 18:14:07 -04:00
Vincent Lee 4ec22a0417 Merge upstream 2016-04-06 09:51:50 -05:00
Vincent Lee 8a6189cbd2 Fix mana tablet rendering 2016-04-06 09:48:28 -05:00
Vincent Lee 796d231867 Fix wall digging textures 2016-04-05 13:20:37 -05:00
Vincent Lee fb0a414443 Rename build to fix stupid issues 2016-04-05 08:51:10 -05:00
Vincent Lee ae57ace7e8 Fix spreader item model, misc fixes, update forge to 1841 so all interact events are back 2016-04-04 21:03:12 -05:00
Vincent Lee f011be3571 Switch last commit to shaders. Thanks PaleoCrafter! 2016-04-04 13:32:36 -05:00
Vincent Lee 109d045a4d Fix ugly multiblock rendering 2016-04-04 13:09:02 -05:00
Vincent Lee 32fb1bcf6d Fix contributor renders. Closes #200 2016-04-04 09:47:02 -05:00
Vincent Lee 529c41407f Allow mana guns to be dual wielded 2016-04-04 09:30:52 -05:00
Vincent Lee ea6484211b API cleanups 2016-04-03 23:26:20 -05:00
Vincent Lee 53ce019cf5 Various misc cleanups 2016-04-03 23:07:24 -05:00
Vincent Lee eec7c8ba59 Fix missing center model for panes. Closes #208 2016-04-03 21:25:55 -05:00
Vincent Lee c07febc67d Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-04-03 21:23:18 -05:00
Vincent Lee 08550cc442 Cleanup 2016-04-03 21:23:04 -05:00
Vincent Lee 82fa306a5c Merge pull request #207 from yrsegal/19Patch
Fix invalid color combination
2016-04-03 21:03:21 -05:00
yrsegal 63a5bdee1c Fix invalid color combination 2016-04-03 21:54:36 -04:00
Vincent Lee f8157f1222 Fix erratic colorization of bursts and flashes
Fix erratic colorization of bursts and flashes
2016-04-03 20:50:14 -05:00
yrsegal 7536ebe4c6 Fix erratic colorization of bursts and flashes
closes #198
2016-04-03 21:38:42 -04:00
Vincent Lee af19c7cece Update kekimurus for extra slice of cake in 1.8 2016-04-03 20:23:05 -05:00
Vincent Lee 43395f9441 Fix walls appearing in vanilla creative tab. Closes #190 2016-04-03 20:08:58 -05:00
Vincent Lee 97495a913d Cleanup walls 2016-04-03 19:59:58 -05:00
Vincent Lee 1d901ec9ac Fix panes. Closes #204 2016-04-03 19:39:05 -05:00
Vincent Lee 62b39ee682 Fix crash serverside. Closes #197 2016-04-03 19:00:20 -05:00
Vincent Lee 759bf2835d Merge branch 'MC19' of github.com:williewillus/Botania into MC19 2016-04-03 18:47:57 -05:00
Vincent Lee 69db133091 Update forge 2016-04-03 18:47:31 -05:00
Wire Segal 5ceceec6bb Various minor fixes
* Fix Lexicon crashing with invalid version format

Closes #192

* Fix crashing on damage taken

Closes #196

* Fix attributes being too present/wrong values

Closes #194
2016-04-03 17:01:24 -05:00
Vasco Lavos e122e5252c Update contributors.properties 2016-04-02 21:39:55 +01:00
Vincent Lee 5f3172bd5d Cleanup, fix soulscribe holding 2016-04-01 16:51:30 -05:00
Vincent Lee 79c8e3d695 various miscellaneous fixes 2016-03-31 01:09:46 -05:00
Vincent Lee f5b435bf24 Model cleanup 2016-03-30 23:26:06 -05:00
Vincent Lee b6d607b553 Bow tweaks 2016-03-27 14:07:27 -05:00
Vincent Lee d411fac65c Half fix floating flowers 2016-03-27 13:35:12 -05:00
Vincent Lee 9bc724d6fd Fix flower models 2016-03-27 12:45:48 -05:00
Vincent Lee bcd00dbba3 Update JEI, more overrides 2016-03-27 12:05:19 -05:00
Vincent Lee c8531fde67 Update forge, some more model overrides 2016-03-27 00:30:45 -05:00
Vincent Lee 4771ec5bdb Some item overrides, fix bow firing 2016-03-24 14:41:10 -05:00
Vincent Lee ecb0f8a4be Fix bow models 2016-03-24 13:47:58 -05:00
Vincent Lee ab618923df Fix some methodhandles 2016-03-24 13:01:07 -05:00
Vincent Lee 674ba5c19d Fix somde models 2016-03-24 12:30:14 -05:00
Vincent Lee 1b87160ef6 Register the potions 2016-03-24 09:45:56 -05:00
Vincent Lee ec419edfe3 Fix sounds 2016-03-24 09:13:15 -05:00
Vincent Lee 5b9a5bf480 Update most reflection names 2016-03-24 00:02:36 -05:00
Vincent Lee 1b79575648 Fix other models 2016-03-23 23:47:06 -05:00
Vincent Lee 0ba32450cf Fix stairs 2016-03-23 23:31:08 -05:00
Vincent Lee 400f6583ad Fix item models 2016-03-23 23:10:22 -05:00
Vincent Lee 365bed04c0 Flowers not working 2016-03-23 22:10:38 -05:00
Vincent Lee 3e79893a35 Barely runs 2016-03-23 21:34:19 -05:00
Vincent Lee d37518c9f4 Compiles. Update JEI. 2016-03-19 15:58:12 -05:00
Vincent Lee 0af2d25a71 Misc fixes, fix baked models 2016-03-19 11:38:16 -05:00
Vincent Lee 268a8afda5 Most TE's 2016-03-19 09:59:45 -05:00
Vincent Lee 5cc6879ecb Lots of blocks 2016-03-18 23:08:49 -05:00
Vincent Lee a268149d73 Misc rendering 2016-03-18 20:42:43 -05:00
Vincent Lee fe16702db4 Brews and potions 2016-03-18 20:26:53 -05:00
Vincent Lee c23b9dcaee Some blocks 2016-03-18 20:20:23 -05:00
Vincent Lee 663c797cf3 More items 2016-03-18 20:01:50 -05:00
Vincent Lee 3852282598 Missed two 2016-03-18 19:03:35 -05:00
Vincent Lee 3dd877e69a Color handling 2016-03-18 18:59:23 -05:00
Vincent Lee 1c608d4636 A lot of items. Rods, and lenses. 2016-03-18 16:51:21 -05:00
Vincent Lee cfbf2cc538 Entities 2016-03-18 14:47:38 -05:00
Vincent Lee 017829927f Some blocks 2016-03-18 13:26:42 -05:00
Vincent Lee 644d6553d1 Large amounts of stuff in client 2016-03-18 13:17:33 -05:00
Vincent Lee 58e06ae86b Most of API 2016-03-18 12:30:10 -05:00
Vincent Lee 3bb203e371 More rename substitutions 2016-03-18 11:07:42 -05:00
Vincent Lee 5821ede5e6 Lots of name substitutions 2016-03-18 10:42:42 -05:00
Vincent Lee 316363d729 Remove redundant check on jaded amaranthus 2016-03-18 00:02:40 -05:00
Vasco Lavos 66a5c5e578 Merge pull request #1828 from yrsegal/master
Add a color function to the RenderTileFloatingFlower
2016-03-18 02:05:07 +00:00
wiiv fcb394bba3 Better textures. (Take 1) 2016-03-18 01:47:56 +00:00
yrsegal e174144937 Add a color function to the RenderTileFloatingFlower
Derivative classes can use it (allows for rainbow floating flowers)
2016-03-17 21:26:39 -04:00
Vincent Lee 6622ec5270 Removeold potion handlers 2016-03-16 22:54:47 -05:00
Vincent Lee f86f42b895 Fix infinite potion spam with sponge 2016-03-14 15:40:49 -05:00
Vincent Lee b9b7a4e07d Finish waterbowl fancification 2016-03-14 13:37:10 -05:00
Vincent Lee 199243c120 waterbowl fancification attempt 2016-03-14 12:46:29 -05:00
Vincent Lee 4b056375d4 Fix pump trying to animate serverside. Closes #181 2016-03-13 12:30:12 -05:00
Vincent Lee 8e550e36d2 Revert "Fix particles being culled at render distance. Closes #15"
This reverts commit 9a756ef79e.
2016-03-13 12:26:21 -05:00
Vincent Lee 9a756ef79e Fix particles being culled at render distance. Closes #15 2016-03-12 21:12:09 -06:00
Vincent Lee bead93c653 Minor memory optimization, fix JEI integration for magical flowers 2016-03-12 20:48:48 -06:00
Vincent Lee e2596f4511 Fix red string comparator not binding, closes #179 2016-03-12 20:39:07 -06:00
Vincent Lee ec1cc498ce Build 299 2016-03-12 20:38:49 -06:00
Vincent Lee 8f67094377 Tweak nag and version checker 2016-03-12 16:50:28 -06:00
Vincent Lee 2172d78dd2 Disable the background downloader for now, at least til we get a file server 2016-03-12 16:36:44 -06:00
Vincent Lee 099c02157e Update buildscript and update checker 2016-03-12 16:26:59 -06:00
Vincent Lee 3cc7099ab2 Fix itemfinder crash. Closes #176 2016-03-12 14:48:45 -06:00
Vincent Lee f1403a4577 Fix terra pick mass harvesting. closes #175 2016-03-12 13:27:47 -06:00
Vincent Lee 64e1282444 Done! 2016-03-12 00:59:11 -06:00
Vincent Lee 949fdde057 Made the old model not render in 1p 2016-03-12 00:51:34 -06:00
Vincent Lee e031b3b52c In working state 2016-03-12 00:23:51 -06:00
Vincent Lee 55c2a522ee Preliminary 3d lexicon 2016-03-11 23:22:38 -06:00
Vincent Lee cf7f10d082 Fix the pump textures 2016-03-11 22:02:45 -06:00
Vasco Lavos 19e226780d memes 2016-03-12 00:43:33 +00:00
Vincent Lee 8909b26e99 Update buildscript 2016-03-11 16:04:31 -06:00
Vincent Lee 3534a6cc5f Close #174 2016-03-11 13:14:42 -06:00
Vincent Lee 95f8cc529f Fix dark quartz slab model 2016-03-11 09:38:08 -06:00
Vincent Lee 4c1b15b336 nullcheck spark item. Closes #173 2016-03-09 20:50:58 -06:00
Vincent Lee 4bad74dbfd Workaround for a jei integration problem, closes #172 2016-03-09 20:27:55 -06:00
Vincent Lee f5b71f9db1 Possible fixes for #171 2016-03-09 15:44:14 -06:00
Vincent Lee 769528ceed Fix prism not resyncing when being automated 2016-03-09 09:56:30 -06:00
Vincent Lee 84e38b5a32 Fix nonssmooth turntable animation. Closes #169 2016-03-09 09:35:45 -06:00
Vincent Lee 3a9f0b346e Fix inverted redstone conditions in prism. Closes #167 2016-03-08 22:44:31 -06:00
Vincent Lee 3097dde357 Restore storage drawers compat, closes #166 2016-03-08 10:57:19 -06:00
Vincent Lee e25cf207a6 Let rabbits spawn from cocoon of cparice 2016-03-07 20:46:05 -06:00
Vincent Lee c74e77d9fc Fix corporea index stars being too bright 2016-03-07 20:44:22 -06:00
Vincent Lee c105b606c4 Moar capability fixes. Closes #165 2016-03-07 20:26:52 -06:00
Vincent Lee 93174616c7 Fall back to null sided cap 2016-03-07 14:01:13 -06:00
Vincent Lee 63f160b78b A reference <3 2016-03-07 13:40:08 -06:00
Vincent Lee bb89013f1e According to lexicon sparks only read from top of inventory 2016-03-07 13:36:27 -06:00
Vincent Lee 1229141b2f Fix sparks not being colored by network 2016-03-07 13:20:49 -06:00
Vincent Lee 9f1a2b8a7d Retrofit corporea to work with capabilities 2016-03-07 13:09:59 -06:00
Vincent Lee cda20175c8 Fix derp when removing workaround. closes #161, #162, #163 2016-03-07 09:40:02 -06:00
Vincent Lee 46ec4b8127 Tweak guard in shedding config. Closes #153 2016-03-06 17:50:55 -06:00
Jonathan Smith 6f6cdf8198 Merge pull request #1823 from NatsuArashi/patch-2
Update zh_TW.lang
2016-03-03 11:58:48 +00:00
NatsuArashi 132584e937 Update zh_TW.lang 2016-03-03 18:10:04 +08:00
1373 changed files with 21295 additions and 27527 deletions

No files matched your search

Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 1,
"pack_format": 2,
"description": "Alternate Botania textures by Futureazoo"
}
}
+45 -22
View File
@@ -1,3 +1,6 @@
import groovy.json.JsonSlurper
import groovy.json.JsonOutput
buildscript {
repositories {
mavenCentral()
@@ -11,12 +14,13 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
classpath 'com.matthewprenger:CurseGradle:1.0-SNAPSHOT'
}
}
repositories {
mavenCentral()
maven {
name = "chickenbones"
url = "http://chickenbones.net/maven/"
@@ -42,7 +46,7 @@ minecraft {
version = "${config.mc_version}-${config.forge_version}"
runDir = "eclipse/assets"
mappings = "snapshot_20151229"
mappings = "snapshot_20160518"
//This, does the token replacement.
//Though, I reccomend this to be replaced with a token such as @VERSION@
replace 'GRADLE:BUILD', config.build_number
@@ -53,9 +57,6 @@ minecraft {
}
//This here is for SCP
repositories {
mavenCentral()
}
configurations {
sshAntTask
}
@@ -66,11 +67,7 @@ dependencies {
compile files(
'Baubles-deobf.jar'
)
//compile "codechicken:CodeChickenLib:1.8-1.1.2.139:dev"
//compile "codechicken:CodeChickenCore:1.8-1.0.5.36:dev"
//compile "codechicken:NotEnoughItems:1.8-1.0.5.104:dev"
//compile "codechicken:ForgeMultipart:1.7.10-1.1.1.320:dev"
deobfCompile "mezz.jei:jei_1.8.9:2.25.7.145"
deobfCompile "mezz.jei:jei_1.9.4:3.6.7.216"
//and a bit more for SCP
sshAntTask "org.apache.ant:ant-jsch:1.7.1", "jsch:jsch:0.1.29"
@@ -81,6 +78,9 @@ compileJava {
targetCompatibility = 1.8
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
processResources {
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
@@ -101,7 +101,7 @@ processResources {
*/
task deobfJar(type: Jar) {
from(sourceSets.main.output)
archiveName = "${baseName} ${version}-deobf.${extension}"
archiveName = "${baseName}.${version}-deobf.${extension}"
}
artifacts {
@@ -110,16 +110,39 @@ artifacts {
/**
* Increments the buildnumber in your config file, and saves it
*/
task incrementBuildNumber(dependsOn: 'reobf') << {
task incrementBuildNumber(dependsOn: 'reobfJar') << {
config.build_number = (config.build_number.toString().toInteger()) + 1
configFile.withWriter {
config.toProperties().store(it, "")
}
// todo make this flexibile - collection of supported mc versions
file('web/versions.ini').append("\n${version}=${minecraft.version}")
file('web/versions.ini').append("\n${version}=1.10.2")
file("${config.dir_repo}/version/${minecraft.version}.txt").write("${version}")
file("${config.dir_repo}/version/1.10.2.txt").write("${version}")
def updateJsonFile = file('version/update.json')
def updateJson = new JsonSlurper().parse(updateJsonFile) as Map
// todo detect if the mcversion is absent
// Add to version section
updateJson."${minecraft.version}"."${version}" = "See https://github.com/williewillus/Botania/releases/${version}"
updateJson."1.10.2"."${version}" = "See https://github.com/williewillus/Botania/releases/${version}"
// Update promos
updateJson.promos."${minecraft.version}-latest" = "${version}"
updateJson.promos."${minecraft.version}-recommended" = "${version}"
updateJson.promos."1.10.2-latest" = "${version}"
updateJson.promos."1.10.2-recommended" = "${version}"
updateJsonFile.write(JsonOutput.prettyPrint(JsonOutput.toJson(updateJson)))
}
/* Unused - Forgecraft and web server stuff
// I have no idea what I'm doing
task wtfGradle2(type: Copy) {
from(jar.destinationDir)
@@ -157,9 +180,7 @@ task sort(type: Delete) {
delete "${config.dir_output}/${deobfJar.archiveName}", "${config.dir_output}/wtf"
}
/**
* This is the upload task from the build.xml
*/
// This is the upload task from the build.xml
task upload() << {
scp('/files') {
fileset(file: jar.archivePath)
@@ -175,9 +196,7 @@ task upload() << {
}
}
/**
* This is deply_web task
*/
// This is deploy_web task
task deployWeb << {
scp('/') {
fileset(dir: 'web') //everything from the web directory
@@ -205,6 +224,7 @@ def scp(String dir, Closure antFileset = {}) {
}
}
}
*/
def parseConfig(File config) {
config.withReader {
@@ -216,21 +236,24 @@ def parseConfig(File config) {
jar {
//rename the default output, for some better... sanity with scipts
archiveName = "${baseName} ${version}.${extension}"
archiveName = "${baseName}-unofficial.${version}.${extension}"
}
curseforge {
apiKey = priv.cfkey
project {
id = "225643"
id = "241973"
changelog = """
See http://botaniamod.net/changelog.php#${version}
See https://github.com/williewillus/Botania/releases/tag/${version}
"""
releaseType = "release"
addGameVersion '1.9.4'
addGameVersion '1.10.2'
relations {
requiredLibrary 'baubles'
}
}
}
defaultTasks 'clean', 'build', 'sort', 'forgecraft', 'incrementBuildNumber', 'curse', 'upload'
//defaultTasks 'clean', 'build', 'sort', 'forgecraft', 'incrementBuildNumber', 'curse', 'upload'
defaultTasks 'clean', 'build', 'incrementBuildNumber', 'curseforge'
+4 -4
View File
@@ -1,9 +1,9 @@
#
#Thu Feb 25 19:50:43 GMT 2016
#Wed Jun 29 20:26:39 CDT 2016
version=r1.8
dir_output=../Build Output/Botania/
forge_version=11.15.1.1763
mc_version=1.8.9
forge_version=12.17.0.1965
mc_version=1.9.4
dir_repo=./
build_number=250
build_number=313
mod_name=Botania
+2
View File
@@ -55,3 +55,5 @@ gryphonn=11
loraanicus=10
samerater=8
coolcabbage16=13
eladkay=3
tobiasling=9
+2 -2
View File
@@ -1,6 +1,6 @@
#Mon Sep 14 12:28:28 PDT 2015
#Sat May 28 11:56:22 CDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-all.zip
@@ -12,7 +12,7 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public final class BuildCraftAPI {
@@ -10,11 +10,13 @@ import java.util.Random;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nonnull;
/** Use minecraft's EnumDyeColor in as many places as possible. */
@Deprecated
public enum EnumColor implements IStringSerializable {
@@ -111,13 +113,14 @@ public enum EnumColor implements IStringSerializable {
return name().replace("_", ".").toLowerCase(Locale.ENGLISH);
}
@Nonnull
@Override
public String getName() {
return NAMES[ordinal()];
}
public String getLocalizedName() {
return StatCollector.translateToLocal(getTag());
return I18n.translateToLocal(getTag());
}
public String getDye() {
@@ -4,7 +4,7 @@
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
package buildcraft.api.core;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
/** To be implemented by TileEntities able to provide a square area on the world, typically BuildCraft markers. */
public interface IAreaProvider {
+2 -1
View File
@@ -4,7 +4,8 @@
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
package buildcraft.api.core;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
public interface IBox extends IZone {
IBox expand(int amount);
@@ -2,7 +2,7 @@ package buildcraft.api.core;
import java.util.List;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
/** To be implemented by TileEntities able to provide a path on the world, typically BuildCraft path markers. */
public interface IPathProvider {
@@ -4,7 +4,7 @@
* should be located as "LICENSE.API" in the BuildCraft source code distribution. */
package buildcraft.api.core;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IWorldProperty {
+5 -5
View File
@@ -6,12 +6,12 @@ package buildcraft.api.core;
import java.util.Random;
import net.minecraft.util.BlockPos;
import net.minecraft.util.Vec3;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
public interface IZone {
/** Returns the smallest possible distance that the index would have to be changed by in order for
* {@link #contains(Vec3)} to return true. If the position is already inside then this will return 0 */
* {@link #contains(Vec3d)} to return true. If the position is already inside then this will return 0 */
double distanceTo(BlockPos index);
/** Returns {@link #distanceTo(BlockPos)} but squared. Usually this will be quicker to calculate. */
@@ -19,8 +19,8 @@ public interface IZone {
/** Returns true if the point is enclosed by this zone, such that none of the coordinates lie outside the range
* specified by this zone. */
boolean contains(Vec3 point);
boolean contains(Vec3d point);
/** Gets a random position that {@link #contains(Vec3)} will return true. */
/** Gets a random position that {@link #contains(Vec3d)} will return true. */
BlockPos getRandomBlockPos(Random rand);
}
@@ -9,6 +9,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
/** This class is used whenever stacks needs to be stored as keys. */
@@ -80,7 +81,7 @@ public final class StackKey {
}
}
if (fluidStack != null) {
if (fluidStack.getFluid().getID() != k.fluidStack.getFluid().getID() || fluidStack.amount != k.fluidStack.amount || !objectsEqual(
if (fluidStack.getFluid() != k.fluidStack.getFluid() || fluidStack.amount != k.fluidStack.amount || !objectsEqual(
fluidStack.tag, k.fluidStack.tag)) {
return false;
}
@@ -98,7 +99,7 @@ public final class StackKey {
}
result = 31 * result + 7;
if (fluidStack != null) {
result = 31 * result + fluidStack.getFluid().getID();
result = 31 * result + FluidRegistry.getFluidID(fluidStack.getFluid());
result = 31 * result + fluidStack.amount;
result = 31 * result + objectHashCode(fluidStack.tag);
}
@@ -4,8 +4,8 @@
* of the license located in http://www.mod-buildcraft.com/MMPL-1.0.txt */
package buildcraft.api.core.render;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
/* This interface designates a block as a state machine responsible for culling For implementation details look into
@@ -1,7 +1,7 @@
package buildcraft.api.transport;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
@@ -6,7 +6,7 @@ package buildcraft.api.transport;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
@@ -6,7 +6,7 @@ import com.google.common.collect.Maps;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
@@ -11,7 +11,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import buildcraft.api.transport.pluggable.PipePluggable;
@@ -5,7 +5,7 @@
package buildcraft.api.transport.pluggable;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -1,6 +1,6 @@
package thaumcraft.api.crafting;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
@@ -2,33 +2,28 @@
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
*
* File Created @ [Jan 14, 2014, 6:15:28 PM (GMT)]
*/
package vazkii.botania.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.google.common.base.Preconditions;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import net.minecraft.block.Block;
import net.minecraft.block.BlockCarpet;
import net.minecraft.block.BlockColored;
import net.minecraft.block.BlockStainedGlass;
import net.minecraft.block.BlockStainedGlassPane;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.init.SoundEvents;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@@ -37,8 +32,10 @@ import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.LoaderState;
import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.api.brew.Brew;
@@ -62,65 +59,72 @@ import vazkii.botania.api.wiki.IWikiProvider;
import vazkii.botania.api.wiki.SimpleWikiProvider;
import vazkii.botania.api.wiki.WikiHooks;
import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;
import net.minecraftforge.fml.common.Loader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
public final class BotaniaAPI {
private static List<LexiconCategory> categories = new ArrayList<>();
private static List<LexiconEntry> allEntries = new ArrayList<>();
private static final List<LexiconCategory> categories = new ArrayList<>();
private static final List<LexiconEntry> allEntries = new ArrayList<>();
public static Map<String, KnowledgeType> knowledgeTypes = new HashMap<>();
public static final Map<String, KnowledgeType> knowledgeTypes = new HashMap<>();
public static Map<String, Brew> brewMap = new LinkedHashMap<>();
public static List<String> disposableBlocks = new ArrayList<>();
public static List<String> semiDisposableBlocks = new ArrayList<>();
public static final Map<String, Brew> brewMap = new LinkedHashMap<>();
public static List<RecipePetals> petalRecipes = new ArrayList<>();
public static List<RecipePureDaisy> pureDaisyRecipes = new ArrayList<>();
public static List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<>();
public static List<RecipeRuneAltar> runeAltarRecipes = new ArrayList<>();
public static List<RecipeElvenTrade> elvenTradeRecipes = new ArrayList<>();
public static List<RecipeBrew> brewRecipes = new ArrayList<>();
public static List<RecipeManaInfusion> miniFlowerRecipes = new ArrayList<>();
public static final List<String> disposableBlocks = new ArrayList<>();
public static final List<String> semiDisposableBlocks = new ArrayList<>();
private static BiMap<String, Class<? extends SubTileEntity>> subTiles = HashBiMap.<String, Class<? extends SubTileEntity>> create();
private static Map<Class<? extends SubTileEntity>, SubTileSignature> subTileSignatures = new HashMap<>();
public static Set<String> subtilesForCreativeMenu = new LinkedHashSet<>();
public static Map<String, String> subTileMods = new HashMap<>();
public static BiMap<String, String> miniFlowers = HashBiMap.<String, String> create();
public static final List<RecipePetals> petalRecipes = new ArrayList<>();
public static final List<RecipePureDaisy> pureDaisyRecipes = new ArrayList<>();
public static final List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<>();
public static final List<RecipeRuneAltar> runeAltarRecipes = new ArrayList<>();
public static final List<RecipeElvenTrade> elvenTradeRecipes = new ArrayList<>();
public static final List<RecipeBrew> brewRecipes = new ArrayList<>();
public static final List<RecipeManaInfusion> miniFlowerRecipes = new ArrayList<>();
public static Map<String, Integer> oreWeights = new HashMap<>();
public static Map<String, Integer> oreWeightsNether = new HashMap<>();
public static Map<Item, Block> seeds = new HashMap<>();
private static final BiMap<String, Class<? extends SubTileEntity>> subTiles = HashBiMap.create();
private static final Map<Class<? extends SubTileEntity>, SubTileSignature> subTileSignatures = new HashMap<>();
public static final Set<String> subtilesForCreativeMenu = new LinkedHashSet<>();
public static final Map<String, String> subTileMods = new HashMap<>();
public static final BiMap<String, String> miniFlowers = HashBiMap.create();
public static Set<Item> looniumBlacklist = new LinkedHashSet<>();
public static Map<Block, PropertyEnum<EnumDyeColor>> paintableBlocks = new LinkedHashMap<>();
public static Set<String> magnetBlacklist = new LinkedHashSet<>();
public static Set<Class<? extends Entity>> gravityRodBlacklist = new LinkedHashSet<>();
public static final Map<String, Integer> oreWeights = new HashMap<>();
public static final Map<String, Integer> oreWeightsNether = new HashMap<>();
public static final Map<Item, Block> seeds = new HashMap<>();
public static final Set<Item> looniumBlacklist = new LinkedHashSet<>();
public static final Map<Block, PropertyEnum<EnumDyeColor>> paintableBlocks = new LinkedHashMap<>();
public static final Set<String> magnetBlacklist = new LinkedHashSet<>();
public static final Set<Class<? extends Entity>> gravityRodBlacklist = new LinkedHashSet<>();
public static ArmorMaterial manasteelArmorMaterial = EnumHelper.addArmorMaterial("MANASTEEL", "manasteel", 16, new int[] { 2, 6, 5, 2 }, 18);
public static ToolMaterial manasteelToolMaterial = EnumHelper.addToolMaterial("MANASTEEL", 3, 300, 6.2F, 2F, 20);
public static final ArmorMaterial manasteelArmorMaterial = EnumHelper.addArmorMaterial("MANASTEEL", "manasteel", 16,
new int[] { 2, 6, 5, 2 }, 18, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0);
public static final ToolMaterial manasteelToolMaterial = EnumHelper.addToolMaterial("MANASTEEL", 3, 300, 6.2F, 2F, 20);
public static ArmorMaterial elementiumArmorMaterial = EnumHelper.addArmorMaterial("B_ELEMENTIUM", "b_elementium", 18, new int[] { 2, 6, 5, 2 }, 18);
public static ToolMaterial elementiumToolMaterial = EnumHelper.addToolMaterial("B_ELEMENTIUM", 3, 720, 6.2F, 2F, 20);
public static final ArmorMaterial elementiumArmorMaterial = EnumHelper.addArmorMaterial("B_ELEMENTIUM", "b_elementium", 18,
new int[] { 2, 6, 5, 2 }, 18, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0);
public static final ToolMaterial elementiumToolMaterial = EnumHelper.addToolMaterial("B_ELEMENTIUM", 3, 720, 6.2F, 2F, 20);
public static ArmorMaterial terrasteelArmorMaterial = EnumHelper.addArmorMaterial("TERRASTEEL", "terrasteel", 34, new int[] {3, 8, 6, 3}, 26);
public static ToolMaterial terrasteelToolMaterial = EnumHelper.addToolMaterial("TERRASTEEL", 4, 2300, 9F, 3F, 26);
public static final ArmorMaterial terrasteelArmorMaterial = EnumHelper.addArmorMaterial("TERRASTEEL", "terrasteel", 34,
new int[] { 3, 8, 6, 3 }, 26, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 3F);
public static final ToolMaterial terrasteelToolMaterial = EnumHelper.addToolMaterial("TERRASTEEL", 4, 2300, 9F, 3F, 26);
public static ArmorMaterial manaweaveArmorMaterial = EnumHelper.addArmorMaterial("MANAWEAVE", "manaweave", 5, new int[] { 1, 2, 2, 1 }, 18);
public static final ArmorMaterial manaweaveArmorMaterial = EnumHelper.addArmorMaterial("MANAWEAVE", "manaweave", 5,
new int[] { 1, 2, 2, 1 }, 18, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0);
public static EnumRarity rarityRelic = EnumHelper.addRarity("RELIC", EnumChatFormatting.GOLD, "Relic");
public static final EnumRarity rarityRelic = EnumHelper.addRarity("RELIC", TextFormatting.GOLD, "Relic");
public static KnowledgeType basicKnowledge;
public static KnowledgeType elvenKnowledge;
public static final KnowledgeType basicKnowledge;
public static final KnowledgeType elvenKnowledge;
// This is here for completeness sake, but you shouldn't use it
public static KnowledgeType relicKnowledge;
public static final KnowledgeType relicKnowledge;
// All of these categories are initialized during botania's PreInit stage.
public static LexiconCategory categoryBasics;
@@ -134,14 +138,14 @@ public final class BotaniaAPI {
public static LexiconCategory categoryAlfhomancy;
public static LexiconCategory categoryMisc;
public static Brew fallbackBrew = new Brew("fallback", "botania.brew.fallback", 0, 0);
public static final Brew fallbackBrew = new Brew("fallback", "botania.brew.fallback", 0, 0);
static {
registerSubTile("", DummySubTile.class);
basicKnowledge = registerKnowledgeType("minecraft", EnumChatFormatting.RESET, true);
elvenKnowledge = registerKnowledgeType("alfheim", EnumChatFormatting.DARK_GREEN, false);
relicKnowledge = registerKnowledgeType("relic", EnumChatFormatting.DARK_PURPLE, false);
basicKnowledge = registerKnowledgeType("minecraft", TextFormatting.RESET, true);
elvenKnowledge = registerKnowledgeType("alfheim", TextFormatting.DARK_GREEN, false);
relicKnowledge = registerKnowledgeType("relic", TextFormatting.DARK_PURPLE, false);
addOreWeight("oreAluminum", 3940); // Tinkers' Construct
addOreWeight("oreAmber", 2075); // Thaumcraft
@@ -212,12 +216,12 @@ public final class BotaniaAPI {
addOreWeightNether("oreOnyx", 500); // SimpleOres 2
addOreWeightNether("oreHaditeCoal", 500); // Hadite
addSeed(Items.wheat_seeds, Blocks.wheat);
addSeed(Items.potato, Blocks.potatoes);
addSeed(Items.carrot, Blocks.carrots);
addSeed(Items.nether_wart, Blocks.nether_wart);
addSeed(Items.pumpkin_seeds, Blocks.pumpkin_stem);
addSeed(Items.melon_seeds, Blocks.melon_stem);
addSeed(Items.WHEAT_SEEDS, Blocks.WHEAT);
addSeed(Items.POTATO, Blocks.POTATOES);
addSeed(Items.CARROT, Blocks.CARROTS);
addSeed(Items.NETHER_WART, Blocks.NETHER_WART);
addSeed(Items.PUMPKIN_SEEDS, Blocks.PUMPKIN_STEM);
addSeed(Items.MELON_SEEDS, Blocks.MELON_STEM);
registerModWiki("Minecraft", new SimpleWikiProvider("Minecraft Wiki", "http://minecraft.gamepedia.com/%s"));
@@ -247,12 +251,12 @@ public final class BotaniaAPI {
registerModWiki("GanysNether", new SimpleWikiProvider("Gany's Nether Wiki", "http://ganys-nether.wikia.com/wiki/%s"));
registerModWiki("GanysEnd", new SimpleWikiProvider("Gany's End Wiki", "http://ganys-end.wikia.com/wiki/%s"));
registerPaintableBlock(Blocks.stained_glass, BlockStainedGlass.COLOR);
registerPaintableBlock(Blocks.stained_glass_pane, BlockStainedGlassPane.COLOR);
registerPaintableBlock(Blocks.stained_hardened_clay, BlockColored.COLOR);
registerPaintableBlock(Blocks.wool, BlockColored.COLOR);
registerPaintableBlock(Blocks.carpet, BlockCarpet.COLOR);
registerPaintableBlock(Blocks.STAINED_GLASS, BlockStainedGlass.COLOR);
registerPaintableBlock(Blocks.STAINED_GLASS_PANE, BlockStainedGlassPane.COLOR);
registerPaintableBlock(Blocks.STAINED_HARDENED_CLAY, BlockColored.COLOR);
registerPaintableBlock(Blocks.WOOL, BlockColored.COLOR);
registerPaintableBlock(Blocks.CARPET, BlockCarpet.COLOR);
registerDisposableBlock("dirt"); // Vanilla
registerDisposableBlock("sand"); // Vanilla
registerDisposableBlock("gravel"); // Vanilla
@@ -277,7 +281,7 @@ public final class BotaniaAPI {
* @param id The ID for this knowledge type.
* @param color The color to display this knowledge type as.
*/
public static KnowledgeType registerKnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) {
public static KnowledgeType registerKnowledgeType(String id, TextFormatting color, boolean autoUnlock) {
KnowledgeType type = new KnowledgeType(id, color, autoUnlock);
knowledgeTypes.put(id, type);
return type;
@@ -307,7 +311,7 @@ public final class BotaniaAPI {
public static void registerDisposableBlock(String oreDictName) {
disposableBlocks.add(oreDictName);
}
/**
* Registers a Block as semi disposable using its Ore Dictionary Name.
* This means it will not be trashed when sneaking.
@@ -315,7 +319,7 @@ public final class BotaniaAPI {
public static void registerSemiDisposableBlock(String oreDictName) {
semiDisposableBlocks.add(oreDictName);
}
/**
* Registers a paintableBlock and returns it.
* You must also provide the PropertyEnum that this block uses to express its color
@@ -332,7 +336,7 @@ public final class BotaniaAPI {
public static void blacklistEntityFromGravityRod(Class<? extends Entity> entity) {
gravityRodBlacklist.add(entity);
}
/**
* Checks if the provided Entity is contained in the Blacklist.
* Pass in the class for the Entity, e.g. entity.getClass()
@@ -340,7 +344,7 @@ public final class BotaniaAPI {
public static boolean isEntityBlacklistedFromGravityRod(Class entity) {
return gravityRodBlacklist.contains(entity);
}
/**
* Blacklists an item from being pulled by the Ring of Magnetization.
* Short.MAX_VALUE can be used as the stack's damage for a wildcard.
@@ -362,11 +366,11 @@ public final class BotaniaAPI {
public static boolean isItemBlacklistedFromMagnet(ItemStack stack) {
return isItemBlacklistedFromMagnet(stack, 0);
}
public static boolean isItemBlacklistedFromMagnet(ItemStack stack, int recursion) {
if(recursion > 5)
return false;
if(stack.getItemDamage() != Short.MAX_VALUE) {
ItemStack copy = new ItemStack(stack.getItem(), 0, Short.MAX_VALUE);
boolean general = isItemBlacklistedFromMagnet(copy, recursion + 1);
@@ -389,7 +393,7 @@ public final class BotaniaAPI {
public static boolean isBlockBlacklistedFromMagnet(Block block, int meta, int recursion) {
if(recursion >= 5)
return false;
if(meta != Short.MAX_VALUE) {
boolean general = isBlockBlacklistedFromMagnet(block, Short.MAX_VALUE, recursion + 1);
if(general)
@@ -474,7 +478,7 @@ public final class BotaniaAPI {
*/
public static RecipeManaInfusion registerManaAlchemyRecipe(ItemStack output, Object input, int mana) {
RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana);
recipe.setAlchemy(true);
recipe.setCatalyst(RecipeManaInfusion.alchemyState);
return recipe;
}
@@ -485,7 +489,7 @@ public final class BotaniaAPI {
*/
public static RecipeManaInfusion registerManaConjurationRecipe(ItemStack output, Object input, int mana) {
RecipeManaInfusion recipe = registerManaInfusionRecipe(output, input, mana);
recipe.setConjuration(true);
recipe.setCatalyst(RecipeManaInfusion.conjurationState);
return recipe;
}
@@ -504,7 +508,7 @@ public final class BotaniaAPI {
/**
* Registers a Brew Recipe (for the Botanical Brewery).
* @param brew The brew in to be set in this recipe.
* @inputs The items used in the recipe, no more than 6.
* @param inputs The items used in the recipe, no more than 6.
*/
public static RecipeBrew registerBrewRecipe(Brew brew, Object... inputs) {
Preconditions.checkArgument(inputs.length <= 6);
@@ -10,7 +10,7 @@ package vazkii.botania.api;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.LoaderState;
import net.minecraftforge.fml.relauncher.Side;
@@ -10,23 +10,19 @@
*/
package vazkii.botania.api.boss;
import java.awt.Rectangle;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.entity.boss.IBossDisplayData;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.internal.ShaderCallback;
import java.awt.*;
import java.util.UUID;
/**
* An extension of IBossDisplayData. This counts as a botania boss and as a normal
* minecraft boss since it has IBossDisplayData. Instead of using the typical
* BossStatus.setBossStatus(entity, true) to set the health bar in the render use
* BotaniaAPI.internalMethodHandler.setBossStatus(entity);<br><br>
* Alternatively, you can check if botania is loaded and use the vanilla one
* if that's not the case.
* A Botania boss, that is subject to special rendering.
*/
public interface IBotaniaBoss extends IBossDisplayData {
public interface IBotaniaBoss {
/**
* The ResourceLocation to bind for this boss's boss bar.
@@ -51,9 +47,35 @@ public interface IBotaniaBoss extends IBossDisplayData {
public Rectangle getBossBarHPTextureRect();
/**
* A callback for when this boss's boss bar renders, you can do aditional rendering
* A callback for when this boss's boss bar renders, you can do additional rendering
* here if needed.
* @return How tall your auxiliary renders were
*/
@SideOnly(Side.CLIENT)
public void bossBarRenderCallback(ScaledResolution res, int x, int y);
public int bossBarRenderCallback(ScaledResolution res, int x, int y);
/**
* Get the serverside UUID of the {@link net.minecraft.world.BossInfoServer} instance tracking this boss
* Note that this is NOT the entity's UUID, nor is it the clientside UUID of the BossInfoServer instance!
* You will most likely need to sync this yourself using the datawatcher
* @return The uuid.
*/
public UUID getBossInfoUuid();
/**
* The Shader Program to use for this boss's bar. Return 0 case
* you don't want a shader to be used. You can use separate shaders
* for the background and foreground.
* @param background True if rendering the background of the boss bar,
* false if rendering the bar itself that shows the HP.
* @return OpenGL program ID of the shader to use
*/
public int getBossBarShaderProgram(boolean background);
/**
* A callback for the shader, used to pass in uniforms. Return null for no callback.
* @return a ShaderCallback to use. If getBossBarShaderProgram returns an invalid shader the result of this method is ignored.
*/
public ShaderCallback getBossBarShaderCallback(boolean background, int shader);
}
@@ -1,40 +0,0 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Oct 29, 2014, 6:13:21 PM (GMT)]
*/
package vazkii.botania.api.boss;
import vazkii.botania.api.internal.ShaderCallback;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* A Botania boss whose HP bar makes use of shaders. Shaders
* used through this have a few uniforms available:
* <li><b><i>int</i> time</b> - The amount of total ticks elapsed.</li>
* <li><b><i>int</i> startX</b> - The U coordinate passed in for the render of this bar's texture.</li>
* <li><b><i>int</i> startY</b> - The V coordinate passed in for the render of this bar's texture.</li>
*/
public interface IBotaniaBossWithShader extends IBotaniaBoss {
/**
* The Shader Program to use for this boss bar. Return 0 case
* you don't want a shader to be used. You can use separate shaders
* for the background and foreground.
* @param background True if rendering the background of the boss bar,
* false if rendering the bar itself that shows the HP.
*/
public int getBossBarShaderProgram(boolean background);
/**
* A callback for the shader, used to pass in uniforms. Return null for no callback.
*/
public ShaderCallback getBossBarShaderCallback(boolean background, int shader);
}
@@ -10,15 +10,12 @@
*/
package vazkii.botania.api.brew;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import com.google.common.collect.ImmutableList;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import java.util.List;
/**
* The class for a Brew definition, each one is a singleton.
*/
@@ -28,9 +25,9 @@ public class Brew {
private final String name;
private final int color;
private final int cost;
private final List<PotionEffectShim> effects;
boolean canInfuseBloodPendant = true;
boolean canInfuseIncense = true;
private final List<PotionEffect> effects;
private boolean canInfuseBloodPendant = true;
private boolean canInfuseIncense = true;
/**
* @param name The unlocalized name of this potion.
@@ -39,7 +36,7 @@ public class Brew {
* @param cost The cost, in Mana for this brew.
* @param effects A list of effects to apply to the player when they drink it.
*/
public Brew(String key, String name, int color, int cost, PotionEffectShim... effects) {
public Brew(String key, String name, int color, int cost, PotionEffect... effects) {
this.key = key;
this.name = name;
this.color = color;
@@ -116,23 +113,13 @@ public class Brew {
return getManaCost();
}
/**
* Get the PotionEffectShim's that this brew has.
*/
public List<PotionEffectShim> getPotionEffectsShim(ItemStack stack) {
return effects;
}
/**
* Gets the list of vanilla PotionEffects for the ItemStack passed in.
* Note that for the lexicon, this passes in a botania Managlass
* Vial or an Alfglass Flask at all times.
*/
public List<PotionEffect> getPotionEffects(ItemStack stack) {
List<PotionEffect> ret = new ArrayList<>();
for(PotionEffectShim s : getPotionEffectsShim(stack))
ret.add(s.toVanilla());
return ret;
return effects;
}
}
@@ -1,26 +0,0 @@
package vazkii.botania.api.brew;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.fml.common.registry.GameData;
// Version of PotionEffect that doesn't use number ID's
// See https://github.com/MinecraftForge/MinecraftForge/issues/2374
// todo 1.9 remove?
public class PotionEffectShim {
public final Potion potion;
public final int duration;
public final int amplifier;
public PotionEffectShim(Potion potion, int duration, int amplifier) {
this.potion = potion;
this.duration = duration;
this.amplifier = amplifier;
}
public PotionEffect toVanilla() {
return new PotionEffect(GameData.getPotionRegistry().getId(potion), duration, amplifier, true, true);
}
}
@@ -9,6 +9,18 @@
* File Created @ [Feb 14, 2015, 3:28:54 PM (GMT)]
*/
package vazkii.botania.api.corporea;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import vazkii.botania.api.BotaniaAPI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -16,31 +28,15 @@ import java.util.Map;
import java.util.WeakHashMap;
import java.util.regex.Pattern;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import vazkii.botania.api.BotaniaAPI;
public final class CorporeaHelper {
private static final List<IInventory> empty = ImmutableList.of();
private static final WeakHashMap<List<ICorporeaSpark>, List<IInventory>> cachedNetworks = new WeakHashMap<>();
private static final List<InvWithLocation> empty = ImmutableList.of();
private static final WeakHashMap<List<ICorporeaSpark>, List<InvWithLocation>> cachedNetworks = new WeakHashMap<>();
private static final List<ICorporeaAutoCompleteController> autoCompleteControllers = new ArrayList<>();
private static final Pattern patternControlCode = Pattern.compile("(?i)\\u00A7[0-9A-FK-OR]");
public static final String[] WILDCARD_STRINGS = new String[] {
"...", "~", "+", "?" , "*"
};
public static final String[] WILDCARD_STRINGS = { "...", "~", "+", "?" , "*" };
/**
* How many items were matched in the last request. If java had "out" params like C# this wouldn't be needed :V
@@ -55,23 +51,23 @@ public final class CorporeaHelper {
* Gets a list of all the inventories on this spark network. This list is cached for use once every tick,
* and if something changes during that tick it'll still have the first result.
*/
public static List<IInventory> getInventoriesOnNetwork(ICorporeaSpark spark) {
public static List<InvWithLocation> getInventoriesOnNetwork(ICorporeaSpark spark) {
ICorporeaSpark master = spark.getMaster();
if(master == null)
return empty;
List<ICorporeaSpark> network = master.getConnections();
if(cachedNetworks.containsKey(network)) {
List<IInventory> cache = cachedNetworks.get(network);
List<InvWithLocation> cache = cachedNetworks.get(network);
if(cache != null)
return cache;
}
List<IInventory> inventories = new ArrayList<>();
List<InvWithLocation> inventories = new ArrayList<>();
if(network != null)
for(ICorporeaSpark otherSpark : network)
if(otherSpark != null) {
IInventory inv = otherSpark.getSparkInventory();
InvWithLocation inv = otherSpark.getSparkInventory();
if(inv != null)
inventories.add(inv);
}
@@ -86,7 +82,7 @@ public final class CorporeaHelper {
* called instead if the context for those exists to avoid having to get the values again.
*/
public static int getCountInNetwork(ItemStack stack, ICorporeaSpark spark, boolean checkNBT) {
List<IInventory> inventories = getInventoriesOnNetwork(spark);
List<InvWithLocation> inventories = getInventoriesOnNetwork(spark);
return getCountInNetwork(stack, inventories, checkNBT);
}
@@ -95,18 +91,18 @@ public final class CorporeaHelper {
* The higher level function that use a Map< IInventory, Integer > should be
* called instead if the context for this exists to avoid having to get the value again.
*/
public static int getCountInNetwork(ItemStack stack, List<IInventory> inventories, boolean checkNBT) {
Map<IInventory, Integer> map = getInventoriesWithItemInNetwork(stack, inventories, checkNBT);
public static int getCountInNetwork(ItemStack stack, List<InvWithLocation> inventories, boolean checkNBT) {
Map<InvWithLocation, Integer> map = getInventoriesWithItemInNetwork(stack, inventories, checkNBT);
return getCountInNetwork(stack, map, checkNBT);
}
/**
* Gets the amount of available items in the network of the type passed in, checking NBT or not.
*/
public static int getCountInNetwork(ItemStack stack, Map<IInventory, Integer> inventories, boolean checkNBT) {
public static int getCountInNetwork(ItemStack stack, Map<InvWithLocation, Integer> inventories, boolean checkNBT) {
int count = 0;
for(IInventory inv : inventories.keySet())
for(InvWithLocation inv : inventories.keySet())
count += inventories.get(inv);
return count;
@@ -117,8 +113,8 @@ public final class CorporeaHelper {
* The higher level function that use a List< IInventory > should be
* called instead if the context for this exists to avoid having to get the value again.
*/
public static Map<IInventory, Integer> getInventoriesWithItemInNetwork(ItemStack stack, ICorporeaSpark spark, boolean checkNBT) {
List<IInventory> inventories = getInventoriesOnNetwork(spark);
public static Map<InvWithLocation, Integer> getInventoriesWithItemInNetwork(ItemStack stack, ICorporeaSpark spark, boolean checkNBT) {
List<InvWithLocation> inventories = getInventoriesOnNetwork(spark);
return getInventoriesWithItemInNetwork(stack, inventories, checkNBT);
}
@@ -127,8 +123,8 @@ public final class CorporeaHelper {
* The deeper level function that use a List< IInventory > should be
* called instead if the context for this exists to avoid having to get the value again.
*/
public static Map<IInventory, Integer> getInventoriesWithItemInNetwork(ItemStack stack,List<IInventory> inventories, boolean checkNBT) {
Map<IInventory, Integer> countMap = new HashMap<IInventory, Integer>();
public static Map<InvWithLocation, Integer> getInventoriesWithItemInNetwork(ItemStack stack, List<InvWithLocation> inventories, boolean checkNBT) {
Map<InvWithLocation, Integer> countMap = new HashMap<>();
List<IWrappedInventory> wrappedInventories = BotaniaAPI.internalHandler.wrapInventory(inventories);
for (IWrappedInventory inv : wrappedInventories) {
CorporeaRequest request = new CorporeaRequest(stack, checkNBT, -1);
@@ -174,7 +170,7 @@ public final class CorporeaHelper {
if(MinecraftForge.EVENT_BUS.post(event))
return stacks;
List<IInventory> inventories = getInventoriesOnNetwork(spark);
List<InvWithLocation> inventories = getInventoriesOnNetwork(spark);
List<IWrappedInventory> inventoriesW = BotaniaAPI.internalHandler.wrapInventory(inventories);
Map<ICorporeaInterceptor, ICorporeaSpark> interceptors = new HashMap<ICorporeaInterceptor, ICorporeaSpark>();
@@ -183,9 +179,9 @@ public final class CorporeaHelper {
for(IWrappedInventory inv : inventoriesW) {
ICorporeaSpark invSpark = inv.getSpark();
Object originalInventory = inv.getWrappedObject();
if(originalInventory instanceof ICorporeaInterceptor) {
ICorporeaInterceptor interceptor = (ICorporeaInterceptor) originalInventory;
InvWithLocation originalInventory = inv.getWrappedObject();
if(originalInventory.world.getTileEntity(originalInventory.pos) instanceof ICorporeaInterceptor) {
ICorporeaInterceptor interceptor = (ICorporeaInterceptor) originalInventory.world.getTileEntity(originalInventory.pos);
interceptor.interceptRequest(matcher, itemCount, invSpark, spark, stacks, inventories, doit);
interceptors.put(interceptor, invSpark);
}
@@ -209,11 +205,8 @@ public final class CorporeaHelper {
/**
* Gets the spark attached to the inventory passed case it's a TileEntity.
*/
public static ICorporeaSpark getSparkForInventory(IInventory inv) {
if(!(inv instanceof TileEntity))
return null;
TileEntity tile = (TileEntity) inv;
public static ICorporeaSpark getSparkForInventory(InvWithLocation inv) {
TileEntity tile = inv.world.getTileEntity(inv.pos);
return getSparkForBlock(tile.getWorld(), tile.getPos());
}
@@ -234,13 +227,6 @@ public final class CorporeaHelper {
return getSparkForBlock(world, pos) != null;
}
/**
* Gets if the slot passed in can be extracted from by a spark.
*/
public static boolean isValidSlot(IInventory inv, int slot) {
return !(inv instanceof ISidedInventory) || arrayHas(((ISidedInventory) inv).getSlotsForFace(EnumFacing.UP), slot) && ((ISidedInventory) inv).canExtractItem(slot, inv.getStackInSlot(slot), EnumFacing.UP);
}
/**
* Gets if two stacks match.
*/
@@ -283,17 +269,6 @@ public final class CorporeaHelper {
cachedNetworks.clear();
}
/**
* Helper method to check if an int array contains an int.
*/
public static boolean arrayHas(int[] arr, int val) {
for (int element : arr)
if(element == val)
return true;
return false;
}
/**
* Helper method to make stacksMatch() less messy.
*/
@@ -10,8 +10,8 @@
package vazkii.botania.api.corporea;
public class CorporeaRequest {
public Object matcher;
public boolean checkNBT;
public final Object matcher;
public final boolean checkNBT;
public int count;
public int foundItems = 0;
public int extractedItems = 0;
@@ -10,9 +10,6 @@
*/
package vazkii.botania.api.corporea;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* An interface for systems which may control if the item auto complete system should be active
*/
@@ -10,11 +10,10 @@
*/
package vazkii.botania.api.corporea;
import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import java.util.List;
/**
* A TileEntity that implements this will be able to intercept corporea
* requests case there is a Corporea Spark on top.
@@ -26,13 +25,13 @@ public interface ICorporeaInterceptor {
* at this point, but the list of stacks is not complete. The request parameter can
* be either a String or ItemStack.
*/
public void interceptRequest(Object request, int count, ICorporeaSpark spark, ICorporeaSpark source, List<ItemStack> stacks, List<IInventory> inventories, boolean doit);
public void interceptRequest(Object request, int count, ICorporeaSpark spark, ICorporeaSpark source, List<ItemStack> stacks, List<InvWithLocation> inventories, boolean doit);
/**
* Intercepts a request after all the stacks have been found and processed. Both the
* list of inventories and stacks is complete at this point. The request parameter can
* be either a String or ItemStack.
*/
public void interceptRequestLast(Object request, int count, ICorporeaSpark spark, ICorporeaSpark source, List<ItemStack> stacks, List<IInventory> inventories, boolean doit);
public void interceptRequestLast(Object request, int count, ICorporeaSpark spark, ICorporeaSpark source, List<ItemStack> stacks, List<InvWithLocation> inventories, boolean doit);
}
@@ -10,11 +10,11 @@
*/
package vazkii.botania.api.corporea;
import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.item.ItemStack;
import java.util.List;
/**
* An interface for a Corporea Spark. Includes functions for handling
* connections.
@@ -38,7 +38,7 @@ public interface ICorporeaSpark {
/**
* Gets the inventory this spark is bound to, generally the one right below it.
*/
public IInventory getSparkInventory();
public InvWithLocation getSparkInventory();
/**
* Gets the list of sparks this spark is connected to, see registerConnections(). This list
@@ -82,6 +82,6 @@ public interface ICorporeaSpark {
* Gets the network that this spark is on, or the color it's displaying. Sparks may only connect to others
* of the same network, and on changing network should trigger a re-cache of the previous network.
*/
public int getNetwork();
public EnumDyeColor getNetwork();
}
@@ -9,11 +9,10 @@
*/
package vazkii.botania.api.corporea;
import java.util.List;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import java.util.List;
/**
* This interface wraps IInventory corporea works with in order to provide
* compatibility with different storage mods.
@@ -24,7 +23,7 @@ public interface IWrappedInventory {
/**
* Break encapsulation and exposes original inventory.
*/
IInventory getWrappedObject();
InvWithLocation getWrappedObject();
/**
* Counts items in the inventory matching the request
@@ -0,0 +1,32 @@
package vazkii.botania.api.corporea;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.items.IItemHandler;
public class InvWithLocation {
public final IItemHandler handler;
public final World world;
public final BlockPos pos;
public InvWithLocation(IItemHandler itemHandler, World world, BlockPos pos) {
this.handler = itemHandler;
this.world = world;
this.pos = pos;
}
@Override
public int hashCode() {
return 31 * handler.hashCode() ^ world.hashCode() ^ pos.hashCode();
}
@Override
public boolean equals(Object o) {
return o instanceof InvWithLocation
&& handler.equals(((InvWithLocation) o).handler)
&& world == ((InvWithLocation) o).world
&& pos.equals(((InvWithLocation) o).pos);
}
}
@@ -10,22 +10,20 @@
*/
package vazkii.botania.api.internal;
import java.util.List;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.mana.TileSignature;
import java.util.Set;
public class DummyManaNetwork implements IManaNetwork {
public static final DummyManaNetwork instance = new DummyManaNetwork();
@Override
public void clear() {
// NO-OP
}
public void clear() {}
@Override
public TileEntity getClosestPool(BlockPos pos, World world, int limit) {
@@ -38,13 +36,13 @@ public class DummyManaNetwork implements IManaNetwork {
}
@Override
public List<TileSignature> getAllCollectorsInWorld(World world) {
return ImmutableList.of();
public Set<TileSignature> getAllCollectorsInWorld(World world) {
return ImmutableSet.of();
}
@Override
public List<TileSignature> getAllPoolsInWorld(World world) {
return ImmutableList.of();
public Set<TileSignature> getAllPoolsInWorld(World world) {
return ImmutableSet.of();
}
}
@@ -10,10 +10,8 @@
*/
package vazkii.botania.api.internal;
import java.util.List;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@@ -22,12 +20,13 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.boss.IBotaniaBoss;
import net.minecraftforge.items.IItemHandlerModifiable;
import vazkii.botania.api.corporea.IWrappedInventory;
import vazkii.botania.api.corporea.InvWithLocation;
import vazkii.botania.api.lexicon.LexiconPage;
import vazkii.botania.api.lexicon.multiblock.MultiblockSet;
import vazkii.botania.api.recipe.RecipeBrew;
@@ -37,6 +36,8 @@ import vazkii.botania.api.recipe.RecipePetals;
import vazkii.botania.api.recipe.RecipeRuneAltar;
import vazkii.botania.api.subtile.SubTileEntity;
import java.util.List;
public class DummyMethodHandler implements IInternalMethodHandler {
@Override
@@ -120,7 +121,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
@Override
public ItemStack getSubTileAsStack(String subTile) {
return new ItemStack(Blocks.stone, 0, 0);
return new ItemStack(Blocks.STONE, 0, 0);
}
@Override
@@ -149,35 +150,32 @@ public class DummyMethodHandler implements IInternalMethodHandler {
}
@Override
public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res) {
// NO-OP
}
public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res) {}
@Override
public void drawComplexManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res, ItemStack bindDisplay, boolean properlyBound) {
// NO-OP
}
public void drawComplexManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res, ItemStack bindDisplay, boolean properlyBound) {}
@Override
public ItemStack getBindDisplayForFlowerType(SubTileEntity e) {
return new ItemStack(Blocks.stone, 0, 0);
return new ItemStack(Blocks.STONE, 0, 0);
}
@Override
public void renderLexiconText(int x, int y, int width, int height, String unlocalizedText) {
// NO-OP
}
public void renderLexiconText(int x, int y, int width, int height, String unlocalizedText) {}
@Override
public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m) {
// NO-OP
}
public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m) {}
@Override
public IInventory getBaublesInventory(EntityPlayer player) {
return null;
}
@Override
public IItemHandlerModifiable getBaublesInventoryWrapped(EntityPlayer player) {
return null;
}
@Override
public boolean shouldForceCheck() {
return true;
@@ -193,20 +191,13 @@ public class DummyMethodHandler implements IInternalMethodHandler {
return null;
}
@Override
public void setBossStatus(IBotaniaBoss status) {
// NO-OP
}
@Override
public boolean isBuildcraftPipe(TileEntity tile) {
return false;
}
@Override
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side) {
// NO-OP
}
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side) {}
@Override
public boolean hasSolegnoliaAround(Entity e) {
@@ -224,12 +215,10 @@ public class DummyMethodHandler implements IInternalMethodHandler {
}
@Override
public void sendBaubleUpdatePacket(EntityPlayer player, int slot) {
// NO-OP
}
public void sendBaubleUpdatePacket(EntityPlayer player, int slot) {}
@Override
public List<IWrappedInventory> wrapInventory(List<IInventory> inventories) {
public List<IWrappedInventory> wrapInventory(List<InvWithLocation> inventories) {
return null;
}
@@ -10,9 +10,9 @@
*/
package vazkii.botania.api.internal;
import vazkii.botania.api.lexicon.LexiconPage;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.lexicon.LexiconPage;
/**
* A dummy page. It does absolutely nothing and is only
@@ -27,8 +27,6 @@ public class DummyPage extends LexiconPage {
@Override
@SideOnly(Side.CLIENT)
public void renderScreen(IGuiLexiconEntry gui, int x, int y) {
// NO-OP
}
public void renderScreen(IGuiLexiconEntry gui, int x, int y) {}
}
@@ -10,11 +10,11 @@
*/
package vazkii.botania.api.internal;
import java.util.List;
import net.minecraft.client.gui.GuiButton;
import vazkii.botania.api.lexicon.LexiconEntry;
import java.util.List;
/**
* Internal interface for the Lexicon Entry GUI. This contains
* everything that can be accessed from it. It's safe to cast
@@ -10,10 +10,8 @@
*/
package vazkii.botania.api.internal;
import java.util.List;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@@ -21,12 +19,15 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.boss.IBotaniaBoss;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraftforge.items.IItemHandlerModifiable;
import vazkii.botania.api.corporea.IWrappedInventory;
import vazkii.botania.api.corporea.InvWithLocation;
import vazkii.botania.api.lexicon.LexiconPage;
import vazkii.botania.api.lexicon.multiblock.MultiblockSet;
import vazkii.botania.api.recipe.RecipeBrew;
@@ -35,8 +36,8 @@ import vazkii.botania.api.recipe.RecipeManaInfusion;
import vazkii.botania.api.recipe.RecipePetals;
import vazkii.botania.api.recipe.RecipeRuneAltar;
import vazkii.botania.api.subtile.SubTileEntity;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
/**
* Any methods that refer to internal methods in Botania are here.
@@ -97,6 +98,8 @@ public interface IInternalMethodHandler {
public IInventory getBaublesInventory(EntityPlayer player);
public IItemHandlerModifiable getBaublesInventoryWrapped(EntityPlayer player);
public void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, BlockPos pos, EnumFacing side);
public boolean hasSolegnoliaAround(Entity e);
@@ -113,8 +116,6 @@ public interface IInternalMethodHandler {
public ResourceLocation getDefaultBossBarTexture();
public void setBossStatus(IBotaniaBoss status);
public boolean isBuildcraftPipe(TileEntity tile);
public void sparkleFX(World world, double x, double y, double z, float r, float g, float b, float size, int m);
@@ -128,6 +129,6 @@ public interface IInternalMethodHandler {
/**
* Wrap inventories in the network into wrappers providing compatibility for storage mods.
*/
List<IWrappedInventory> wrapInventory(List<IInventory> inventories);
List<IWrappedInventory> wrapInventory(List<InvWithLocation> inventories);
}
@@ -10,64 +10,64 @@
*/
package vazkii.botania.api.internal;
import java.util.UUID;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import java.util.UUID;
/**
* Interface for the Mana Burst entity. This can safely be casted to EntityThrowable.
*/
public interface IManaBurst {
public boolean isFake();
boolean isFake();
public void setMotion(double x, double y, double z);
void setMotion(double x, double y, double z);
public int getColor();
int getColor();
public void setColor(int color);
void setColor(int color);
public int getMana();
int getMana();
public void setMana(int mana);
void setMana(int mana);
public int getStartingMana();
int getStartingMana();
public void setStartingMana(int mana);
void setStartingMana(int mana);
public int getMinManaLoss();
int getMinManaLoss();
public void setMinManaLoss(int minManaLoss);
void setMinManaLoss(int minManaLoss);
public float getManaLossPerTick();
float getManaLossPerTick();
public void setManaLossPerTick(float mana);
void setManaLossPerTick(float mana);
public float getGravity();
float getGravity();
public void setGravity(float gravity);
void setGravity(float gravity);
public BlockPos getBurstSourceBlockPos();
BlockPos getBurstSourceBlockPos();
public void setBurstSourceCoords(BlockPos pos);
void setBurstSourceCoords(BlockPos pos);
public ItemStack getSourceLens();
ItemStack getSourceLens();
public void setSourceLens(ItemStack lens);
void setSourceLens(ItemStack lens);
public boolean hasAlreadyCollidedAt(BlockPos pos);
boolean hasAlreadyCollidedAt(BlockPos pos);
public void setCollidedAt(BlockPos pos);
void setCollidedAt(BlockPos pos);
public int getTicksExisted();
int getTicksExisted();
public void setFake(boolean fake);
void setFake(boolean fake);
public void setShooterUUID(UUID uuid);
void setShooterUUID(UUID uuid);
public UUID getShooterUIID();
UUID getShooterUUID();
public void ping();
void ping();
}
@@ -10,13 +10,13 @@
*/
package vazkii.botania.api.internal;
import java.util.List;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.mana.TileSignature;
import java.util.Set;
/**
* A basic interface for a world's Mana Network.
* @see IInternalMethodHandler#getManaNetworkInstance()
@@ -52,16 +52,16 @@ public interface IManaNetwork {
public TileEntity getClosestPool(BlockPos pos, World world, int limit);
/**
* Gets the list of all Mana Collectors (eg. Mana Spreader) in the dimension
* passed in. Note that this is the actual list and not a copy, make sure to
* clone the list if you intend to change it in any way.
* Gets the set of all Mana Collectors (eg. Mana Spreader) in the dimension
* passed in. Note that this is the actual set and not a copy, make sure to
* clone the set if you intend to change it in any way.
*/
public List<TileSignature> getAllCollectorsInWorld(World world);
public Set<TileSignature> getAllCollectorsInWorld(World world);
/**
* Gets the list of all Mana Pools in the dimension passed in. Note that this
* is the actual list and not a copy, make sure to clone the list if you intend
* Gets the set of all Mana Pools in the dimension passed in. Note that this
* is the actual set and not a copy, make sure to clone the set if you intend
* to change it in any way.
*/
public List<TileSignature> getAllPoolsInWorld(World world);
public Set<TileSignature> getAllPoolsInWorld(World world);
}
@@ -10,24 +10,34 @@
*/
package vazkii.botania.api.internal;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
public final class VanillaPacketDispatcher {
public static void dispatchTEToNearbyPlayers(TileEntity tile) {
World world = tile.getWorld();
List players = world.playerEntities;
for(Object player : players)
if(player instanceof EntityPlayerMP) {
EntityPlayerMP mp = (EntityPlayerMP) player;
if(pointDistancePlane(mp.posX, mp.posZ, tile.getPos().getX() + 0.5, tile.getPos().getZ() + 0.5) < 64)
((EntityPlayerMP) player).playerNetServerHandler.sendPacket(tile.getDescriptionPacket());
if(tile.getWorld() instanceof WorldServer) {
WorldServer ws = ((WorldServer) tile.getWorld());
SPacketUpdateTileEntity packet = tile.getUpdatePacket();
if(packet == null)
return;
for (EntityPlayer player : ws.playerEntities) {
EntityPlayerMP playerMP = ((EntityPlayerMP) player);
if (playerMP.getDistanceSq(tile.getPos()) < 64 * 64
&& ws.getPlayerChunkMap().isPlayerWatchingChunk(playerMP, tile.getPos().getX() >> 4, tile.getPos().getZ() >> 4)) {
playerMP.connection.sendPacket(packet);
}
}
}
}
public static void dispatchTEToNearbyPlayers(World world, BlockPos pos) {
@@ -13,9 +13,7 @@ package vazkii.botania.api.item;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.util.math.MathHelper;
/**
* A Bauble Item that implements this will be have hooks to render something on
@@ -37,24 +35,67 @@ public interface IBaubleRender {
/**
* A few helper methods for the render.
*/
public static class Helper {
final class Helper {
/**
* Rotates the render for a bauble correctly if the player is sneaking.
* Use for renders under {@link RenderType#BODY}.
*/
public static void rotateIfSneaking(EntityPlayer player) {
if(player.isSneaking())
applySneakingRotation();
}
/**
* Rotates the render for a bauble correctly for a sneaking player.
* Use for renders under {@link RenderType#BODY}.
*/
public static void applySneakingRotation() {
GlStateManager.rotate(28.64789F, 1.0F, 0.0F, 0.0F);
GlStateManager.translate(0F, 0.2F, 0F);
GlStateManager.rotate(90F / (float) Math.PI, 1.0F, 0.0F, 0.0F);
}
/**
* Shifts the render for a bauble correctly to the head, including sneaking rotation.
* Use for renders under {@link RenderType#HEAD}.
*/
public static void translateToHeadLevel(EntityPlayer player) {
GlStateManager.translate(0, -player.getDefaultEyeHeight() + (player.isSneaking() ? 0.25 : 0), 0);
GlStateManager.translate(0, -player.getDefaultEyeHeight(), 0);
if (player.isSneaking())
GlStateManager.translate(0.25F * MathHelper.sin(player.rotationPitch * (float) Math.PI / 180), 0.25F * MathHelper.cos(player.rotationPitch * (float) Math.PI / 180), 0F);
}
/**
* Shifts the render for a bauble correctly to the face.
* Use for renders under {@link RenderType#HEAD}, and usually after calling {@link Helper#translateToHeadLevel(EntityPlayer)}.
*/
public static void translateToFace() {
GlStateManager.rotate(90F, 0F, 1F, 0F);
GlStateManager.rotate(180F, 1F, 0F, 0F);
GlStateManager.translate(0f, -4.35f, -1.27f);
}
/**
* Scales down the render to a correct size.
* Use for any render.
*/
public static void defaultTransforms() {
GlStateManager.translate(0.0, 3.0, 1.0);
GlStateManager.scale(0.55, 0.55, 0.55);
}
/**
* Shifts the render for a bauble correctly to the chest.
* Use for renders under {@link RenderType#BODY}, and usually after calling {@link Helper#rotateIfSneaking(EntityPlayer)}.
*/
public static void translateToChest() {
GlStateManager.rotate(180F, 1F, 0F, 0F);
GlStateManager.translate(0F, -3.2F, -0.85F);
}
}
public static enum RenderType {
enum RenderType {
/**
* Render Type for the player's body, translations apply on the player's rotation.
* Sneaking is not handled and should be done during the render.
@@ -64,7 +105,7 @@ public interface IBaubleRender {
/**
* Render Type for the player's body, translations apply on the player's head rotations.
* Sneaking is not handled and should be done during the render.~
* Sneaking is not handled and should be done during the render.
* @see IBaubleRender.Helper
*/
HEAD;
@@ -1,26 +0,0 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Jan 18, 2015, 12:20:44 AM (GMT)]
*/
package vazkii.botania.api.item;
import net.minecraft.item.EnumDyeColor;
/**
* Used to define a Mana Pool that can be dyed through floral powder.
*/
public interface IDyablePool {
public EnumDyeColor getColor();
public void setColor(EnumDyeColor color);
}
@@ -1,28 +0,0 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Apr 30, 2015, 1:43:17 PM (GMT)]
*/
package vazkii.botania.api.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
/**
* An extension of IWireframeCoordinateListProvider that allows for
* rendering a single thicker wireframe.
*/
public interface IExtendedWireframeCoordinateListProvider extends IWireframeCoordinateListProvider {
/**
* Gets the source wireframe to draw, this one will be drawn thicker.
*/
public BlockPos getSourceWireframe(EntityPlayer player, ItemStack stack);
}
@@ -11,6 +11,7 @@
package vazkii.botania.api.item;
import net.minecraft.item.ItemStack;
import java.util.HashMap;
public interface IFloatingFlower {
@@ -22,7 +23,7 @@ public interface IFloatingFlower {
public void setIslandType(IslandType type);
public class IslandType {
private static HashMap<String, IslandType> registry = new HashMap<>();
private static final HashMap<String, IslandType> registry = new HashMap<>();
public static final IslandType GRASS = new IslandType("GRASS");
public static final IslandType PODZOL = new IslandType("PODZOL");
@@ -35,6 +36,8 @@ public interface IFloatingFlower {
public static final IslandType INFUSED = new IslandType("INFUSED");
public static final IslandType MUTATED = new IslandType("MUTATED");
private final String typeName;
/**
* Instantiates and registers a new floating flower island type
* Note that you need to register the model for this island type, see BotaniaAPIClient
@@ -46,14 +49,11 @@ public interface IFloatingFlower {
registry.put(name, this);
}
public final String typeName;
public static IslandType ofType(String typeStr) {
IslandType type = registry.get(typeStr);
return type == null ? GRASS : type;
}
@Override
public String toString() {
return this.typeName;
}
@@ -9,9 +9,9 @@
* File Created @ [17/11/2015, 20:10:53 (GMT)]
*/
package vazkii.botania.api.item;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import vazkii.botania.api.subtile.SubTileEntity;
/**
@@ -20,9 +20,15 @@ import vazkii.botania.api.subtile.SubTileEntity;
public interface IFlowerPlaceable {
/**
* Gets the block to be placed, return null to not place anything.
* Gets the state to be placed, return null to not place anything.
*/
public Block getBlockToPlaceByFlower(ItemStack stack, SubTileEntity flower, BlockPos pos);
public IBlockState getBlockToPlaceByFlower(ItemStack stack, SubTileEntity flower, BlockPos pos);
/**
* Called after the block is placed.
* @param stack The stack that was placed.
* @param flower The flower doing the placing.
* @param pos The position that was placed at.
*/
public void onBlockPlacedByFlower(ItemStack stack, SubTileEntity flower, BlockPos pos);
}
@@ -11,7 +11,7 @@
package vazkii.botania.api.item;
import net.minecraft.world.World;
/**
* A BiomeGenBase that implements this will not have Botania flowers generated.
* A Biome that implements this will not have Botania flowers generated.
*/
public interface IFlowerlessBiome {
/**
@@ -1,26 +0,0 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Oct 29, 2014, 4:52:04 PM (GMT)]
*/
package vazkii.botania.api.item;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
/**
* A BlockBush can implement this to check if it can be broken
* by a Horn/Drum of the Wild or not.
* @Deprecated Use IHornHarvestable instead
*/
@Deprecated
public interface IGrassHornExcempt {
public boolean canUproot(World world, BlockPos pos);
}
@@ -11,7 +11,7 @@
package vazkii.botania.api.item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
@@ -22,7 +22,7 @@ public interface IManaDissolvable {
/**
* Called for every tick the item is on a mana pool. If the stack has stack
* size 0 the item is killed. This is called in both the server and client.
* size 0 the item is killed. This is called serverside.
*/
public void onDissolveTick(IManaPool pool, ItemStack stack, EntityItem item);
@@ -11,6 +11,7 @@
package vazkii.botania.api.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -23,16 +24,18 @@ import net.minecraft.item.ItemStack;
*/
public interface IManaProficiencyArmor {
public boolean shouldGiveProficiency(ItemStack stack, int slot, EntityPlayer player);
public boolean shouldGiveProficiency(ItemStack stack, EntityEquipmentSlot slot, EntityPlayer player);
public final static class Helper {
public static boolean hasProficiency(EntityPlayer player) {
for(int i = 0; i < 4; i++) {
ItemStack armor = player.getCurrentArmor(i);
for(EntityEquipmentSlot e: EntityEquipmentSlot.values()) {
if(e.getSlotType() != EntityEquipmentSlot.Type.ARMOR)
continue;
ItemStack armor = player.getItemStackFromSlot(e);
if(armor != null) {
Item item = armor.getItem();
if(item instanceof IManaProficiencyArmor && ((IManaProficiencyArmor) item).shouldGiveProficiency(armor, i, player))
if(item instanceof IManaProficiencyArmor && ((IManaProficiencyArmor) item).shouldGiveProficiency(armor, e, player))
return true;
}
}
@@ -10,11 +10,11 @@
*/
package vazkii.botania.api.item;
import java.util.UUID;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import java.util.UUID;
/**
* An item that implements this counts as a Relic item. This is purely for interaction
* and other mod items should not implement this interface.
@@ -12,8 +12,8 @@ package vazkii.botania.api.item;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
/**
* An item that implements this can break multiple blocks at once
@@ -10,13 +10,11 @@
*/
package vazkii.botania.api.item;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import net.minecraft.util.math.BlockPos;
import java.util.List;
/**
* An item that implements this will allow for various wireframes to be drawn
@@ -27,8 +25,16 @@ public interface IWireframeCoordinateListProvider {
/**
* Returns a list of BlockPos for the wireframes to draw.
* Can be null.
* Will not be null.
*/
public List<BlockPos> getWireframesToDraw(EntityPlayer player, ItemStack stack);
/**
* Gets a wireframe to draw thicker than the rest.
* This is useful to indicate the precedence of some position over the others.
* @return The position of a single wireframe to draw thicker than all the others.
*/
public BlockPos getSourceWireframe(EntityPlayer player, ItemStack stack);
}
@@ -12,8 +12,6 @@ package vazkii.botania.api.item;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* Why would you ever want this ._.
@@ -10,10 +10,10 @@
*/
package vazkii.botania.api.lexicon;
import java.util.Queue;
import net.minecraftforge.fml.common.eventhandler.Event;
import java.util.Queue;
/**
* Fired when the Lexica Botania's tutorial is started. You can add your
* own entries to the tutorial here. Please use this responsibly.
@@ -12,7 +12,7 @@ package vazkii.botania.api.lexicon;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
@@ -1,14 +1,14 @@
package vazkii.botania.api.lexicon;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.text.TextFormatting;
public class KnowledgeType {
public final String id;
public final EnumChatFormatting color;
public final TextFormatting color;
public final boolean autoUnlock;
public KnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) {
public KnowledgeType(String id, TextFormatting color, boolean autoUnlock) {
this.id = id;
this.color = color;
this.autoUnlock = autoUnlock;
@@ -10,11 +10,12 @@
*/
package vazkii.botania.api.lexicon;
import net.minecraft.util.ResourceLocation;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.util.ResourceLocation;
public class LexiconCategory implements Comparable<LexiconCategory> {
private static int count = 0;
@@ -70,7 +71,7 @@ public class LexiconCategory implements Comparable<LexiconCategory> {
}
@Override
public int compareTo(LexiconCategory category) {
public int compareTo(@Nonnull LexiconCategory category) {
return priority == category.priority ? sortingId - category.sortingId : category.priority - priority;
}
}
@@ -10,16 +10,17 @@
*/
package vazkii.botania.api.lexicon;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.BotaniaAPI;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import vazkii.botania.api.BotaniaAPI;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class LexiconEntry implements Comparable<LexiconEntry> {
public final String unlocalizedName;
@@ -27,11 +28,11 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
private KnowledgeType type = BotaniaAPI.basicKnowledge;
public List<LexiconPage> pages = new ArrayList<>();
public final List<LexiconPage> pages = new ArrayList<>();
private boolean priority = false;
private ItemStack icon = null;
private List<ItemStack> extraDisplayedRecipes = new ArrayList<>();
private final List<ItemStack> extraDisplayedRecipes = new ArrayList<>();
/**
* @param unlocalizedName The unlocalized name of this entry. This will be localized by the client display.
@@ -122,7 +123,7 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
}
public final String getNameForSorting() {
return (priority ? 0 : 1) + StatCollector.translateToLocal(getUnlocalizedName());
return (priority ? 0 : 1) + I18n.translateToLocal(getUnlocalizedName());
}
public List<ItemStack> getDisplayedRecipes() {
@@ -159,7 +160,7 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
}
@Override
public int compareTo(LexiconEntry o) {
public int compareTo(@Nonnull LexiconEntry o) {
return getNameForSorting().compareTo(o.getNameForSorting());
}
@@ -10,13 +10,13 @@
*/
package vazkii.botania.api.lexicon;
import java.util.List;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.internal.IGuiLexiconEntry;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.internal.IGuiLexiconEntry;
import java.util.List;
public abstract class LexiconPage {
@@ -40,9 +40,7 @@ public abstract class LexiconPage {
* Called per update tick. Non gui-sensitive version, kept for backwards compatibility only.
*/
@SideOnly(Side.CLIENT)
public void updateScreen() {
// NO-OP
}
public void updateScreen() {}
/**
* Called per update tick. Feel free to override fully, the
@@ -58,41 +56,31 @@ public abstract class LexiconPage {
* You can add buttons and whatever you'd do on initGui() here.
*/
@SideOnly(Side.CLIENT)
public void onOpened(IGuiLexiconEntry gui) {
// NO-OP
}
public void onOpened(IGuiLexiconEntry gui) {}
/**
* Called when this page is opened, be it via closing the gui or when the player changes page.
* Make sure to dispose of anything you don't use any more, such as buttons in the gui's buttonList.
*/
@SideOnly(Side.CLIENT)
public void onClosed(IGuiLexiconEntry gui) {
// NO-OP
}
public void onClosed(IGuiLexiconEntry gui) {}
/**
* Called when a button is pressed, equivalent to GuiScreen.actionPerformed.
*/
@SideOnly(Side.CLIENT)
public void onActionPerformed(IGuiLexiconEntry gui, GuiButton button) {
// NO-OP
}
public void onActionPerformed(IGuiLexiconEntry gui, GuiButton button) {}
/**
* Called when a key is pressed.
*/
@SideOnly(Side.CLIENT)
public void onKeyPressed(char c, int key) {
// NO-OP
}
public void onKeyPressed(char c, int key) {}
/**
* Called when {@link LexiconEntry#setLexiconPages(LexiconPage...)} is called.
*/
public void onPageAdded(LexiconEntry entry, int index) {
// NO-OP
}
public void onPageAdded(LexiconEntry entry, int index) {}
/**
* Shows the list of recipes present in this page for display in the category
@@ -10,12 +10,13 @@
*/
package vazkii.botania.api.lexicon;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.api.mana.IManaItem;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.mana.IManaItem;
/**
* This class contains mappings for which entry and page correspond to each
* craftable ItemStack. Use the map method to map an ItemStack to a page in
@@ -23,7 +24,7 @@ import vazkii.botania.api.mana.IManaItem;
*/
public final class LexiconRecipeMappings {
private static Map<String, EntryData> mappings = new HashMap<>();
private static final Map<String, EntryData> mappings = new HashMap<>();
/**
* Maps the given stack to the given page of the entry.
@@ -47,21 +48,28 @@ public final class LexiconRecipeMappings {
}
public static EntryData getDataForStack(ItemStack stack) {
String wildKey = stackToString(stack, true);
if (mappings.containsKey(wildKey))
return mappings.get(wildKey);
return mappings.get(stackToString(stack));
}
public static String stackToString(ItemStack stack) {
return stackToString(stack, false);
}
public static String stackToString(ItemStack stack, boolean forceIgnore) {
if(stack == null || stack.getItem() == null)
return "NULL";
if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider)
return ((IRecipeKeyProvider) stack.getItem()).getKey(stack);
return stack.getUnlocalizedName() + (ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
return stack.getUnlocalizedName() + (forceIgnore || ignoreMeta(stack) ? "" : "~" + stack.getItemDamage());
}
public static boolean ignoreMeta(ItemStack stack) {
return stack.isItemStackDamageable() || stack.getItem() instanceof IManaItem;
return stack.isItemStackDamageable() || stack.getItem() instanceof IManaItem || stack.getItemDamage() == OreDictionary.WILDCARD_VALUE;
}
public static class EntryData {
@@ -10,14 +10,14 @@
*/
package vazkii.botania.api.lexicon.multiblock;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.world.IBlockAccess;
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
import java.util.HashMap;
import java.util.Map;
/**
* A hook for rendering blocks in the multiblock display.
*/
@@ -25,7 +25,7 @@ public interface IMultiblockRenderHook {
public static Map<Block, IMultiblockRenderHook> renderHooks = new HashMap<>();
public void renderBlockForMultiblock(IBlockAccess world, Multiblock mb, IBlockState state, MultiblockComponent comp, float alpha);
public void renderBlockForMultiblock(IBlockAccess world, Multiblock mb, IBlockState state, MultiblockComponent comp);
public boolean needsTranslate(IBlockState state);
@@ -10,14 +10,18 @@
*/
package vazkii.botania.api.lexicon.multiblock;
import java.util.*;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
import java.util.ArrayList;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* This class describes a Mutiblock object. It's used to display a
* multiblock in the lexicon and to show the player in a ghost-like
@@ -25,14 +29,14 @@ import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
*/
public class Multiblock {
public List<MultiblockComponent> components = new ArrayList<>();
public List<ItemStack> materials = new ArrayList<>();
public final List<MultiblockComponent> components = new ArrayList<>();
public final List<ItemStack> materials = new ArrayList<>();
public BlockPos minPos = BlockPos.ORIGIN;
public BlockPos maxPos = BlockPos.ORIGIN;
public BlockPos offPos = BlockPos.ORIGIN;
public HashMap<BlockPos, MultiblockComponent> locationCache = new HashMap<>();
public final HashMap<BlockPos, MultiblockComponent> locationCache = new HashMap<>();
/**
* Adds a multiblock component to this multiblock. The component's x y z
@@ -10,9 +10,8 @@
*/
package vazkii.botania.api.lexicon.multiblock.component;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
@@ -26,8 +25,8 @@ public class AnyComponent extends MultiblockComponent {
@Override
public boolean matches(World world, BlockPos pos) {
Block block = world.getBlockState(pos).getBlock();
return !block.isAir(world, pos) && block.getCollisionBoundingBox(world, pos, world.getBlockState(pos)) != null;
IBlockState state = world.getBlockState(pos);
return !state.getBlock().isAir(state, world, pos) && state.getCollisionBoundingBox(world, pos) != null;
}
}
@@ -14,7 +14,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
@@ -11,7 +11,7 @@
package vazkii.botania.api.lexicon.multiblock.component;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.state.BotaniaStateProps;
@@ -13,7 +13,7 @@ package vazkii.botania.api.lexicon.multiblock.component;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -27,7 +27,7 @@ public class MultiblockComponent {
protected BlockPos relPos;
protected final IBlockState state;
protected final TileEntity tileEntity;
private boolean doFancyRender;
private final boolean doFancyRender;
public MultiblockComponent(BlockPos relPos, IBlockState state) {
this(relPos, state, null);
@@ -1,7 +1,7 @@
package vazkii.botania.api.lexicon.multiblock.component;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
// Multiblock component that only compares blocks, not blockstates
@@ -17,8 +17,32 @@ package vazkii.botania.api.mana;
*/
public interface IDirectioned {
/**
* @return The X rotation, in degrees
*/
public float getRotationX();
/**
* @return The Y rotation, in degrees
*/
public float getRotationY();
/**
* Set the X rotation
* @param rot X rotation, in degrees
*/
public void setRotationX(float rot);
/**
* Set the Y rotation
* @param rot Y rotation, in degrees
*/
public void setRotationY(float rot);
/**
* This should be called after rotation setting is done to allow
* for the block to re-calculate.
*/
public void commitRedirection();
}
@@ -1,23 +0,0 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [Jun 19, 2015, 10:05:24 PM (GMT)]
*/
package vazkii.botania.api.mana;
import java.util.UUID;
/**
* This interface marks a TileEntity that can be identified through
* an UUID. This UUID must presist between sessions.
*/
public interface IIdentifiable {
public UUID getIdentifier();
}
@@ -10,7 +10,7 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
@@ -11,8 +11,6 @@
package vazkii.botania.api.mana;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
/**
* Have an Item implement this to be counted as a lens for the mana spreader.
@@ -11,7 +11,7 @@
package vazkii.botania.api.mana;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.math.RayTraceResult;
import vazkii.botania.api.internal.IManaBurst;
/**
@@ -31,7 +31,7 @@ public interface ILensEffect {
* any block. This is called after the collision is handled.
* @return True to kill the burst. False to keep it alive.
*/
public boolean collideBurst(IManaBurst burst, MovingObjectPosition pos, boolean isManaBlock, boolean dead, ItemStack stack);
public boolean collideBurst(IManaBurst burst, RayTraceResult pos, boolean isManaBlock, boolean dead, ItemStack stack);
/**
* Called when a mana burst fired from a mana spreader with this focus is updated.
@@ -10,12 +10,16 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
/**
* Any TileEntity that implements this can be counted as a "ghost" block of
* Any Block that implements this can be counted as a "ghost" block of
* sorts, that won't call the collision code for the mana bursts.
*/
public interface IManaCollisionGhost {
public boolean isGhost();
public boolean isGhost(IBlockState state, World world, BlockPos pos);
}
@@ -10,6 +10,8 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.item.EnumDyeColor;
/**
* Any TileEntity that implements this is considered a Mana Pool,
* by which nearby functional flowers will pull mana from it.<br>
@@ -27,4 +29,15 @@ public interface IManaPool extends IManaReceiver {
*/
public boolean isOutputtingPower();
/**
* @return The color of this pool.
*/
public EnumDyeColor getColor();
/**
* Sets the color of this pool.
* @param color The color to set.
*/
public void setColor(EnumDyeColor color);
}
@@ -10,7 +10,7 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import vazkii.botania.api.internal.IManaBurst;
@@ -10,15 +10,15 @@
*/
package vazkii.botania.api.mana;
import java.util.UUID;
import vazkii.botania.api.internal.IManaBurst;
import java.util.UUID;
/**
* This describes an interface of a Mana Sender block that should be able to pingbackable
* by a burst to tell it that the burst is still alive.
*/
public interface IPingable extends IIdentifiable {
public interface IPingable {
/**
* Pings this object back, telling it that the burst passed in is still alive
@@ -28,4 +28,9 @@ public interface IPingable extends IIdentifiable {
*/
public void pingback(IManaBurst burst, UUID expectedIdentity);
/**
* @return A unique and persistent identifier for this IPingable
*/
public UUID getIdentifier();
}
@@ -11,7 +11,7 @@
package vazkii.botania.api.mana;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -1,29 +0,0 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*
* File Created @ [15/11/2015, 19:28:18 (GMT)]
*/
package vazkii.botania.api.mana;
/**
* This is an extension of IDirectioned for TileEntities
* that allow for their rotation to be public and modifiable outside.
* This is used in botania for the Redirective mana lens.
*/
public interface IRedirectable extends IDirectioned {
public void setRotationX(float rot);
public void setRotationY(float rot);
/**
* This should be called after rotation setting is done to allow
* for the block to re-calculate.
*/
public void commitRedirection();
}
@@ -145,7 +145,7 @@ public final class ManaItemHandler {
if(stack.getItem() instanceof IManaItem && !((IManaItem) stack.getItem()).canExportManaToItem(stack, stackInSlot))
continue;
int received = 0;
int received;
if(manaItemSlot.getMana(stackInSlot) + manaToSend <= manaItemSlot.getMaxMana(stackInSlot))
received = manaToSend;
else received = manaToSend - (manaItemSlot.getMana(stackInSlot) + manaToSend - manaItemSlot.getMaxMana(stackInSlot));
@@ -4,17 +4,25 @@ import net.minecraft.tileentity.TileEntity;
public class TileSignature {
public final TileEntity tile;
public final boolean remoteWorld;
private final TileEntity tile;
private final boolean remoteWorld;
public TileSignature(TileEntity tile, boolean remoteWorld) {
this.tile = tile;
this.remoteWorld = remoteWorld;
}
public TileEntity getTile() {
return tile;
}
public boolean isRemote() {
return remoteWorld;
}
@Override
public int hashCode() {
return Boolean.hashCode(remoteWorld) ^ tile.hashCode();
return Boolean.hashCode(remoteWorld) ^ System.identityHashCode(tile);
}
@Override
@@ -10,13 +10,13 @@
*/
package vazkii.botania.api.mana.spark;
import java.util.List;
import com.google.common.base.Predicates;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.World;
import java.util.List;
public final class SparkHelper {
public static final int SPARK_SCAN_RANGE = 12;
@@ -1,4 +1,4 @@
@API(owner = "Botania", apiVersion = "77", provides = "BotaniaAPI")
@API(owner = "Botania", apiVersion = "79", provides = "BotaniaAPI")
package vazkii.botania.api;
import net.minecraftforge.fml.common.API;
@@ -10,13 +10,13 @@
*/
package vazkii.botania.api.recipe;
import java.util.List;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraftforge.fml.common.eventhandler.Event;
import java.util.List;
/**
* An event fired when an Elven Portal TE updates. The portal's
* relevant AABB and other stuff is passed in for convenience. This
@@ -10,18 +10,17 @@
*/
package vazkii.botania.api.recipe;
import java.util.ArrayList;
import java.util.List;
import com.google.common.collect.ImmutableList;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.api.brew.Brew;
import vazkii.botania.api.brew.IBrewContainer;
import java.util.ArrayList;
import java.util.List;
public class RecipeBrew {
private final Brew brew;
@@ -89,7 +88,7 @@ public class RecipeBrew {
return inputsMissing.isEmpty();
}
boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) {
private boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) {
return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage();
}
@@ -107,7 +106,7 @@ public class RecipeBrew {
public ItemStack getOutput(ItemStack stack) {
if(stack == null || !(stack.getItem() instanceof IBrewContainer))
return new ItemStack(Items.glass_bottle); // Fallback...
return new ItemStack(Items.GLASS_BOTTLE); // Fallback...
IBrewContainer container = (IBrewContainer) stack.getItem();
return container.getItemForBrew(brew, stack);
@@ -1,12 +1,12 @@
package vazkii.botania.api.recipe;
import java.util.ArrayList;
import java.util.List;
import com.google.common.collect.ImmutableList;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import java.util.List;
public class RecipeElvenTrade {
private final ItemStack output;
@@ -80,7 +80,7 @@ public class RecipeElvenTrade {
return inputsMissing.isEmpty();
}
boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) {
private boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) {
return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage();
}
@@ -10,18 +10,22 @@
*/
package vazkii.botania.api.recipe;
import java.util.List;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import javax.annotation.Nullable;
import java.util.List;
public class RecipeManaInfusion {
private final ItemStack output;
private final Object input;
private final int mana;
boolean isAlchemy = false;
boolean isConjuration = false;
private @Nullable IBlockState catalystState;
public static IBlockState alchemyState;
public static IBlockState conjurationState;
public RecipeManaInfusion(ItemStack output, Object input, int mana) {
this.output = output;
@@ -54,20 +58,12 @@ public class RecipeManaInfusion {
return false;
}
public void setAlchemy(boolean alchemy) {
isAlchemy = alchemy;
public IBlockState getCatalyst() {
return catalystState;
}
public boolean isAlchemy() {
return isAlchemy;
}
public void setConjuration(boolean conjuration) {
isConjuration = conjuration;
}
public boolean isConjuration() {
return isConjuration;
public void setCatalyst(IBlockState catalyst) {
catalystState = catalyst;
}
public Object getInput() {
@@ -81,5 +77,37 @@ public class RecipeManaInfusion {
public int getManaToConsume() {
return mana;
}
/**
* @deprecated Use {@link RecipeManaInfusion#setCatalyst(IBlockState)} instead
*/
@Deprecated
public void setAlchemy(boolean alchemy) {
catalystState = alchemy ? alchemyState : null;
}
/**
* @deprecated Use {@link RecipeManaInfusion#getCatalyst()} instead
*/
@Deprecated
public boolean isAlchemy() {
return catalystState == alchemyState;
}
/**
* @deprecated Use {@link RecipeManaInfusion#setCatalyst(IBlockState)} instead
*/
@Deprecated
public void setConjuration(boolean conjuration) {
catalystState = conjuration ? conjurationState : null;
}
/**
* @deprecated Use {@link RecipeManaInfusion#getCatalyst()} instead
*/
@Deprecated
public boolean isConjuration() {
return catalystState == conjurationState;
}
}
@@ -17,7 +17,7 @@ public class RecipeMiniFlower extends RecipeManaInfusion {
public RecipeMiniFlower(String flower, String mini, int mana) {
super(BotaniaAPI.internalHandler.getSubTileAsStack(flower), BotaniaAPI.internalHandler.getSubTileAsStack(mini), mana);
setAlchemy(true);
setCatalyst(RecipeManaInfusion.alchemyState);
}
@Override
@@ -10,15 +10,14 @@
*/
package vazkii.botania.api.recipe;
import java.util.ArrayList;
import java.util.List;
import com.google.common.collect.ImmutableList;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.oredict.OreDictionary;
import java.util.ArrayList;
import java.util.List;
public class RecipePetals {
private final ItemStack output;
@@ -83,7 +82,7 @@ public class RecipePetals {
return inputsMissing.isEmpty();
}
boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) {
private boolean simpleAreStacksEqual(ItemStack stack, ItemStack stack2) {
return stack.getItem() == stack2.getItem() && stack.getItemDamage() == stack2.getItemDamage();
}
@@ -10,19 +10,19 @@
*/
package vazkii.botania.api.recipe;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.common.base.Preconditions;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.api.subtile.SubTileEntity;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RecipePureDaisy {
public static final int DEFAULT_TIME = 150;
@@ -57,7 +57,7 @@ public class RecipePureDaisy {
return isOreDict(stack, oredict);
}
public boolean isOreDict(ItemStack stack, String entry) {
private boolean isOreDict(ItemStack stack, String entry) {
if(stack == null || stack.getItem() == null)
return false;
@@ -0,0 +1,62 @@
package vazkii.botania.api.sound;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
/**
* Use these to play Botania sounds.
* Do not access this class before Botania preinits!
*/
public final class BotaniaSoundEvents {
public static final SoundEvent airRod = getRegisteredSoundEvent("botania:airRod");
public static final SoundEvent agricarnation = getRegisteredSoundEvent("botania:agricarnation");
public static final SoundEvent altarCraft = getRegisteredSoundEvent("botania:altarCraft");
public static final SoundEvent babylonAttack = getRegisteredSoundEvent("botania:babylonAttack");
public static final SoundEvent babylonSpawn = getRegisteredSoundEvent("botania:babylonSpawn");
public static final SoundEvent bellows = getRegisteredSoundEvent("botania:bellows");
public static final SoundEvent bifrostRod = getRegisteredSoundEvent("botania:bifrostRod");
public static final SoundEvent blackLotus = getRegisteredSoundEvent("botania:blackLotus");
public static final SoundEvent dash = getRegisteredSoundEvent("botania:dash");
public static final SoundEvent ding = getRegisteredSoundEvent("botania:ding");
public static final SoundEvent divaCharm = getRegisteredSoundEvent("botania:divaCharm");
public static final SoundEvent divinationRod = getRegisteredSoundEvent("botania:divinationRod");
public static final SoundEvent doit = getRegisteredSoundEvent("botania:doit");
public static final SoundEvent enchanterFade = getRegisteredSoundEvent("botania:enchanterForm");
public static final SoundEvent enchanterForm = getRegisteredSoundEvent("botania:enchanterFade");
public static final SoundEvent enchanterEnchant = getRegisteredSoundEvent("botania:enchanterEnchant");
public static final SoundEvent endoflame = getRegisteredSoundEvent("botania:endoflame");
public static final SoundEvent equipBauble = getRegisteredSoundEvent("botania:equipBauble");
public static final SoundEvent gaiaTrap = getRegisteredSoundEvent("botania:gaiaTrap");
public static final SoundEvent goldenLaurel = getRegisteredSoundEvent("botania:goldenLaurel");
public static final SoundEvent holyCloak = getRegisteredSoundEvent("botania:holyCloak");
public static final SoundEvent laputaStart = getRegisteredSoundEvent("botania:laputaStart");
public static final SoundEvent lexiconOpen = getRegisteredSoundEvent("botania:lexiconOpen");
public static final SoundEvent lexiconPage = getRegisteredSoundEvent("botania:lexiconPage");
public static final SoundEvent lightRelay = getRegisteredSoundEvent("botania:lightRelay");
public static final SoundEvent manaBlaster = getRegisteredSoundEvent("botania:manaBlaster");
public static final SoundEvent manaPoolCraft = getRegisteredSoundEvent("botania:manaPoolCraft");
public static final SoundEvent missile = getRegisteredSoundEvent("botania:missile");
public static final SoundEvent orechid = getRegisteredSoundEvent("botania:orechid");
public static final SoundEvent potionCreate = getRegisteredSoundEvent("botania:potionCreate");
public static final SoundEvent runeAltarCraft = getRegisteredSoundEvent("botania:runeAltarCraft");
public static final SoundEvent runeAltarStart = getRegisteredSoundEvent("botania:runeAltarStart");
public static final SoundEvent spreaderFire = getRegisteredSoundEvent("botania:spreaderFire");
public static final SoundEvent starcaller = getRegisteredSoundEvent("botania:starcaller");
public static final SoundEvent terraBlade = getRegisteredSoundEvent("botania:terraBlade");
public static final SoundEvent terraformRod = getRegisteredSoundEvent("botania:terraformRod");
public static final SoundEvent terraPickMode = getRegisteredSoundEvent("botania:terraPickMode");
public static final SoundEvent terrasteelCraft = getRegisteredSoundEvent("botania:terrasteelCraft");
public static final SoundEvent thermalily = getRegisteredSoundEvent("botania:thermalily");
public static final SoundEvent unholyCloak = getRegisteredSoundEvent("botania:unholyCloak");
public static final SoundEvent way = getRegisteredSoundEvent("botania:way");
public static final SoundEvent gaiaMusic1 = getRegisteredSoundEvent("botania:music.gaia1");
public static final SoundEvent gaiaMusic2 = getRegisteredSoundEvent("botania:music.gaia2");
private static SoundEvent getRegisteredSoundEvent(String name) {
return SoundEvent.REGISTRY.getObject(new ResourceLocation(name));
}
private BotaniaSoundEvents() {}
}
@@ -17,13 +17,31 @@ import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.EnumDyeColor;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import vazkii.botania.api.item.IFloatingFlower;
import vazkii.botania.api.state.enums.*;
import javax.annotation.Nullable;
import vazkii.botania.api.state.enums.AlfPortalState;
import vazkii.botania.api.state.enums.AltGrassVariant;
import vazkii.botania.api.state.enums.AltarVariant;
import vazkii.botania.api.state.enums.BiomeBrickVariant;
import vazkii.botania.api.state.enums.BiomeStoneVariant;
import vazkii.botania.api.state.enums.CratePattern;
import vazkii.botania.api.state.enums.CrateVariant;
import vazkii.botania.api.state.enums.CustomBrickVariant;
import vazkii.botania.api.state.enums.DrumVariant;
import vazkii.botania.api.state.enums.EndBrickVariant;
import vazkii.botania.api.state.enums.FutureStoneVariant;
import vazkii.botania.api.state.enums.LivingRockVariant;
import vazkii.botania.api.state.enums.LivingWoodVariant;
import vazkii.botania.api.state.enums.LuminizerVariant;
import vazkii.botania.api.state.enums.PlatformVariant;
import vazkii.botania.api.state.enums.PoolVariant;
import vazkii.botania.api.state.enums.PrismarineVariant;
import vazkii.botania.api.state.enums.PylonVariant;
import vazkii.botania.api.state.enums.QuartzVariant;
import vazkii.botania.api.state.enums.SpreaderVariant;
import vazkii.botania.api.state.enums.StorageVariant;
/**
* Holds all Botania block state properties. Use these to set botania blockstates
@@ -76,7 +94,7 @@ public final class BotaniaStateProps {
public static final PropertyEnum<FutureStoneVariant> FUTURESTONE_VARIANT = PropertyEnum.create("variant", FutureStoneVariant.class);
// Block18StoneWall
public static final PropertyEnum<FutureStoneVariant> FUTURESTONEWALL_VARIANT = PropertyEnum.create("variant", FutureStoneVariant.class, new Predicate<FutureStoneVariant>() {
public static final PropertyEnum<FutureStoneVariant> FUTURESTONEWALL_VARIANT = PropertyEnum.create("fswall_variant", FutureStoneVariant.class, new Predicate<FutureStoneVariant>() {
@Override
public boolean apply(FutureStoneVariant variant) {
// Just the four kinds (no polished, chiseled, etc.)
@@ -100,7 +118,7 @@ public final class BotaniaStateProps {
public static final PropertyEnum<BiomeBrickVariant> BIOMEBRICK_VARIANT = PropertyEnum.create("variant", BiomeBrickVariant.class);
// BlockBiomeStoneWall
public static final PropertyEnum<BiomeStoneVariant> BIOMESTONEWALL_VARIANT = PropertyEnum.create("variant", BiomeStoneVariant.class, new Predicate<BiomeStoneVariant>() {
public static final PropertyEnum<BiomeStoneVariant> BIOMESTONEWALL_VARIANT = PropertyEnum.create("bswall_variant", BiomeStoneVariant.class, new Predicate<BiomeStoneVariant>() {
@Override
public boolean apply(BiomeStoneVariant input) {
return input.getName().contains("cobble");
@@ -132,7 +150,7 @@ public final class BotaniaStateProps {
public static final PropertyEnum<LivingRockVariant> LIVINGROCK_VARIANT = PropertyEnum.create("variant", LivingRockVariant.class);
// BlockModDoubleFlower (white to gray)
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_1 = PropertyEnum.create("variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_1 = PropertyEnum.create("df_variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
@Override
public boolean apply(EnumDyeColor input) {
return input.ordinal() >= 0 && input.ordinal() <= 7;
@@ -140,7 +158,7 @@ public final class BotaniaStateProps {
});
// (silver to black)
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_2 = PropertyEnum.create("variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
public static final PropertyEnum<EnumDyeColor> DOUBLEFLOWER_VARIANT_2 = PropertyEnum.create("df_variant", EnumDyeColor.class, new Predicate<EnumDyeColor>() {
@Override
public boolean apply(EnumDyeColor input) {
return input.ordinal() >= 8 && input.ordinal() <= 15;
@@ -13,7 +13,6 @@ import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import net.minecraftforge.common.property.IUnlistedProperty;
import javax.annotation.Nullable;
import java.util.Objects;
// Generic base class for unlisted properties
@@ -10,8 +10,8 @@
*/
package vazkii.botania.api.subtile;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
/**
* This object describes the Radius of a SubTileEntity. It can either be
@@ -10,26 +10,27 @@
*/
package vazkii.botania.api.subtile;
import java.util.List;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.api.wand.IWandBindable;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
/**
* A Sub-TileEntity, this is used for the flower system. Make sure to map subclasses
@@ -51,6 +52,14 @@ public class SubTileEntity {
public static final String TAG_TYPE = "type";
public static final String TAG_TICKS_EXISTED = "ticksExisted";
public final BlockPos getPos() {
return supertile.getPos();
}
public final World getWorld() {
return supertile.getWorld();
}
public void setSupertile(TileEntity tile) {
supertile = tile;
}
@@ -119,28 +128,22 @@ public class SubTileEntity {
/**
* Called when this sub tile is placed in the world (by an entity).
*/
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
// NO-OP
}
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {}
/**
* Called when a player right clicks this sub tile.
*/
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { return false; }
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing side, float hitX, float hitY, float hitZ) { return false; }
/**
* Called when this sub tile is added to the world.
*/
public void onBlockAdded(World world, BlockPos pos, IBlockState state) {
//NO-OP
}
public void onBlockAdded(World world, BlockPos pos, IBlockState state) {}
/**
* Called when this sub tile is harvested
*/
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) {
//NO-OP
}
public void onBlockHarvested(World world, BlockPos pos, IBlockState state, EntityPlayer player) {}
/**
* Allows additional processing of sub tile drops
@@ -182,14 +185,14 @@ public class SubTileEntity {
}
/**
* @see IWandBindable#canSelect(EntityPlayer, ItemStack, net.minecraft.util.BlockPos, net.minecraft.util.EnumFacing)
* @see IWandBindable#canSelect(EntityPlayer, ItemStack, net.minecraft.util.math.BlockPos, net.minecraft.util.EnumFacing)
*/
public boolean canSelect(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
return false;
}
/**
* @see IWandBindable#bindTo(EntityPlayer, ItemStack, net.minecraft.util.BlockPos, net.minecraft.util.EnumFacing)
* @see IWandBindable#bindTo(EntityPlayer, ItemStack, net.minecraft.util.math.BlockPos, net.minecraft.util.EnumFacing)
*/
public boolean bindTo(EntityPlayer player, ItemStack wand, BlockPos pos, EnumFacing side) {
return false;
@@ -200,15 +203,13 @@ public class SubTileEntity {
* Used to render a HUD portraying some data from this sub tile.
*/
@SideOnly(Side.CLIENT)
public void renderHUD(Minecraft mc, ScaledResolution res) {
// NO-OP
}
public void renderHUD(Minecraft mc, ScaledResolution res) {}
/**
* Gets the light value for this SubTileEntity, this is a int (-1 to default to the flower)
*/
public int getLightValue() {
return -1;
return 0;
}
/**
@@ -10,27 +10,31 @@
*/
package vazkii.botania.api.subtile;
import java.awt.Color;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.StatCollector;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.IManaNetwork;
import vazkii.botania.api.mana.IManaPool;
import vazkii.botania.api.sound.BotaniaSoundEvents;
import java.awt.*;
/**
* The basic class for a Functional Flower.
*/
public class SubTileFunctional extends SubTileEntity {
public static final int RANGE = 10;
public static final int LINK_RANGE = 10;
private static final String TAG_MANA = "mana";
@@ -113,7 +117,7 @@ public class SubTileFunctional extends SubTileEntity {
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
int size = network.getAllPoolsInWorld(supertile.getWorld()).size();
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
linkedPool = network.getClosestPool(supertile.getPos(), supertile.getWorld(), RANGE);
linkedPool = network.getClosestPool(supertile.getPos(), supertile.getWorld(), LINK_RANGE);
sizeLastCheck = size;
}
}
@@ -133,7 +137,7 @@ public class SubTileFunctional extends SubTileEntity {
return false;
knownMana = mana;
player.worldObj.playSoundAtEntity(player, "botania:ding", 0.1F, 1F);
player.worldObj.playSound(null, player.posX, player.posY, player.posZ, BotaniaSoundEvents.ding, SoundCategory.PLAYERS, 0.1F, 1F);
return super.onWanded(player, wand);
}
@@ -206,12 +210,13 @@ public class SubTileFunctional extends SubTileEntity {
}
public boolean isValidBinding() {
return linkedPool != null && !linkedPool.isInvalid() && supertile.getWorld().isBlockLoaded(linkedPool.getPos(), false) && supertile.getWorld().getTileEntity(linkedPool.getPos()) == linkedPool;
return linkedPool != null && linkedPool.hasWorldObj() && !linkedPool.isInvalid() && supertile.getWorld().isBlockLoaded(linkedPool.getPos(), false) && supertile.getWorld().getTileEntity(linkedPool.getPos()) == linkedPool;
}
@SideOnly(Side.CLIENT)
@Override
public void renderHUD(Minecraft mc, ScaledResolution res) {
String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name");
String name = I18n.format("tile.botania:flower." + getUnlocalizedName() + ".name");
int color = getColor();
BotaniaAPI.internalHandler.drawComplexManaHUD(color, knownMana, getMaxMana(), name, res, BotaniaAPI.internalHandler.getBindDisplayForFlowerType(this), isValidBinding());
}
@@ -10,33 +10,37 @@
*/
package vazkii.botania.api.subtile;
import java.awt.Color;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.StatCollector;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.IManaNetwork;
import vazkii.botania.api.mana.IManaCollector;
import vazkii.botania.api.sound.BotaniaSoundEvents;
import java.awt.*;
import java.util.List;
/**
* The basic class for a Generating Flower.
*/
public class SubTileGenerating extends SubTileEntity {
public static final int RANGE = 6;
public static final int LINK_RANGE = 6;
private static final String TAG_MANA = "mana";
@@ -99,9 +103,10 @@ public class SubTileGenerating extends SubTileEntity {
int muhBalance = BotaniaAPI.internalHandler.getPassiveFlowerDecay();
if(passive && muhBalance > 0 && passiveDecayTicks > muhBalance) {
supertile.getWorld().playAuxSFX(2001, supertile.getPos(), Block.getIdFromBlock(supertile.getBlockType()));
if(supertile.getWorld().getBlockState(supertile.getPos().down()).getBlock().isSideSolid(supertile.getWorld(), supertile.getPos().down(), EnumFacing.UP))
supertile.getWorld().setBlockState(supertile.getPos(), Blocks.deadbush.getDefaultState());
IBlockState state = supertile.getWorld().getBlockState(supertile.getPos());
supertile.getWorld().playEvent(2001, supertile.getPos(), Block.getStateId(state));
if(supertile.getWorld().getBlockState(supertile.getPos().down()).isSideSolid(supertile.getWorld(), supertile.getPos().down(), EnumFacing.UP))
supertile.getWorld().setBlockState(supertile.getPos(), Blocks.DEADBUSH.getDefaultState());
else supertile.getWorld().setBlockToAir(supertile.getPos());
}
}
@@ -137,7 +142,7 @@ public class SubTileGenerating extends SubTileEntity {
IManaNetwork network = BotaniaAPI.internalHandler.getManaNetworkInstance();
int size = network.getAllCollectorsInWorld(supertile.getWorld()).size();
if(BotaniaAPI.internalHandler.shouldForceCheck() || size != sizeLastCheck) {
linkedCollector = network.getClosestCollector(supertile.getPos(), supertile.getWorld(), RANGE);
linkedCollector = network.getClosestCollector(supertile.getPos(), supertile.getWorld(), LINK_RANGE);
sizeLastCheck = size;
}
}
@@ -219,7 +224,7 @@ public class SubTileGenerating extends SubTileEntity {
sync();
knownMana = mana;
player.worldObj.playSoundAtEntity(player, "botania:ding", 0.1F, 1F);
player.worldObj.playSound(null, player.posX, player.posY, player.posZ, BotaniaSoundEvents.ding, SoundCategory.PLAYERS, 0.1F, 1F);
return super.onWanded(player, wand);
}
@@ -299,9 +304,10 @@ public class SubTileGenerating extends SubTileEntity {
return linkedCollector != null && !linkedCollector.isInvalid() && supertile.getWorld().getTileEntity(linkedCollector.getPos()) == linkedCollector;
}
@SideOnly(Side.CLIENT)
@Override
public void renderHUD(Minecraft mc, ScaledResolution res) {
String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name");
String name = I18n.format("tile.botania:flower." + getUnlocalizedName() + ".name");
int color = getColor();
BotaniaAPI.internalHandler.drawComplexManaHUD(color, knownMana, getMaxMana(), name, res, BotaniaAPI.internalHandler.getBindDisplayForFlowerType(this), isValidBinding());
}
Loaded 100 of 1373 files, more files were not shown because too many files have changed in this diff. Show more