This commit is contained in:
HuTao今天吃什么 2022-09-14 09:57:06 +08:00
parent 5a9dfb3817
commit 9b8c27ce2b
51 changed files with 700 additions and 97 deletions

View File

@ -2,42 +2,50 @@ e38c09d6078d766db3c3f89a6d142188fa8f001e assets/extrabotany/blockstates/annoying
d8037506f382c747b09386ef33f783a89a99ed00 assets/extrabotany/blockstates/bell_flower.json
187d0927d4fd5ec74e9817ae34b2649bd09b7e5e assets/extrabotany/blockstates/bloody_enchantress.json
dbc222be6f8a545d188cf3589239de49525e15f5 assets/extrabotany/blockstates/dimension_catalyst.json
4b9c8729dd39973b09bed51459893236bf6d8387 assets/extrabotany/blockstates/edelweiss.json
05e09f160dd6650e086d3ebb5ed87aa579adb7cb assets/extrabotany/blockstates/floating_annoying_flower.json
5b631e7e021e92480be0d9e3fa1894a04069cbdf assets/extrabotany/blockstates/floating_bell_flower.json
8ee66280e8179cd017bec1f60f6e548b822a1f65 assets/extrabotany/blockstates/floating_bloody_enchantress.json
264bc6633e6f73d25707342f1f7dd014d98038fc assets/extrabotany/blockstates/floating_edelweiss.json
455e6a1a88b0c3ed812cbaceb034968e6c8a1303 assets/extrabotany/blockstates/floating_gemini_orchid.json
fc4deb51d88c3e1375ea88f9613f9a4d77ba35b2 assets/extrabotany/blockstates/floating_moonlight_lily.json
702fc6a7e5063e9e417e96756ed3a2d06389abf9 assets/extrabotany/blockstates/floating_omni_violet.json
8b9fd489aa8dbc73e12e654dc9283daf44225efa assets/extrabotany/blockstates/floating_reikar_orchid.json
a1be7243d90a320436ac01fbf38e85fb0fe07b5c assets/extrabotany/blockstates/floating_serenitian.json
9027328754e3415e083ed88f6233ee13b5d2c26e assets/extrabotany/blockstates/floating_sunshine_lily.json
066746c480a0f633ea3854d3038e3a7030f41491 assets/extrabotany/blockstates/floating_tinkle_flower.json
e9d047b6e3cb2b6c8c847ccba97a1d28509612d9 assets/extrabotany/blockstates/gemini_orchid.json
a11e55f651479912f38def68d408d3365bff4e6b assets/extrabotany/blockstates/moonlight_lily.json
5a080eb436b6239c0d12ac342ebf275038e45769 assets/extrabotany/blockstates/omni_violet.json
71832b8c18734652952bc3152cacd3f314ca391f assets/extrabotany/blockstates/reikar_orchid.json
5b4b6c301ff57c7d4006e79654cac0e1e68cbe60 assets/extrabotany/blockstates/serenitian.json
31853f21bb80a913ba27e5053a843459b3d7d37d assets/extrabotany/blockstates/sunshine_lily.json
98ef3075f38b46cec1ea7720d159ad1109096786 assets/extrabotany/blockstates/tinkle_flower.json
33aab13c8f8e2bda52b14bfd587caebe15b5f6a3 assets/extrabotany/lang/en_us.json
de8cd28e9ce1168fd4401d06d8da0f96828ae1f4 assets/extrabotany/lang/zh_cn.json
1423fcfc65550ac8651c5f92b35d377a6c2c9a61 assets/extrabotany/lang/zh_cn.json
477b72a89fa3546590428dd7d8d4528c711a98dc assets/extrabotany/models/block/annoying_flower.json
2f2803ccc1532c712c13241790c9ec65fb61a97d assets/extrabotany/models/block/bell_flower.json
2cc688d6536ea214d2c83c83c2cf9be55b342b23 assets/extrabotany/models/block/bloody_enchantress.json
995e10c99d5a5c5584b83dda81aa09af163109ee assets/extrabotany/models/block/dimension_catalyst.json
90452cce7b03c4b0a98af9e5f3addd48280a99af assets/extrabotany/models/block/edelweiss.json
8f6dd86dfe3c3c9d758ff0272c058960278b9155 assets/extrabotany/models/block/floating_annoying_flower.json
3766ab6086e3804cffa41d55e527876cc36ddeed assets/extrabotany/models/block/floating_bell_flower.json
56f54944fe1c8be8421661189be314beb3bfec5e assets/extrabotany/models/block/floating_bloody_enchantress.json
62411343ebd07eef450f8bf778b93dbf6dcc3cbf assets/extrabotany/models/block/floating_edelweiss.json
f1f02ee605d2be27d59b606e6dcbc3f414af4ce9 assets/extrabotany/models/block/floating_gemini_orchid.json
88b3f9a62613b594f6dd2697680d7f50f8352ce2 assets/extrabotany/models/block/floating_moonlight_lily.json
057af000dbb9ab4c3bb5130af0eaa68621a11b6a assets/extrabotany/models/block/floating_omni_violet.json
14fe5ffac46a71909d7e847110af5b12c4d6e1fb assets/extrabotany/models/block/floating_reikar_orchid.json
cbe18059f2fd88244ab8e40e02ff7f356310eb58 assets/extrabotany/models/block/floating_serenitian.json
a1eba4b8f0d964a4a9d035e3e2a352cd8eeed8a8 assets/extrabotany/models/block/floating_sunshine_lily.json
3e2bc6fee567de00252b62ae6c06d89a6fe02ef5 assets/extrabotany/models/block/floating_tinkle_flower.json
967e574d70c019c47dbf81222eec2509bb59061a assets/extrabotany/models/block/gemini_orchid.json
6a34d0ed52eae064b8779b84a2bfa79607a24bec assets/extrabotany/models/block/moonlight_lily.json
4288f9020b926e4f818fddb5cfdf7f0ba92f2cb0 assets/extrabotany/models/block/omni_violet.json
5a684062aa8ee11910e41e9d4e1b29e4752a9958 assets/extrabotany/models/block/reikar_orchid.json
d646020789da07a0ff51338c6028cdbc172c80ca assets/extrabotany/models/block/serenitian.json
b5cd069aca1419bf8fd640c67346e12432b61ec3 assets/extrabotany/models/block/sunshine_lily.json
78602e7c59cb0adb6c0ec37cd3b1b623b6e75e07 assets/extrabotany/models/block/tinkle_flower.json
94b6180fdfc8fee753e95283aa508f46067cc707 assets/extrabotany/models/item/acquaint_fate.json
e3d5211e924fb6ca504829ac55154d8d1d68c171 assets/extrabotany/models/item/aerialite.json
5618aae2f918155cbcbb9b3b6b4b9d4c7f1ddcd4 assets/extrabotany/models/item/aero_stone.json
@ -60,6 +68,7 @@ acd573711cb27cb29310524371b724e6ceb3e26c assets/extrabotany/models/item/death_ri
562299571233d914d4a784eadb9a15622a3fc864 assets/extrabotany/models/item/dimension_catalyst.json
4d887bda81e2d3accf74c4fc38a96bcd4bee2469 assets/extrabotany/models/item/dirt_shield.json
38d4283b1a7e6a89a5df67e113a7b4e635fa50f1 assets/extrabotany/models/item/earth_stone.json
04400fe21e57a3ddb7f2d676a88936907a753c21 assets/extrabotany/models/item/edelweiss.json
74207035e1e8eeef1204334540ba804a1dbdb223 assets/extrabotany/models/item/element_rune.json
fd4d4d590a1e7a91f441fafa153d4683c1cde5a3 assets/extrabotany/models/item/empty_bottle.json
1de90addd84e9b3dfb4e8abb9649f543792ffc1f assets/extrabotany/models/item/excaliber.json
@ -67,12 +76,14 @@ fd4d4d590a1e7a91f441fafa153d4683c1cde5a3 assets/extrabotany/models/item/empty_bo
8f6dd86dfe3c3c9d758ff0272c058960278b9155 assets/extrabotany/models/item/floating_annoying_flower.json
3766ab6086e3804cffa41d55e527876cc36ddeed assets/extrabotany/models/item/floating_bell_flower.json
56f54944fe1c8be8421661189be314beb3bfec5e assets/extrabotany/models/item/floating_bloody_enchantress.json
62411343ebd07eef450f8bf778b93dbf6dcc3cbf assets/extrabotany/models/item/floating_edelweiss.json
f1f02ee605d2be27d59b606e6dcbc3f414af4ce9 assets/extrabotany/models/item/floating_gemini_orchid.json
88b3f9a62613b594f6dd2697680d7f50f8352ce2 assets/extrabotany/models/item/floating_moonlight_lily.json
057af000dbb9ab4c3bb5130af0eaa68621a11b6a assets/extrabotany/models/item/floating_omni_violet.json
14fe5ffac46a71909d7e847110af5b12c4d6e1fb assets/extrabotany/models/item/floating_reikar_orchid.json
cbe18059f2fd88244ab8e40e02ff7f356310eb58 assets/extrabotany/models/item/floating_serenitian.json
a1eba4b8f0d964a4a9d035e3e2a352cd8eeed8a8 assets/extrabotany/models/item/floating_sunshine_lily.json
3e2bc6fee567de00252b62ae6c06d89a6fe02ef5 assets/extrabotany/models/item/floating_tinkle_flower.json
a4b4f1519eeee6a397e1e2c65afdf9a292d248cd assets/extrabotany/models/item/forest_book.json
4690dbe8ef90062465c0d473604a9ccd94a0796f assets/extrabotany/models/item/four_in_one_stone.json
b8a934e29cefc78f54e6bbb0618bafe24b015d5f assets/extrabotany/models/item/fox_ear.json
@ -146,13 +157,14 @@ a0f525bce077a9192cc0fb07e4c7aa547a829efa assets/extrabotany/models/item/the_orig
8677007ec220c130a2781df394b5d0a723163047 assets/extrabotany/models/item/the_universe.json
b6b8375c9ac717b1a014370749d965643a8bddd4 assets/extrabotany/models/item/thug_life.json
2d1f54da53f893b31504948e680cc3e35c672f8d assets/extrabotany/models/item/ticket.json
5893dd708222a000a330689ddd00b24172b5c4d6 assets/extrabotany/models/item/tinkle_flower.json
d8de18119b36e72cfdbad5cb28e00751b52582ad assets/extrabotany/models/item/treasure_box.json
7a229a4b908ef50d0c73d16cf49a2fc6c819129f assets/extrabotany/models/item/true_shadow_katana.json
571aaac43e08a389314b216d5e371ee532411829 assets/extrabotany/models/item/true_terra_blade.json
fc34ebbfdef507b53d88ff6d99454b1bb7cdef10 assets/extrabotany/models/item/true_thunstar_caller.json
c9ff3b120bf0d1145a5f6e82846b8f449c734da9 data/botania/tags/blocks/functional_special_flowers.json
f0157bda3705240824d3b807a76fa09fe83499e6 data/botania/tags/blocks/generating_special_flowers.json
fc32ee5b6f74887b80eb238fb12bf3b95291d246 data/botania/tags/blocks/special_floating_flowers.json
e24955f0e3e0924ca0570a81ee2998680679b5ea data/botania/tags/blocks/special_floating_flowers.json
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/botania/tags/items/floating_flowers.json
c9ff3b120bf0d1145a5f6e82846b8f449c734da9 data/botania/tags/items/functional_special_flowers.json
f0157bda3705240824d3b807a76fa09fe83499e6 data/botania/tags/items/generating_special_flowers.json
@ -179,7 +191,7 @@ fdd7219319bd75a5c113c12c6ca07dace05ce9a4 data/botania/tags/items/lens.json
5e4ee14735f7fd3237f544283308b0004b923e0e data/botania/tags/items/petals/yellow.json
9c618165c4ee510a737d9ee5a0e8a1d8699e4f81 data/botania/tags/items/rods.json
6574d25d30d63ccbce291b3a563ab57b3a10b3e6 data/botania/tags/items/runes.json
fc32ee5b6f74887b80eb238fb12bf3b95291d246 data/botania/tags/items/special_floating_flowers.json
e24955f0e3e0924ca0570a81ee2998680679b5ea data/botania/tags/items/special_floating_flowers.json
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/botania/tags/items/special_flowers.json
74700d556ca80c7a1db5fd4efb09c3ddb26cad66 data/curios/tags/items/belt.json
0680ecd3228a93ce457bfe3a4c92a204c5ec8975 data/curios/tags/items/body.json
@ -255,12 +267,14 @@ f5e78d715ea2359f1a3db33da9b5f41aa2b7edfc data/extrabotany/recipes/mana_infusion/
ea55eb923c5bd880a902395b8a7dba134c53538a data/extrabotany/recipes/mana_infusion/shulker_shell.json
b72c8c92edabdbd78bbb6154eafcb03668696f7d data/extrabotany/recipes/mana_infusion/soul_sand.json
3eceaa1d975ecd58ebb5f7199abe348bd56a8c95 data/extrabotany/recipes/mana_infusion/totem_of_undying.json
d3a3f04a2152882b02a66f8fc3f4a057c3595fd6 data/extrabotany/recipes/petal_apothecary/annoying_flower.json
114e818c308027a193b41c1950774eaff3f7e221 data/extrabotany/recipes/petal_apothecary/annoying_flower.json
02f99cdaa13f2acb4f81cd91f84dd8e8a8b1fb70 data/extrabotany/recipes/petal_apothecary/bell_flower.json
fafe1a78c7a5e021604fcda8e5904ac0c63b25d9 data/extrabotany/recipes/petal_apothecary/bloody_enchantress.json
217d2d560b739d1b85388d894aac179c553f9c86 data/extrabotany/recipes/petal_apothecary/gemini_orchid.json
1f0616a97c66094e106ee2c789fef7731262e1e3 data/extrabotany/recipes/petal_apothecary/moonlight_lily.json
cc033a80f7c8b21e8e96526d81dcfd524be569cd data/extrabotany/recipes/petal_apothecary/omni_violet.json
f913bcf431ef2a15548e73dbd27d1c0fc018063c data/extrabotany/recipes/petal_apothecary/reikar_orchid.json
7f5c7634fb44acfedd3c0c4db9ea6cac6ea0fc72 data/extrabotany/recipes/petal_apothecary/serenitian.json
94104083f171a200317eeb92f4b298ea3854bea4 data/extrabotany/recipes/petal_apothecary/serenitian.json
9e92c6a4d00b4106b8a77e0fd2cfc1223a83fe6e data/extrabotany/recipes/petal_apothecary/sunshine_lily.json
fbb957e2b2a952edc0a9045a90b3720f510bb334 data/extrabotany/recipes/runic_altar/aerostone.json
3441482768985f9f00fee37796d6233768d56cd0 data/extrabotany/recipes/runic_altar/aquastone.json

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "extrabotany:block/edelweiss"
}
}
}

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "extrabotany:block/floating_edelweiss"
}
}
}

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "extrabotany:block/floating_tinkle_flower"
}
}
}

View File

@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "extrabotany:block/tinkle_flower"
}
}
}

View File

@ -273,11 +273,13 @@
"extrabotany.page.miku2": "\u661F\u7A7A\u6B4C\u59EC\u670D",
"extrabotany.page.miku3": "\u661F\u7A7A\u6B4C\u59EC\u88D9\u7532",
"extrabotany.page.miku4": "\u661F\u7A7A\u6B4C\u59EC\u978B\u5B50",
"extrabotany.page.mini_item0": "\u50CF$(thing)\u7F29\u5C0F\u82B1$(0)\u90A3\u6837\uFF0C\u53EF\u4EE5\u4F7F\u7528$(thing)\u9B54\u529B$(0)\u7F29\u5C0F\u4E00\u4E9B\u5DE5\u5177\uFF0C\u4ECE\u800C\u8FBE\u5230\u4E0D\u53EF\u601D\u8BAE\u7684\u6548\u679C\u3002$(br)\u6BD4\u5982$(item)\u6D3B\u6728\u77ED\u5F13$(0)\u65E0\u9700\u62C9\u5F13\uFF0C\u5DE6\u952E\u5373\u53EF\u5C04\u51FA\u7BAD\u77E2\u3002\u7136\u800C\uFF0C\u8FD9\u4ECD\u7136\u4F1A\u6D88\u8017\u7BAD\u77E2\uFF0C\u5E76\u4E14\u4F1A\u9020\u6210\u4F4E\u4E00\u4E9B\u7684\u4F24\u5BB3\u548C\u9AD8\u4E00\u70B9\u7684\u51FB\u9000\u3002\u6216\u8BB8\u5E94\u8BE5\u8003\u8651\u66F4\u597D\u4E00\u70B9\u7684\u5F13\u6750\u6599\u624D\u5BF9\u3002",
"extrabotany.page.mini_item1": "$(item)\u6D3B\u6728\u77ED\u5F13$(0)\u65E0\u9700\u62C9\u5F13\uFF0C\u5DE6\u952E\u5373\u53EF\u5C04\u51FA\u7BAD\u77E2\u3002\u7136\u800C\uFF0C\u8FD9\u4ECD\u7136\u4F1A\u6D88\u8017\u7BAD\u77E2\uFF0C\u5E76\u4E14\u4F1A\u9020\u6210\u4F4E\u4E00\u4E9B\u7684\u4F24\u5BB3\u548C\u9AD8\u4E00\u70B9\u7684\u51FB\u9000\u3002\u6216\u8BB8\u5E94\u8BE5\u8003\u8651\u66F4\u597D\u4E00\u70B9\u7684\u5F13\u6750\u6599\u624D\u5BF9\u3002",
"extrabotany.page.mini_item0": "\u50CF$(thing)\u7F29\u5C0F\u82B1$(0)\u90A3\u6837\uFF0C\u53EF\u4EE5\u4F7F\u7528$(thing)\u9B54\u529B$(0)\u7F29\u5C0F\u4E00\u4E9B\u5DE5\u5177\uFF0C\u4ECE\u800C\u8FBE\u5230\u4E0D\u53EF\u601D\u8BAE\u7684\u6548\u679C\u3002$(br)$(br)\u6BD4\u5982$(item)\u6D3B\u6728\u77ED\u5F13$(0)\u65E0\u9700\u62C9\u5F13\uFF0C\u5DE6\u952E\u5373\u53EF\u5C04\u51FA\u7BAD\u77E2\u3002\u7136\u800C\uFF0C\u8FD9\u4ECD\u7136\u4F1A\u6D88\u8017\u7BAD\u77E2\uFF0C\u5E76\u4E14\u4F1A\u9020\u6210\u4F4E\u4E00\u4E9B\u7684\u4F24\u5BB3\u548C\u9AD8\u4E00\u70B9\u7684\u51FB\u9000\u3002\u6216\u8BB8\u5E94\u8BE5\u8003\u8651\u66F4\u597D\u4E00\u70B9\u7684\u5F13\u6750\u6599\u624D\u5BF9\u3002",
"extrabotany.page.mini_item1": "",
"extrabotany.page.mini_item114": "$(item)\u6C34\u6676\u77ED\u5F13$(0)\u6BD4$(item)\u6D3B\u6728\u77ED\u5F13$(0)\u66F4\u52A0\u5F3A\u5927\uFF0C\u540C\u65F6\u4E5F\u53EF\u4EE5\u7528$(thing)\u9B54\u529B$(0)\u4EA7\u751F\u7BAD\u77E2\uFF0C\u4E0D\u8FC7\u9700\u8981\u6D88\u8017\u7684$(thing)\u9B54\u529B$(0\uFF09\u76F8\u6BD4$(item)\u6C34\u6676\u5F13$(0)\u66F4\u591A\u4E00\u70B9\u3002",
"extrabotany.page.mini_item2": "\u901A\u8FC7\u7529\u52A8$(thing)\u77ED\u5F13$(0)\u6254\u51FA\u7BAD\u77E2\u662F\u53EF\u884C\u7684\uFF0C\u90A3\u4E48\u4E3A\u4EC0\u4E48\u4E0D\u7528\u624B\u4EE3\u66FF\u8FD9\u4E2A\u8FC7\u7A0B\u5462\uFF1F\u5C06\u666E\u901A\u7684$(item)\u7BAD$(0)\u8F6C\u5316\u6210$(item)\u77ED\u7BAD$(0)\u53EF\u4EE5\u8BA9\u73A9\u5BB6\u65B9\u4FBF\u5730\u53F3\u51FB\u6254\u51FA\u3002\u4E0D\u8FC7\uFF0C\u5B83\u4E0D\u80FD\u518D\u88AB\u5F13\u4F7F\u7528\uFF0C\u6254\u51FA\u7684\u7BAD\u77E2\u4E5F\u5C06\u5931\u53BB\u9B54\u529B\u3002",
"extrabotany.page.mini_item3": "$(item)\u5929\u7A7A\u6CD5\u6756$(0)\u98DE\u8DC3\u7684\u9AD8\u5EA6\u6709\u65F6\u5019\u5927\u5927\u8D85\u8FC7\u4E86\u6211\u4EEC\u6240\u9700\uFF0C$(item)\u5929\u7A7A\u77ED\u6756$(0)\u5C31\u89E3\u51B3\u4E86\u8FD9\u4E2A\u95EE\u9898\u3002\u5728\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\u704C\u6CE8\u7684\u9B54\u529B\u4E5F\u8BA9$(item)\u5929\u7A7A\u77ED\u6756$(0)\u80FD\u591F\u5B89\u88C5\u4E00\u4E9B\u914D\u4EF6\u3002",
"extrabotany.page.mini_item3": "",
"extrabotany.page.mini_item4": "$(item)\u5929\u7A7A\u6CD5\u6756$(0)\u98DE\u8DC3\u7684\u9AD8\u5EA6\u6709\u65F6\u5019\u5927\u5927\u8D85\u8FC7\u4E86\u6211\u4EEC\u6240\u9700\uFF0C$(item)\u5929\u7A7A\u77ED\u6756$(0)\u5C31\u89E3\u51B3\u4E86\u8FD9\u4E2A\u95EE\u9898\u3002\u5728\u8FD9\u4E2A\u8FC7\u7A0B\u4E2D\u704C\u6CE8\u7684\u9B54\u529B\u4E5F\u8BA9$(item)\u5929\u7A7A\u77ED\u6756$(0)\u80FD\u591F\u5B89\u88C5\u4E00\u4E9B\u914D\u4EF6\u3002",
"extrabotany.page.mini_item5": "",
"extrabotany.page.moonlight_lily0": "\u62E5\u6709\u80FD\u5728\u591C\u665A\u4EA7\u751F$(thing)\u9B54\u529B$(0)\u7684\u80FD\u529B\uFF0C\u4F46\u4EA7\u80FD\u6548\u7387\u5E76\u4E0D\u53EF\u89C2\u3002\u4F1A\u57283\u4E2Aminecraft\u65E5\u540E\u67AF\u840E\u3002",
"extrabotany.page.moonlight_lily1": "\u611A\u8005\u7684\u64AD\u79CD\u3002",
"extrabotany.page.nightmarefuel0": "$(item)\u68A6\u9B47\u71C3\u6599$(0)\u662F\u5669\u68A6\u7684\u96C6\u5408\u4F53\uFF0C\u98DF\u7528\u540E\u4F1A\u906D\u9047\u4E0D\u5E78\uFF0C\u4F46\u4E5F\u53EF\u80FD\u662F\u7F8E\u68A6\u7684\u5F00\u59CB\u3002\u7CBE\u7075\u4EEC\u53EF\u80FD\u4E5F\u4F1A\u5BF9\u8FD9\u79CD\u4E1C\u897F\u611F\u5174\u8DA3\u3002\uFF08\u8B66\u544A\uFF1A\u77AC\u95F4\u4F24\u5BB3III\u4F1A\u9020\u621024\u70B9\u4F24\u5BB3\uFF01\uFF09",

View File

@ -0,0 +1,6 @@
{
"parent": "extrabotany:block/shapes/cross",
"textures": {
"cross": "extrabotany:block/edelweiss"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/block",
"loader": "botania:floating_flower",
"flower": {
"parent": "extrabotany:block/edelweiss"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/block",
"loader": "botania:floating_flower",
"flower": {
"parent": "extrabotany:block/tinkle_flower"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "extrabotany:block/shapes/cross",
"textures": {
"cross": "extrabotany:block/tinkle_flower"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "extrabotany:block/edelweiss"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/block",
"loader": "botania:floating_flower",
"flower": {
"parent": "extrabotany:block/edelweiss"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/block",
"loader": "botania:floating_flower",
"flower": {
"parent": "extrabotany:block/tinkle_flower"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "extrabotany:block/tinkle_flower"
}
}

View File

@ -4,11 +4,13 @@
"extrabotany:floating_annoying_flower",
"extrabotany:floating_bell_flower",
"extrabotany:floating_bloody_enchantress",
"extrabotany:floating_edelweiss",
"extrabotany:floating_gemini_orchid",
"extrabotany:floating_moonlight_lily",
"extrabotany:floating_omni_violet",
"extrabotany:floating_reikar_orchid",
"extrabotany:floating_serenitian",
"extrabotany:floating_sunshine_lily"
"extrabotany:floating_sunshine_lily",
"extrabotany:floating_tinkle_flower"
]
}

View File

@ -4,11 +4,13 @@
"extrabotany:floating_annoying_flower",
"extrabotany:floating_bell_flower",
"extrabotany:floating_bloody_enchantress",
"extrabotany:floating_edelweiss",
"extrabotany:floating_gemini_orchid",
"extrabotany:floating_moonlight_lily",
"extrabotany:floating_omni_violet",
"extrabotany:floating_reikar_orchid",
"extrabotany:floating_serenitian",
"extrabotany:floating_sunshine_lily"
"extrabotany:floating_sunshine_lily",
"extrabotany:floating_tinkle_flower"
]
}

View File

@ -27,6 +27,9 @@
},
{
"item": "botania:rune_greed"
},
{
"item": "botania:redstone_root"
}
]
}

View File

@ -0,0 +1,23 @@
{
"type": "botania:petal_apothecary",
"output": {
"item": "extrabotany:bell_flower"
},
"ingredients": [
{
"tag": "botania:petals/yellow"
},
{
"tag": "botania:petals/yellow"
},
{
"tag": "botania:petals/green"
},
{
"tag": "botania:petals/green"
},
{
"item": "botania:mana_powder"
}
]
}

View File

@ -0,0 +1,29 @@
{
"type": "botania:petal_apothecary",
"output": {
"item": "extrabotany:bloody_enchantress"
},
"ingredients": [
{
"tag": "botania:petals/red"
},
{
"tag": "botania:petals/red"
},
{
"tag": "botania:petals/red"
},
{
"tag": "botania:petals/red"
},
{
"item": "botania:rune_fire"
},
{
"item": "botania:rune_summer"
},
{
"item": "botania:rune_wrath"
}
]
}

View File

@ -27,6 +27,9 @@
},
{
"item": "botania:rune_greed"
},
{
"item": "botania:redstone_root"
}
]
}

BIN
src/img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

View File

@ -4,6 +4,7 @@ import chick.extrabotany.common.ModItems;
import chick.extrabotany.common.Registration;
import chick.extrabotany.common.base.ConfigHandler;
import com.mojang.logging.LogUtils;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraftforge.fml.ModLoadingContext;
@ -17,18 +18,31 @@ import org.slf4j.Logger;
public class ExtraBotany
{
public static final String MODID = "extrabotany";//mod name
public static final String TAB_NAME = "extrabotany";//Name in creative inventury
public static final Logger LOGGER = LogUtils.getLogger();
public static final CreativeModeTab ITEM_GROUP = new CreativeModeTab(TAB_NAME)
{
@Override
public boolean showTitle()
{
return super.showTitle();
}
@Override
public boolean hasSearchBar()
{
return true;
}
@Override
public @NotNull ItemStack makeIcon()
{
return new ItemStack(ModItems.PYLON.get());
}
};
}.setBackgroundImage(new ResourceLocation("tab_extrabotany.png"));
public ExtraBotany()
{

View File

@ -8,7 +8,7 @@ import net.minecraftforge.common.capabilities.CapabilityToken;
/**
* it has nothing now lol
*/
public class ExtraBotanyForgeCapabilities
public class ExtraBotanyCapabilities
{
public static final Capability<ISubTilePassiveFlower> PASSIVE_FLOWER = CapabilityManager.get(new CapabilityToken<>() {});

View File

@ -3,7 +3,8 @@ package chick.extrabotany.api.block;
import net.minecraftforge.event.TickEvent;
/**
* capability for passive flower
* <b>CAPABILITY</b> for passive flower<p>
* have a default Implement<p>
* you need to store passive ticks in block nbt
*/
public interface ISubTilePassiveFlower

View File

@ -2,8 +2,28 @@ package chick.extrabotany.api.item;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import org.jetbrains.annotations.Nullable;
/**
* <b>NOT A CAPABILITY<hr></b>
* need to be registered in <b>MinecraftForge Event_Bus</b><p>
* and usually need send Message to Server
*/
public interface IItemWithLeftClick
{
void onLeftClick(Player living, Entity target);
//TODO:check if it needs Network support
void onLeftClick(Player player, @Nullable Entity target);
default void leftClickEmpty(PlayerInteractEvent.LeftClickEmpty evt)
{
}
default void leftClickBlock(PlayerInteractEvent.LeftClickBlock evt)
{
}
}

View File

@ -0,0 +1,28 @@
package chick.extrabotany.api.item;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
/**
* <b>NOT A CAPABILITY<hr></b>
* designed for baubles and other things<p>
* if you want to right-click blocks when holding the item<p>
* then use <b>'useOn(UseOnContext ctx)'</b> instead<hr>
* need to be registered in <b>MinecraftForge.Event_Bus</b>
*/
public interface IItemWithRightClick
{
default void rightClickBlock(PlayerInteractEvent.RightClickBlock evt)
{
}
default void rightClickEmpty(PlayerInteractEvent.RightClickEmpty evt)
{
}
default void rightClickItem(PlayerInteractEvent.RightClickItem evt)
{
}
}

View File

@ -106,17 +106,17 @@ public class ModItems
/**
* these are baubles for curios mod
**/
public static final RegistryObject<Item> PYLON = register(LibItemNames.PYLON, () -> new Cosmetic(Cosmetic.Variant.Pylon, ITEM_PROPERTIES));
public static final RegistryObject<Item> FOX_EAR = register(LibItemNames.FOX_EAR, () -> new Cosmetic(Cosmetic.Variant.FoxEar, ITEM_PROPERTIES));
public static final RegistryObject<Item> FOX_MASK = register(LibItemNames.FOX_MASK, () -> new Cosmetic(Cosmetic.Variant.FoxMask, ITEM_PROPERTIES));
public static final RegistryObject<Item> SUPER_CROWN = register(LibItemNames.SUPER_CROWN, () -> new Cosmetic(Cosmetic.Variant.SuperCrown, ITEM_PROPERTIES));
public static final RegistryObject<Item> RED_SCARF = register(LibItemNames.RED_SCARF, () -> new Cosmetic(Cosmetic.Variant.RedScarf, ITEM_PROPERTIES));
public static final RegistryObject<Item> BLACK_GLASSES = register(LibItemNames.BLACK_GLASSES, () -> new Cosmetic(Cosmetic.Variant.BlackGlasses, ITEM_PROPERTIES));
public static final RegistryObject<Item> STONE_MASK = register(LibItemNames.STONE_MASK, () -> new Cosmetic(Cosmetic.Variant.StoneMask, ITEM_PROPERTIES));
public static final RegistryObject<Item> THUG_LIFE = register(LibItemNames.THUG_LIFE, () -> new Cosmetic(Cosmetic.Variant.ThugLife, ITEM_PROPERTIES));
public static final RegistryObject<Item> PYLON = register(LibItemNames.PYLON, () -> new Cosmetic(Cosmetic.Variant.Pylon, stackTo1()));
public static final RegistryObject<Item> FOX_EAR = register(LibItemNames.FOX_EAR, () -> new Cosmetic(Cosmetic.Variant.FoxEar, stackTo1()));
public static final RegistryObject<Item> FOX_MASK = register(LibItemNames.FOX_MASK, () -> new Cosmetic(Cosmetic.Variant.FoxMask, stackTo1()));
public static final RegistryObject<Item> SUPER_CROWN = register(LibItemNames.SUPER_CROWN, () -> new Cosmetic(Cosmetic.Variant.SuperCrown, stackTo1()));
public static final RegistryObject<Item> RED_SCARF = register(LibItemNames.RED_SCARF, () -> new Cosmetic(Cosmetic.Variant.RedScarf, stackTo1()));
public static final RegistryObject<Item> BLACK_GLASSES = register(LibItemNames.BLACK_GLASSES, () -> new Cosmetic(Cosmetic.Variant.BlackGlasses, stackTo1()));
public static final RegistryObject<Item> STONE_MASK = register(LibItemNames.STONE_MASK, () -> new Cosmetic(Cosmetic.Variant.StoneMask, stackTo1()));
public static final RegistryObject<Item> THUG_LIFE = register(LibItemNames.THUG_LIFE, () -> new Cosmetic(Cosmetic.Variant.ThugLife, stackTo1()));
public static final RegistryObject<Item> PEACE_AMULET = register(LibItemNames.PEACE_AMULET);
public static final RegistryObject<Item> PURE_DAISY_PENDANT = register(LibItemNames.PURE_DAISY_PENDANT,()->new PureDaisyPendant(stackTo1()));
public static final RegistryObject<Item> PURE_DAISY_PENDANT = register(LibItemNames.PURE_DAISY_PENDANT, () -> new PureDaisyPendant(stackTo1()));
public static final RegistryObject<Item> FROST_RING = register(LibItemNames.FROST_RING, () -> new FrostRing(ITEM_PROPERTIES));
public static final RegistryObject<Item> DEATH_RING = register(LibItemNames.DEATH_RING, () -> new DeathRing(ITEM_PROPERTIES));
public static final RegistryObject<Item> POWER_GLOVE = register(LibItemNames.POWER_GLOVE, () -> new PowerGlove(ITEM_PROPERTIES));

View File

@ -22,7 +22,7 @@ public class JingweiFeather extends ItemBauble implements IItemWithLeftClick
public JingweiFeather(Properties props)
{
super(props.stacksTo(1));
MinecraftForge.EVENT_BUS.addListener(this::leftClick);
MinecraftForge.EVENT_BUS.addListener(this::leftClickEmpty);
MinecraftForge.EVENT_BUS.addListener(this::leftClickBlock);
MinecraftForge.EVENT_BUS.addListener(this::attackEntity);
}
@ -34,18 +34,21 @@ public class JingweiFeather extends ItemBauble implements IItemWithLeftClick
onLeftClick(evt.getPlayer(), evt.getTarget());
}
}
public void leftClick(PlayerInteractEvent.LeftClickEmpty evt)
@Override
public void leftClickEmpty(PlayerInteractEvent.LeftClickEmpty evt)
{
if (!EquipmentHandler.findOrEmpty(this, evt.getPlayer()).isEmpty())
NetworkHandler.INSTANCE.sendToServer(new LeftClickMessage());
}
@Override
public void leftClickBlock(PlayerInteractEvent.LeftClickBlock evt)
{
if (evt.getPlayer().level.isClientSide && !EquipmentHandler.findOrEmpty(this, evt.getPlayer()).isEmpty())
{
NetworkHandler.INSTANCE.sendToServer(new LeftClickMessage());
}
}
@Override

View File

@ -1,5 +1,7 @@
package chick.extrabotany.common.baubles;
import chick.extrabotany.api.item.IItemWithRightClick;
import chick.extrabotany.common.baubles.cosmetic.Cosmetic;
import net.minecraft.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
@ -33,17 +35,18 @@ import vazkii.botania.common.item.equipment.bauble.ItemBauble;
import javax.annotation.Nullable;
import java.util.List;
public class PureDaisyPendant extends ItemBauble
public class PureDaisyPendant extends Cosmetic implements IItemWithRightClick
{
public PureDaisyPendant(Properties props)
{
super(props.durability(64));
super(Variant.PureDaisyPendant, props.durability(64));
MinecraftForge.EVENT_BUS.addListener(this::rightClickBlock);
}
public static final String TAG_USE = "use_count";
public static final String TAG_CD = "cool_down";
@Override
public void rightClickBlock(PlayerInteractEvent.RightClickBlock evt)
{
var stack = EquipmentHandler.findOrEmpty(this, evt.getPlayer());

View File

@ -27,7 +27,8 @@ public class Cosmetic extends ItemBauble
{
public enum Variant
{
Pylon(), FoxEar(), FoxMask(), SuperCrown(),RedScarf(1),BlackGlasses(),StoneMask(),ThugLife();
Pylon(), FoxEar(), FoxMask(), SuperCrown(), RedScarf(1), BlackGlasses(), StoneMask(), ThugLife(),
PureDaisyPendant(1);
/*
* 0=head 1=body
@ -51,7 +52,7 @@ public class Cosmetic extends ItemBauble
public Cosmetic(Variant variant, Properties props)
{
super(props.stacksTo(1));
super(props);
this.variant = variant;
IProxy.INSTANCE.runOnClient(() -> () -> AccessoryRenderRegistry.register(this, new Cosmetic.Renderer()));
}
@ -70,7 +71,6 @@ public class Cosmetic extends ItemBauble
public static class Renderer implements AccessoryRenderer
{
@Override
public void doRender(HumanoidModel<?> bipedModel, ItemStack stack, LivingEntity living, PoseStack ms, MultiBufferSource buffers, int light, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch)
{
@ -82,13 +82,17 @@ public class Cosmetic extends ItemBauble
//default(0 or something else): head
bipedModel.head.translateAndRotate(ms);
}
case 1->
case 1 ->
{
bipedModel.body.translateAndRotate(ms);
}
case 2 ->
{
//it will come soon
}
}
//dont know whats it for (?
//ms.push();
ms.pushPose();
switch (variant)
{
case FoxEar ->
@ -126,9 +130,15 @@ public class Cosmetic extends ItemBauble
ms.translate(0, -0.2, -0.3);
ms.scale(0.7F, -0.7F, -0.7F);
}
case PureDaisyPendant ->
{
//this is, maybe same?
ms.translate(0, 0.16, -0.15);
ms.scale(0.55F, -0.55F, -0.55F);
}
default ->
{
//pylon
//default is pylon
ms.translate(0, -0.8, -0.1F);
ms.scale(0.5F, -0.5F, -0.5F);
}
@ -141,6 +151,6 @@ public class Cosmetic extends ItemBauble
{
Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemTransforms.TransformType.NONE,
light, OverlayTexture.NO_OVERLAY, ms, buffers, living.getId());
//ms.popPose();
ms.popPose();
}
}

View File

@ -45,6 +45,10 @@ public class ModSubtiles
public static final Block reikarorchidFloating = new BlockFloatingSpecialFlower(FLOATING_PROPS, () -> ModSubtiles.REIKARORCHID);
public static final Block bloodyenchantress = new BlockSpecialFlower(MobEffects.HARM, 114, FLOWER_PROPS, () -> ModSubtiles.BLOODYENCHANTRESS);
public static final Block bloodyenchantressFloating = new BlockFloatingSpecialFlower(FLOATING_PROPS, () -> ModSubtiles.BLOODYENCHANTRESS);
public static final Block edelweiss = new BlockSpecialFlower(MobEffects.MOVEMENT_SLOWDOWN, 10, FLOWER_PROPS, () -> ModSubtiles.EDELWEISS);
public static final Block edelweissFloating = new BlockFloatingSpecialFlower(FLOATING_PROPS, () -> ModSubtiles.EDELWEISS);
public static final Block tinkleflower = new BlockSpecialFlower(MobEffects.DIG_SPEED, 10, FLOWER_PROPS, () -> ModSubtiles.TINKLEFLOWER);
public static final Block tinkleflowerFloating = new BlockFloatingSpecialFlower(FLOATING_PROPS, () -> ModSubtiles.TINKLEFLOWER);
//functional
public static final Block serenitian = new BlockSpecialFlower(MobEffects.ABSORPTION, 48, FLOWER_PROPS, () -> ModSubtiles.SERENITIAN);
public static final Block serenitianFloating = new BlockFloatingSpecialFlower(FLOATING_PROPS, () -> ModSubtiles.SERENITIAN);
@ -59,6 +63,9 @@ public class ModSubtiles
public static final BlockEntityType<SubTileBellflower> BELLFLOWER = IXplatAbstractions.INSTANCE.createBlockEntityType(SubTileBellflower::new, bellflower, bellflowerFloating);
public static final BlockEntityType<SubTileReikarOrchid> REIKARORCHID = IXplatAbstractions.INSTANCE.createBlockEntityType(SubTileReikarOrchid::new, reikarorchid, reikarorchidFloating);
public static final BlockEntityType<SubTileBloodyEnchantress> BLOODYENCHANTRESS = IXplatAbstractions.INSTANCE.createBlockEntityType(SubTileBloodyEnchantress::new, bloodyenchantress, bloodyenchantressFloating);
public static final BlockEntityType<SubTileEdelweiss> EDELWEISS = IXplatAbstractions.INSTANCE.createBlockEntityType(SubTileEdelweiss::new, edelweiss, edelweissFloating);
public static final BlockEntityType<SubTileTinkle> TINKLEFLOWER = IXplatAbstractions.INSTANCE.createBlockEntityType(SubTileTinkle::new, tinkleflower, tinkleflowerFloating);
public static final BlockEntityType<SubTileSerenitian> SERENITIAN = IXplatAbstractions.INSTANCE.createBlockEntityType(SubTileSerenitian::new, serenitian, serenitianFloating);
public static final BlockEntityType<SubTileAnnoyingFlower> ANNOYINGFLOWER = IXplatAbstractions.INSTANCE.createBlockEntityType(SubTileAnnoyingFlower::new, annoying, annoyingFloating);
@ -78,6 +85,10 @@ public class ModSubtiles
public static final Item reikarorchidFloating_item = new ItemBlockSpecialFlower(reikarorchidFloating, props);
public static final Item bloodyenchantress_item = new ItemBlockSpecialFlower(bloodyenchantress, props);
public static final Item bloodyenchantressFloating_item = new ItemBlockSpecialFlower(bloodyenchantressFloating, props);
public static final Item edelweiss_item = new ItemBlockSpecialFlower(edelweiss, props);
public static final Item edelweissFloating_item = new ItemBlockSpecialFlower(edelweissFloating, props);
public static final Item tinkleflower_item = new ItemBlockSpecialFlower(tinkleflower, props);
public static final Item tinkleflowerFloating_item = new ItemBlockSpecialFlower(tinkleflowerFloating, props);
//functional items
public static final Item serenitian_item = new ItemBlockSpecialFlower(serenitian, props);
public static final Item serenitianFloating_item = new ItemBlockSpecialFlower(serenitianFloating, props);
@ -93,6 +104,8 @@ public class ModSubtiles
registerFlowerAndFloating(bellflower, bellflowerFloating, LibBlockNames.BELL_FLOWER, r);
registerFlowerAndFloating(reikarorchid, reikarorchidFloating, LibBlockNames.REIKAR_ORCHID, r);
registerFlowerAndFloating(bloodyenchantress, bloodyenchantressFloating, LibBlockNames.BLOODY_ENCHANTRESS, r);
registerFlowerAndFloating(edelweiss, edelweissFloating, LibBlockNames.EDELWEISS, r);
registerFlowerAndFloating(tinkleflower, tinkleflowerFloating, LibBlockNames.TINKLE_FLOWER, r);
registerFlowerAndFloating(serenitian, serenitianFloating, LibBlockNames.SERENITIAN, r);
@ -122,6 +135,10 @@ public class ModSubtiles
r.accept(reikarorchidFloating_item, getId(reikarorchidFloating));
r.accept(bloodyenchantress_item, getId(bloodyenchantress));
r.accept(bloodyenchantressFloating_item, getId(bloodyenchantressFloating));
r.accept(edelweiss_item, getId(edelweiss));
r.accept(edelweissFloating_item, getId(edelweissFloating));
r.accept(tinkleflower_item, getId(tinkleflower));
r.accept(tinkleflowerFloating_item, getId(tinkleflowerFloating));
//functional
r.accept(serenitian_item, getId(serenitian));
r.accept(serenitianFloating_item, getId(serenitianFloating));
@ -132,23 +149,30 @@ public class ModSubtiles
public static void registerWandHudCaps(ModTiles.BECapConsumer<IWandHUD> consumer)
{
consumer.accept(be -> new TileEntityGeneratingFlower.GeneratingWandHud<>((TileEntityGeneratingFlower) be),
SUNSHINELILY, MOONLIGHTLILY, OMNIVIOLET, GEMINIORCHID, BELLFLOWER, REIKARORCHID, BLOODYENCHANTRESS);
SUNSHINELILY, MOONLIGHTLILY, OMNIVIOLET, GEMINIORCHID, BELLFLOWER, REIKARORCHID, BLOODYENCHANTRESS, EDELWEISS, TINKLEFLOWER);
consumer.accept(be -> new TileEntityFunctionalFlower.FunctionalWandHud<>((TileEntityFunctionalFlower) be),
SERENITIAN, ANNOYINGFLOWER);
}
public static void registerTEs(BiConsumer<BlockEntityType<?>, ResourceLocation> r)
{
r.accept(SUNSHINELILY, getId(sunshinelily));
r.accept(MOONLIGHTLILY, getId(moonlightlily));
r.accept(OMNIVIOLET, getId(omniviolet));
r.accept(GEMINIORCHID, getId(geminiorchid));
r.accept(BELLFLOWER, getId(bellflower));
r.accept(REIKARORCHID, getId(reikarorchid));
r.accept(BLOODYENCHANTRESS, getId(bloodyenchantress));
r.accept(SUNSHINELILY, getBEId(sunshinelily));
r.accept(MOONLIGHTLILY, getBEId(moonlightlily));
r.accept(OMNIVIOLET, getBEId(omniviolet));
r.accept(GEMINIORCHID, getBEId(geminiorchid));
r.accept(BELLFLOWER, getBEId(bellflower));
r.accept(REIKARORCHID, getBEId(reikarorchid));
r.accept(BLOODYENCHANTRESS, getBEId(bloodyenchantress));
r.accept(EDELWEISS, getBEId(edelweiss));
r.accept(TINKLEFLOWER, getBEId(tinkleflower));
//functional
r.accept(SERENITIAN, getId(serenitian));
r.accept(ANNOYINGFLOWER, getId(annoying));
r.accept(SERENITIAN, getBEId(serenitian));
r.accept(ANNOYINGFLOWER, getBEId(annoying));
}
private static ResourceLocation getBEId(Block b)
{
return new ResourceLocation(ExtraBotany.MODID, LibBlockNames.FLOWER_BE_TYPE_PREFIX + b.getRegistryName().getPath());
}
private static ResourceLocation getId(Block b)

View File

@ -1,6 +1,112 @@
package chick.extrabotany.common.blocks.subtile.generating;
public class SubTileEdelweiss
import chick.extrabotany.common.blocks.ModSubtiles;
import net.minecraft.core.BlockPos;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.animal.SnowGolem;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import org.jetbrains.annotations.Nullable;
import vazkii.botania.api.subtile.RadiusDescriptor;
import vazkii.botania.api.subtile.TileEntityGeneratingFlower;
public class SubTileEdelweiss extends TileEntityGeneratingFlower
{
//TODO:雪绒花
private static final String TAG_BURN_TIME = "burnTime";
private static final int RANGE = 2;
private int burnTime = 0;
public SubTileEdelweiss(BlockPos pos, BlockState state)
{
super(ModSubtiles.EDELWEISS, pos, state);
}
@Override
public void tickFlower()
{
super.tickFlower();
if (burnTime > 0)
{
burnTime--;
}
if (isValidBinding() && burnTime == 0)
{
for (SnowGolem golem : level.getEntitiesOfClass(SnowGolem.class, new AABB(getEffectivePos().offset(-RANGE, -RANGE, -RANGE), getEffectivePos().offset(RANGE + 1, RANGE + 1, RANGE + 1))))
{
if (!golem.isRemoved())
{
golem.discard();
addMana(1600);
burnTime += 20;
break;
}
}
for (ItemEntity itemEntity : level.getEntitiesOfClass(ItemEntity.class, new AABB(getEffectivePos().offset(-RANGE, -RANGE, -RANGE), getEffectivePos().offset(RANGE + 1, RANGE + 1, RANGE + 1))))
{
if (!itemEntity.isRemoved())
{
var stack = itemEntity.getItem();
if (stack.is(Items.SNOWBALL))
{
itemEntity.discard();
addMana(80);
burnTime += 5;
break;
} else if (stack.is(Items.SNOW_BLOCK))
{
itemEntity.discard();
addMana(320);
burnTime += 10;
break;
}
}
}
if (burnTime > 0)
{
emitParticle(ParticleTypes.ITEM_SNOWBALL, 0, 0, 0, 0, 0, 0);
}
}
}
@Override
public int getMaxMana()
{
return 2500;
}
@Override
public int getColor()
{
return 0X4169E1;
}
@Override
public void writeToPacketNBT(CompoundTag cmp)
{
super.writeToPacketNBT(cmp);
cmp.putInt(TAG_BURN_TIME, burnTime);
}
@Override
public void readFromPacketNBT(CompoundTag cmp)
{
super.readFromPacketNBT(cmp);
burnTime = cmp.getInt(TAG_BURN_TIME);
}
@Nullable
@Override
public RadiusDescriptor getRadius()
{
return RadiusDescriptor.Rectangle.square(getEffectivePos(), RANGE);
}
//TODO:check 雪绒花
}

View File

@ -1,6 +1,90 @@
package chick.extrabotany.common.blocks.subtile.generating;
public class SubTileTinkle
import chick.extrabotany.common.base.AdvancementHandler;
import chick.extrabotany.common.blocks.ModSubtiles;
import chick.extrabotany.common.libs.LibAdvancementNames;
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.AABB;
import vazkii.botania.api.subtile.RadiusDescriptor;
import vazkii.botania.api.subtile.TileEntityGeneratingFlower;
public class SubTileTinkle extends TileEntityGeneratingFlower
{
public SubTileTinkle(BlockPos pos, BlockState state)
{
super(ModSubtiles.TINKLEFLOWER, pos, state);
}
private static final int RANGE = 8;
private static final String TAG_TIME = "time";
private int time = 0;
@Override
public void tickFlower()
{
super.tickFlower();
if (!level.isClientSide && level.getGameTime() % 20L == 0)
{
for (LivingEntity player : level.getEntitiesOfClass(LivingEntity.class, new AABB(getEffectivePos()).inflate(RANGE)))
{
double vel = player.getDeltaMovement().length();
if (player instanceof Player p)
{
p.sendMessage(new TextComponent("vel * 10 = " + (int) (vel * 10)), Util.NIL_UUID);
}
int time = Math.min((int) (vel * 10.0), 8);
addMana(time * 3);
if (player instanceof Player p)
{
p.causeFoodExhaustion(0.02F);
AdvancementHandler.INSTANCE.grantAdvancement((ServerPlayer) p, LibAdvancementNames.TINKLE_FLOWER_USE);
}
}
}
}
@Override
public int getMaxMana()
{
return 1000;
}
@Override
public int getColor()
{
return 0xCCFF00;
}
@Override
public RadiusDescriptor getRadius()
{
return RadiusDescriptor.Rectangle.square(getEffectivePos(), RANGE);
}
@Override
public void writeToPacketNBT(CompoundTag cmp)
{
super.writeToPacketNBT(cmp);
cmp.putInt(TAG_TIME, time);
}
@Override
public void readFromPacketNBT(CompoundTag cmp)
{
super.readFromPacketNBT(cmp);
time = cmp.getInt(TAG_TIME);
}
//TODO:叮当舞花
}

View File

@ -2,18 +2,23 @@ package chick.extrabotany.common.libs;
public class LibBlockNames
{
public static String DIMENSION_CATALYST="dimension_catalyst";
public static String DIMENSION_CATALYST = "dimension_catalyst";
public static String SUNSHINE_LILY="sunshine_lily";
public static String MOONLIGHT_LILY="moonlight_lily";
public static String OMNI_VIOLET="omni_violet";
public static String GEMINI_ORCHID="gemini_orchid";
public static String BELL_FLOWER="bell_flower";
public static String REIKAR_ORCHID="reikar_orchid";
public static String BLOODY_ENCHANTRESS="bloody_enchantress";
public static String TINKLE_FLOWER="tinkle_flower";
//no other Block Entity Types should start with this!
//or forge.client.EntityRenderer will crash!
public static String FLOWER_BE_TYPE_PREFIX = "flower_";
//both Block and BlockEntityType
public static String SUNSHINE_LILY = "sunshine_lily";
public static String MOONLIGHT_LILY = "moonlight_lily";
public static String OMNI_VIOLET = "omni_violet";
public static String GEMINI_ORCHID = "gemini_orchid";
public static String BELL_FLOWER = "bell_flower";
public static String REIKAR_ORCHID = "reikar_orchid";
public static String BLOODY_ENCHANTRESS = "bloody_enchantress";
public static String EDELWEISS = "edelweiss";
public static String TINKLE_FLOWER = "tinkle_flower";
public static String SERENITIAN="serenitian";
public static String ANNOYING_FLOWER="annoying_flower";
public static String SERENITIAN = "serenitian";
public static String ANNOYING_FLOWER = "annoying_flower";
}

View File

@ -70,6 +70,7 @@ public class LibItemNames
public static String SUPREME_IGNITE_STONE = "supreme_ignite_stone";
public static String SUPREME_EARTH_STONE = "supreme_earth_stone";
public static String SAGES_MANA_RING = "sages_mana_ring";
public static String POTATO_CHIPS = "potato_chips";
public static String MANA_READER = "mana_reader";

View File

@ -6,6 +6,7 @@ import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.item.Item;
@ -71,6 +72,7 @@ public class DirtShield extends Item
ctx.getLevel().addFreshEntity(action);
}
}
ctx.getPlayer().awardStat(Stats.ITEM_USED.get(this));
return InteractionResult.SUCCESS;
}
}

View File

@ -2,6 +2,7 @@ package chick.extrabotany.common.tools.others;
import chick.extrabotany.common.ModEffects;
import chick.extrabotany.common.base.DamageHandler;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.damagesource.DamageSource;
@ -33,6 +34,7 @@ public class ForestBook extends Item
{
DamageHandler.INSTANCE.doDamage(player, DamageSource.MAGIC, 8.0F, DamageHandler.INSTANCE.CREATIVE + DamageHandler.INSTANCE.BYPASS_INVUL + DamageHandler.INSTANCE.BYPASS_MAGIC + DamageHandler.INSTANCE.BYPASS_ABSORB);
player.setAbsorptionAmount(10.0F);
player.awardStat(Stats.ITEM_USED.get(this));
return InteractionResultHolder.success(stack);
}
}

View File

@ -2,6 +2,7 @@ package chick.extrabotany.common.tools.others;
import net.minecraft.Util;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
@ -41,12 +42,16 @@ public class ManaReader extends Item
{
mana = ((TileSpreader) tile).getCurrentMana();
}
if (ctx.getLevel().isClientSide)
if (player != null)
{
if (mana >= 0)
player.sendMessage(new TextComponent(String.format("Mana:%d", mana)), Util.NIL_UUID);
else
player.sendMessage(new TextComponent("No Mana"), Util.NIL_UUID);
if (ctx.getLevel().isClientSide)
{
if (mana >= 0)
{
player.sendMessage(new TextComponent(String.format("Mana:%d", mana)), Util.NIL_UUID);
}
}
player.awardStat(Stats.ITEM_USED.get(this));
}
return InteractionResult.PASS;
}

View File

@ -9,6 +9,7 @@ import com.google.common.collect.Multimap;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
@ -73,11 +74,11 @@ public class Excaliber extends SwordRelicBase implements ILensEffect, ICustomDam
@Override
public void attack(LivingEntity player, Entity target, int times, double speedTime, float damageTime)
{
if (player instanceof Player)
if (player instanceof Player p)
{
if (!player.getItemInHand(InteractionHand.MAIN_HAND).isEmpty() && player.getItemInHand(InteractionHand.MAIN_HAND).getItem() == this)
{
EntityManaBurst burst = getBurst((Player) player, player.getItemInHand(InteractionHand.MAIN_HAND));
EntityManaBurst burst = getBurst(p, player.getItemInHand(InteractionHand.MAIN_HAND));
player.level.addFreshEntity(burst);
ToolCommons.damageItemIfPossible(player.getItemInHand(InteractionHand.MAIN_HAND), 1, player, getManaPerDamage());
player.level.playSound(null, player.getX(), player.getY(), player.getZ(), ModSounds.terraBlade,

View File

@ -56,7 +56,7 @@ public class ShadowKatana extends SwordItem implements ICustomDamageItem
for (int i = 0; i < 360; i += 10)
{
double j = ((double) i) / 180F * PI;
level.addParticle(ParticleTypes.ENCHANTED_HIT, player.getX() + Math.cos(j), player.getY() + 1D, player.getZ()+Math.sin(j), 0, 0, 0);
level.addParticle(ParticleTypes.PORTAL, player.getX() + Math.cos(j), player.getY() + 1D, player.getZ() + Math.sin(j), 0, -0.3D, 0);
}
}
player.playSound(SoundEvents.ENDERMAN_TELEPORT, 1, 1);

View File

@ -4,6 +4,7 @@ import chick.extrabotany.api.item.IItemWithLeftClick;
import chick.extrabotany.network.NetworkHandler;
import chick.extrabotany.network.inputMessage.LeftClickMessage;
import net.minecraft.network.chat.Component;
import net.minecraft.stats.Stats;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
@ -55,6 +56,7 @@ public abstract class SwordRelicBase extends SwordItem implements IItemWithLeftC
}
}
}
@Override
public void inventoryTick(ItemStack stack, Level world, Entity entity, int slot, boolean selected)
{
@ -119,6 +121,8 @@ public abstract class SwordRelicBase extends SwordItem implements IItemWithLeftC
&& ManaItemHandler.instance().requestManaExactForTool(player.getItemBySlot(EquipmentSlot.MAINHAND), player, getManaPerDamage(), true))
{
attack(player, target);
//player stats here
player.awardStat(Stats.ITEM_USED.get(this));
}
}
}

View File

@ -9,6 +9,7 @@ import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.Entity;
@ -98,6 +99,7 @@ public class Failnaught extends ItemLivingwoodBow implements ICustomDamageItem,
worldIn.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ARROW_SHOOT, SoundSource.NEUTRAL, 1.0F, 0.5F);
}
player.awardStat(Stats.ITEM_USED.get(this));
}
}

View File

@ -2,6 +2,7 @@ package chick.extrabotany.common.tools.weapons.ranged;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundSource;
import net.minecraft.stats.Stats;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.LivingEntity;
@ -31,6 +32,7 @@ public class ManaShortArrow extends Item
var stack = player.getItemInHand(hand);
int ticks = Math.round(player.getAttackStrengthScale(0) * 20);
shootArrow(player, null, ticks, 0.52D, 1);
player.awardStat(Stats.ITEM_USED.get(this));
return InteractionResultHolder.consume(stack);
}

View File

@ -3,22 +3,16 @@ package chick.extrabotany.datagen;
import chick.extrabotany.ExtraBotany;
import chick.extrabotany.common.ModBlocks;
import chick.extrabotany.common.blocks.ModSubtiles;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Registry;
import net.minecraft.data.DataGenerator;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.client.model.generators.BlockStateProvider;
import net.minecraftforge.client.model.generators.ConfiguredModel;
import net.minecraftforge.common.data.ExistingFileHelper;
import vazkii.botania.client.render.tile.RenderTileSpecialFlower;
import vazkii.botania.common.block.BlockFloatingSpecialFlower;
import vazkii.botania.common.block.BlockSpecialFlower;
import static net.minecraft.client.renderer.ItemBlockRenderTypes.setRenderLayer;
public class ModBlockStates extends BlockStateProvider
{

View File

@ -37,7 +37,7 @@ public class ModItemModels extends ItemModelProvider
.filter(p -> !(p instanceof ItemBlockSpecialFlower))
.filter(p -> !(p instanceof ShieldItem))
.filter(p -> !(p instanceof SwordItem))
.filter(p->!(p instanceof ProjectileWeaponItem))
.filter(p -> !(p instanceof ProjectileWeaponItem))
.toList());
list.remove(ModBlocks.DIMENSION_CATALYST_ITEM.get());
//write in ModItemOverrideModel
@ -61,19 +61,36 @@ public class ModItemModels extends ItemModelProvider
private void registerFlowerModels()
{
withExistingParent(ModBlocks.DIMENSION_CATALYST_ITEM.get().getRegistryName().getPath(), modLoc("block/"+LibBlockNames.DIMENSION_CATALYST));
withExistingParent(ModBlocks.DIMENSION_CATALYST_ITEM.get().getRegistryName().getPath(), modLoc("block/" + LibBlockNames.DIMENSION_CATALYST));
//no floating flowers here
//generating
var list = new ArrayList<>(Registry.ITEM.stream()
.filter(p -> p.getRegistryName().getNamespace().equals(ExtraBotany.MODID))
.filter(p -> (p instanceof ItemBlockSpecialFlower))
.toList());
for (var item : list)
{
var path = item.getRegistryName().getPath();
if (!path.startsWith("floating_"))
{
singleTexture(path, mcLoc("item/generated"), "layer0", modLoc("block/" + path));
}
}
/*
singleTexture(ModSubtiles.sunshinelily_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.SUNSHINE_LILY));
singleTexture(ModSubtiles.moonlightlily_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/"+LibBlockNames.MOONLIGHT_LILY));
singleTexture(ModSubtiles.omniviolet_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/"+LibBlockNames.OMNI_VIOLET));
singleTexture(ModSubtiles.geminiorchid_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/"+LibBlockNames.GEMINI_ORCHID));
singleTexture(ModSubtiles.bellflower_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/"+LibBlockNames.BELL_FLOWER));
singleTexture(ModSubtiles.moonlightlily_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.MOONLIGHT_LILY));
singleTexture(ModSubtiles.omniviolet_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.OMNI_VIOLET));
singleTexture(ModSubtiles.geminiorchid_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.GEMINI_ORCHID));
singleTexture(ModSubtiles.bellflower_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.BELL_FLOWER));
singleTexture(ModSubtiles.reikarorchid_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.REIKAR_ORCHID));
singleTexture(ModSubtiles.bloodyenchantress_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.BLOODY_ENCHANTRESS));
singleTexture(ModSubtiles.edelweiss_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.EDELWEISS));
singleTexture(ModSubtiles.tinkleflower_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.TINKLE_FLOWER));
//functional
singleTexture(ModSubtiles.serenitian_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/"+LibBlockNames.SERENITIAN));
singleTexture(ModSubtiles.annoying_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/"+LibBlockNames.ANNOYING_FLOWER));
singleTexture(ModSubtiles.serenitian_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.SERENITIAN));
singleTexture(ModSubtiles.annoying_item.getRegistryName().getPath(), mcLoc("item/generated"), "layer0", modLoc("block/" + LibBlockNames.ANNOYING_FLOWER));
*/
}
private void registerWeaponModels()

View File

@ -4,6 +4,7 @@ import chick.extrabotany.ExtraBotany;
import chick.extrabotany.common.ModEntities;
import chick.extrabotany.common.blocks.ModSubtiles;
import chick.extrabotany.common.blocks.ModTiles;
import chick.extrabotany.common.libs.LibBlockNames;
import chick.extrabotany.forge.client.render.entity.*;
import chick.extrabotany.forge.client.render.tile.RenderTileDimension;
import net.minecraft.client.renderer.RenderType;
@ -13,9 +14,13 @@ import net.minecraft.client.renderer.entity.ThrownItemRenderer;
import net.minecraft.core.Registry;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.block.entity.BlockEntityType;
import vazkii.botania.api.subtile.TileEntitySpecialFlower;
import vazkii.botania.client.render.tile.RenderTileSpecialFlower;
import vazkii.botania.common.block.BlockSpecialFlower;
import java.util.List;
import static net.minecraft.client.renderer.ItemBlockRenderTypes.setRenderLayer;
public final class EntityRenderers
@ -47,17 +52,14 @@ public final class EntityRenderers
public static void registerBlockEntityRenderers(vazkii.botania.client.render.entity.EntityRenderers.BERConsumer consumer)
{
consumer.register(ModTiles.DIMENSION_CATALYST, RenderTileDimension::new);
//floating generating
consumer.register(ModSubtiles.SUNSHINELILY, RenderTileSpecialFlower::new);
consumer.register(ModSubtiles.MOONLIGHTLILY, RenderTileSpecialFlower::new);
consumer.register(ModSubtiles.OMNIVIOLET, RenderTileSpecialFlower::new);
consumer.register(ModSubtiles.GEMINIORCHID, RenderTileSpecialFlower::new);
consumer.register(ModSubtiles.BELLFLOWER, RenderTileSpecialFlower::new);
consumer.register(ModSubtiles.REIKARORCHID, RenderTileSpecialFlower::new);
//floating functional
consumer.register(ModSubtiles.SERENITIAN, RenderTileSpecialFlower::new);
consumer.register(ModSubtiles.ANNOYINGFLOWER, RenderTileSpecialFlower::new);
//Not Safe, But useful
Registry.BLOCK_ENTITY_TYPE.stream()
.filter(b -> b.getRegistryName().getNamespace().equals(ExtraBotany.MODID))
.filter(b -> b.getRegistryName().getPath().startsWith(LibBlockNames.FLOWER_BE_TYPE_PREFIX))
.map(b -> (BlockEntityType<TileEntitySpecialFlower>) b)
.forEach(b -> consumer.register(b, RenderTileSpecialFlower::new));
}
public static void setRenderType()
{
//transparent
@ -70,6 +72,7 @@ public final class EntityRenderers
}
});
}
public static void init(EntityRendererProvider.Context ctx)
{

View File

@ -0,0 +1,113 @@
package chick.extrabotany.forge.client;
import chick.extrabotany.ExtraBotany;
import chick.extrabotany.api.ExtraBotanyCapabilities;
import chick.extrabotany.api.block.ISubTilePassiveFlower;
import chick.extrabotany.common.ModItems;
import chick.extrabotany.common.baubles.SagesManaRing;
import chick.extrabotany.common.blocks.ModSubtiles;
import chick.extrabotany.common.tools.weapons.*;
import chick.extrabotany.common.tools.weapons.ranged.Failnaught;
import chick.extrabotany.forge.impl.ISubTilePassiveFlowerImpl;
import com.google.common.base.Suppliers;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import vazkii.botania.api.BotaniaForgeCapabilities;
import vazkii.botania.api.BotaniaForgeClientCapabilities;
import vazkii.botania.api.block.IWandHUD;
import vazkii.botania.api.item.IRelic;
import vazkii.botania.api.mana.IManaItem;
import vazkii.botania.forge.CapabilityUtil;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;
import static vazkii.botania.common.lib.ResourceLocationHelper.prefix;
public class ForgeCapabilityInit
{
private static final Supplier<Map<Item, Function<ItemStack, IManaItem>>> MANA_ITEM = Suppliers.memoize(() -> Map.of(
ModItems.SAGES_MANA_RING.get(), SagesManaRing.GreaterManaItem::new
));
private static final Supplier<Map<Item, Function<ItemStack, IRelic>>> RELIC = Suppliers.memoize(() -> Map.of(
ModItems.TRUE_TERRA_BLADE.get(), TrueTerraBlade::makeRelic,
ModItems.TRUE_SHADOW_KATANA.get(), TrueShadowKatana::makeRelic,
ModItems.TRUE_THUNSTAR_CALLER.get(), TrueThunStarCaller::makeRelic,
ModItems.INFLUX_WAVER.get(), InfluxWaver::makeRelic,
ModItems.FAILNAUGHT.get(), Failnaught::makeRelic,
ModItems.EXCALIBER.get(), Excaliber::makeRelic
));
/**
* Register Item Capabilities
*/
public static void attachItemStackCaps(AttachCapabilitiesEvent<ItemStack> e)
{
var stack = e.getObject();
var makeManaItem = MANA_ITEM.get().get(stack.getItem());
if (makeManaItem != null)
{
e.addCapability(new ResourceLocation(ExtraBotany.MODID, "mana_item"),
CapabilityUtil.makeProvider(BotaniaForgeCapabilities.MANA_ITEM, makeManaItem.apply(stack)));
}
var makeRelic = RELIC.get().get(stack.getItem());
if (makeRelic != null)
{
e.addCapability(new ResourceLocation(ExtraBotany.MODID, "relic"),
CapabilityUtil.makeProvider(BotaniaForgeCapabilities.RELIC, makeRelic.apply(stack)));
}
}
private static final Supplier<Map<BlockEntityType<?>, Function<BlockEntity, IWandHUD>>> WAND_HUD = Suppliers.memoize(() ->
{
var ret = new IdentityHashMap<BlockEntityType<?>, Function<BlockEntity, IWandHUD>>();
ModSubtiles.registerWandHudCaps((factory, types) ->
{
for (var type : types)
{
ret.put(type, factory);
}
});
return Collections.unmodifiableMap(ret);
});
private static final Supplier<Map<BlockEntityType<?>, Function<BlockEntity, ISubTilePassiveFlower>>> PASSIVE_FLOWER = Suppliers.memoize(() -> Map.of(
vazkii.botania.common.block.ModSubtiles.HYDROANGEAS, ISubTilePassiveFlowerImpl::new,
ModSubtiles.SUNSHINELILY, ISubTilePassiveFlowerImpl::new,
ModSubtiles.MOONLIGHTLILY, ISubTilePassiveFlowerImpl::new,
ModSubtiles.BELLFLOWER, ISubTilePassiveFlowerImpl::new,
ModSubtiles.GEMINIORCHID, ISubTilePassiveFlowerImpl::new
));
/**
* Register BlockEntity Capabilities
*/
public static void attachBlockEntityCaps(AttachCapabilitiesEvent<BlockEntity> e)
{
var be = e.getObject();
var makeWandHud = WAND_HUD.get().get(be.getType());
if (makeWandHud != null)
{
e.addCapability(prefix("wand_hud"),
CapabilityUtil.makeProvider(BotaniaForgeClientCapabilities.WAND_HUD, makeWandHud.apply(be)));
}
var passiveFlower = PASSIVE_FLOWER.get().get(be.getType());
if (passiveFlower != null)
{
e.addCapability(new ResourceLocation(ExtraBotany.MODID, "passive_flower"),
CapabilityUtil.makeProvider(ExtraBotanyCapabilities.PASSIVE_FLOWER, passiveFlower.apply(be)));
}
}
}

View File

@ -1,7 +1,7 @@
package chick.extrabotany.forge.client;
import chick.extrabotany.ExtraBotany;
import chick.extrabotany.api.ExtraBotanyForgeCapabilities;
import chick.extrabotany.api.ExtraBotanyCapabilities;
import chick.extrabotany.api.block.ISubTilePassiveFlower;
import chick.extrabotany.common.ModBlocks;
import chick.extrabotany.common.ModItemProperties;
@ -72,8 +72,9 @@ public class ForgeClientInitializer
bus.addGenericListener(Block.class, (RegistryEvent.Register<Block> e) -> ModLootModifiers.init());
var forgebus = MinecraftForge.EVENT_BUS;
forgebus.addGenericListener(BlockEntity.class, ForgeClientInitializer::attachBlockEntityCapabilities);
forgebus.addGenericListener(ItemStack.class, ForgeClientInitializer::attachItemCaps);
//TODO: changed. check it after
forgebus.addGenericListener(BlockEntity.class, ForgeCapabilityInit::attachBlockEntityCaps);
forgebus.addGenericListener(ItemStack.class, ForgeCapabilityInit::attachItemStackCaps);
NetworkHandler.registerMessage();
}
@ -152,7 +153,7 @@ public class ForgeClientInitializer
if (passiveFlower != null)
{
e.addCapability(new ResourceLocation(ExtraBotany.MODID, "passive_flower"),
CapabilityUtil.makeProvider(ExtraBotanyForgeCapabilities.PASSIVE_FLOWER, passiveFlower.apply(be)));
CapabilityUtil.makeProvider(ExtraBotanyCapabilities.PASSIVE_FLOWER, passiveFlower.apply(be)));
}
}

View File

@ -1,7 +1,7 @@
package chick.extrabotany.forge.xplat;
import chick.extrabotany.ExtraBotany;
import chick.extrabotany.api.ExtraBotanyForgeCapabilities;
import chick.extrabotany.api.ExtraBotanyCapabilities;
import chick.extrabotany.api.block.ISubTilePassiveFlower;
import chick.extrabotany.xplat.IXplatAbstractions;
import net.minecraft.world.level.block.entity.BlockEntity;
@ -46,7 +46,7 @@ public class ForgeXplatImpl implements IXplatAbstractions
@Override
public ISubTilePassiveFlower findPassiveFlower(BlockEntity blockEntity)
{
return blockEntity.getCapability(ExtraBotanyForgeCapabilities.PASSIVE_FLOWER).orElse(null);
return blockEntity.getCapability(ExtraBotanyCapabilities.PASSIVE_FLOWER).orElse(null);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB