diff --git a/runClient.launch b/runClient.launch index 24823cb8..cc00ce7c 100644 --- a/runClient.launch +++ b/runClient.launch @@ -1,5 +1,11 @@ + + + + + + @@ -12,9 +18,11 @@ + + - + diff --git a/runData.launch b/runData.launch index c9e117f3..df5ae262 100644 --- a/runData.launch +++ b/runData.launch @@ -1,5 +1,11 @@ + + + + + + @@ -9,8 +15,11 @@ + + + diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 93224023..eba2d981 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -7,10 +7,10 @@ cb435652c27b4978d8db83af2fd531ccaa82ada7 assets/bloodmagic/blockstates/accelerat 904d9baa649250571bce5f965cf48fbec69c2c1a assets/bloodmagic/blockstates/bloodlight.json 5f3898cc4891f85091fe6104800d6c88d9e85e29 assets/bloodmagic/blockstates/bloodstonebrick.json 631b579c38652efbcd9e5771d09ad6e476f3ba00 assets/bloodmagic/blockstates/chargingrune.json -d81673d78195fecd20f55daff394882c1fca18c3 assets/bloodmagic/blockstates/corrosivedemoncrystal.json +a35188b0244bf9808098c7d49d0af9bd32cef297 assets/bloodmagic/blockstates/corrosivedemoncrystal.json b943c6433f295c168841aec3c3f62e525c5c9cc9 assets/bloodmagic/blockstates/creeping_doubt.json a54ab8dfd36a593829dc33644c5f9dbccaaadaf3 assets/bloodmagic/blockstates/deforester_charge.json -5efc11906969389596d32e159d4e973672d5ca56 assets/bloodmagic/blockstates/destructivedemoncrystal.json +b696f680545dffa4d3fbcc83b4b81ab58ac69aef assets/bloodmagic/blockstates/destructivedemoncrystal.json 6bd58d1d02a40416cec29409dee7ef80038b26d5 assets/bloodmagic/blockstates/dislocationrune.json 0b7d0241c379d0b3a8a4fa2dae79d4f998800a1f assets/bloodmagic/blockstates/dungeon_brick1.json 19d1da41c8b836a88ea7164b32e5a8525e5155cf assets/bloodmagic/blockstates/dungeon_brick2.json @@ -43,22 +43,22 @@ e1a98bd53fca155e4bbb03c1e548341af0f84bd7 assets/bloodmagic/blockstates/masterrit 95a0c9a84139cf92c2689e53408b51619db126a1 assets/bloodmagic/blockstates/obsidianbrickpath.json 8b0ea137c63cf3a658a03eee58ca4b2c3d996f87 assets/bloodmagic/blockstates/obsidiantilepath.json 372ecd737f7082a4c2c70e46745f893b1179f885 assets/bloodmagic/blockstates/orbcapacityrune.json -d7a6ec187f6ba493e0cddf61f3b15d77537b1b23 assets/bloodmagic/blockstates/rawdemoncrystal.json +a2eaa9166258d7179d9e5099200f777bb9edf613 assets/bloodmagic/blockstates/rawdemoncrystal.json 90daa355e528ab8a6582f796951201882f3c56da assets/bloodmagic/blockstates/ritualstone.json 285618c1a8ec36e36d479f577190579ae7616529 assets/bloodmagic/blockstates/sacrificerune.json b03040d7a168653bf8df3600033b8fde2383db30 assets/bloodmagic/blockstates/selfsacrificerune.json d2e2e78bd859c321a72f40fbb17ca79292d58031 assets/bloodmagic/blockstates/shaped_charge.json 487ffdc02ab7b65aafcb932e3b5cf6ea0500b21d assets/bloodmagic/blockstates/speedrune.json -52b8ed3cc54b68d5f7927d1f24cfee825b526cc0 assets/bloodmagic/blockstates/steadfastdemoncrystal.json +f1ca47098385a955155cab9c2a97219e02d390a0 assets/bloodmagic/blockstates/steadfastdemoncrystal.json 297bc2425f7b07b1a9dd3f7f6649c44f88dbac29 assets/bloodmagic/blockstates/stonebrickpath.json e3256db10fc8a8ab540f6ac8d27e0f47861e817a assets/bloodmagic/blockstates/stonetilepath.json -3333b28d8b7411aa19394519df115c9d112836f5 assets/bloodmagic/blockstates/vengefuldemoncrystal.json +48ed6b25a5d8d8074c38d772fdc27c1753d42c36 assets/bloodmagic/blockstates/vengefuldemoncrystal.json e6d9cf699667aaa47efff37b2b033895dee29c15 assets/bloodmagic/blockstates/waterritualstone.json 74c889434f46e060e8f185e8ef674312eb2f1192 assets/bloodmagic/blockstates/woodbrickpath.json 42f26f715bddd16c069f9b51e3767b36477c8908 assets/bloodmagic/blockstates/woodtilepath.json 3c6ce233dae6c1307d9016406c324bbe844b4e1e assets/bloodmagic/blockstates/wornstonebrickpath.json d59655f12d1724b73b77c373fb6864fcff69db12 assets/bloodmagic/blockstates/wornstonetilepath.json -26ec223c914757fa7922f89db0e41350240fbb42 assets/bloodmagic/lang/en_us.json +1ff92610a5c5287b8c0b57fe9c91b62052089821 assets/bloodmagic/lang/en_us.json 34445195b9f2459475cde53454bc8e37d32865d7 assets/bloodmagic/models/block/accelerationrune.json bcdbccc49d4509571be6988762ab87126275a4c8 assets/bloodmagic/models/block/airritualstone.json adf6c0b1e25451609486dc8c8cfbd9cf0f8c67f4 assets/bloodmagic/models/block/alchemicalreactionchamber.json @@ -208,6 +208,7 @@ d3c33ff908880e7abc8a2cd977304419ec48a23d assets/bloodmagic/models/item/bettercap db9d31cae77018833be0e4d38db84d75adeb30a1 assets/bloodmagic/models/item/blankslate.json c801f34e88224f9fabd89245f9d2a0d9ef466b64 assets/bloodmagic/models/item/bloodlightsigil.json c795d1b7aa99ce27da63868f81bac615cf199c66 assets/bloodmagic/models/item/bloodstonebrick.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/bow_power_anointment.json 7315e49149eca494e6b132d383082cb76fc9c0e4 assets/bloodmagic/models/item/chargingrune.json 8c84f53166f2fdf7eaac4b6dc45402e3fa5b18d9 assets/bloodmagic/models/item/coalsand.json 3636c40fafa385642db14ca5f09d68e547060c4d assets/bloodmagic/models/item/corrosivecrystal.json @@ -281,6 +282,7 @@ ffc3da1cbb86adc5aec7dfd503d23af319aec529 assets/bloodmagic/models/item/lavacryst dd50db84188025895693164736f4799e75b8c7a9 assets/bloodmagic/models/item/livinghelmet.json e39cf255d5c8873e02d1f2df2c829d0858df25e3 assets/bloodmagic/models/item/livingleggings.json 45756697d2f012fcc2de5fead120768a87655662 assets/bloodmagic/models/item/livingplate.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/looting_anointment.json 7211624c82431d12dd21b3de262f4f332a69e0e1 assets/bloodmagic/models/item/magicianbloodorb.json 2b760616f7dad714accf1249b85eec4761f69706 assets/bloodmagic/models/item/masterbloodorb.json 9e377ab2c131993f96ab6fb544bda4dbba0ab87e assets/bloodmagic/models/item/masterritualstone.json @@ -295,6 +297,7 @@ d5fd516b1cf94ab01d5b1fbe554705215f21ff66 assets/bloodmagic/models/item/plantoil. abdd58730704a0936783c6752098a9fec1e3f18d assets/bloodmagic/models/item/primitive_crystalline_resonator.json f3dd3ad67c86895983e3cf0f21e44d0f4046962e assets/bloodmagic/models/item/primitive_explosive_cell.json 0a88f03b48e0032f7ed7878212b0b01a930186d0 assets/bloodmagic/models/item/primitive_hydration_cell.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/quick_draw_anointment.json 63fe86d0faf9aa03a513221a6a12828a886b1301 assets/bloodmagic/models/item/rawdemoncrystal.json 6f5418ed5739381e95b4d3b33f3e2924a6233941 assets/bloodmagic/models/item/reagentair.json 0f3fbea424448d41cac91bc479d9235def615af7 assets/bloodmagic/models/item/reagentbinding.json @@ -323,6 +326,7 @@ cc71421e98ee7ee047a4cfbb6cb69529c2b02d4e assets/bloodmagic/models/item/selfsacri ea5747638d0b5dcc03f008b202cc60a11e0827bb assets/bloodmagic/models/item/sigilofmagnetism.json dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/silk_touch_anointment.json 08bee690d5092e3c9e6c04c43f50af668fdb3b7e assets/bloodmagic/models/item/slate_vial.json +dd4a590f68820a04ca4a71df507e8a39ca6bd393 assets/bloodmagic/models/item/smelting_anointment.json db0f63198089161b8d4ecfb1ec8a45f7dc5ba83d assets/bloodmagic/models/item/soulaxe.json 9ec68a2dcf04b987c3c5d5c6c52195e3deccacbb assets/bloodmagic/models/item/soulgemcommon.json 6501bb4b72457e8107bec818f26de6178b655203 assets/bloodmagic/models/item/soulgemgreater.json @@ -408,6 +412,7 @@ a31019db55828cb937a071ac2f74b125a2d0c955 assets/bloodmagic/models/item/waterritu bfa6dec13cc193bbe634c2c68b641f3897ccb342 assets/bloodmagic/models/item/watersigil.json cb4eaa9292890e172b0f36a63605db0c973f735e assets/bloodmagic/models/item/weakbloodorb.json 46423c1325542ab0efad772e1aab52082d9ef636 assets/bloodmagic/models/item/weakbloodshard.json +6b16a94dcb06f31b7a92f250449ec42dbc3568aa assets/bloodmagic/models/item/will_power_anointment.json c0907e611e09ccc924452070519006add21f3d12 assets/bloodmagic/models/item/woodbrickpath.json 1de444baa270a146dcd33c784b08f75a3d745421 assets/bloodmagic/models/item/woodtilepath.json c8ea88c439c91d0eeee3e6204a3c50f8cfd36758 assets/bloodmagic/models/item/wornstonebrickpath.json @@ -530,6 +535,7 @@ e50009fa724173c2dcb4fab49b4f029039f69bf8 data/bloodmagic/recipes/alchemytable/cl 96cc66cdb9c5f786eaa899e1fbdd38144e44a0fe data/bloodmagic/recipes/alchemytable/explosive_powder.json 1fa964af556af521d8eaf1a686befdd9d69c63af data/bloodmagic/recipes/alchemytable/flint_from_gravel.json 90b9431139014864558e96916eb835105f3b5a2f data/bloodmagic/recipes/alchemytable/fortune_anointment.json +7b4b20c316a4c2e533d8a123025a4424ea808142 data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json aff95e4322f9e8daaffc2337964f95ab6f9d631c data/bloodmagic/recipes/alchemytable/grass_block.json 540edca1f507d366e55887b4429a9952c00f4060 data/bloodmagic/recipes/alchemytable/gunpowder.json 9f1b37b59f8abbe419306b3eb8af59317a54483a data/bloodmagic/recipes/alchemytable/hidden_knowledge_anointment.json @@ -541,6 +547,7 @@ b18dde32d8a428f44437c0e53e5fdb990597498d data/bloodmagic/recipes/alchemytable/ne f1fd76dab242882e327b4677b95328cb3a52deee data/bloodmagic/recipes/alchemytable/plantoil_from_carrots.json e9f5a06e4800cb03cc13480db9fdb7b9fa47f487 data/bloodmagic/recipes/alchemytable/plantoil_from_taters.json f41e9bf8376ffcad07752b5657e27e06e500be0a data/bloodmagic/recipes/alchemytable/plantoil_from_wheat.json +6230b36712a5b6d239ec35b85e7fda0917ca7bc2 data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json 842713a090b5abf3ce967dbee90d7582f7414949 data/bloodmagic/recipes/alchemytable/sand_coal.json 9292733697eca52de2c2ac7325ba45ab0354bfa3 data/bloodmagic/recipes/alchemytable/sand_gold.json 06f00cce47e0d5e5d25a2587796494340f8a3278 data/bloodmagic/recipes/alchemytable/sand_iron.json diff --git a/src/generated/resources/assets/bloodmagic/blockstates/corrosivedemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/corrosivedemoncrystal.json index 49dacfe0..fb67a253 100644 --- a/src/generated/resources/assets/bloodmagic/blockstates/corrosivedemoncrystal.json +++ b/src/generated/resources/assets/bloodmagic/blockstates/corrosivedemoncrystal.json @@ -2,8 +2,8 @@ "multipart": [ { "when": { - "attached": "down", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal1", @@ -12,8 +12,8 @@ }, { "when": { - "attached": "up", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal1" @@ -21,8 +21,8 @@ }, { "when": { - "attached": "north", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal1", @@ -31,8 +31,8 @@ }, { "when": { - "attached": "south", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal1", @@ -41,8 +41,8 @@ }, { "when": { - "attached": "west", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal1", @@ -52,8 +52,8 @@ }, { "when": { - "attached": "east", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal1", @@ -63,8 +63,8 @@ }, { "when": { - "attached": "down", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal2", @@ -73,8 +73,8 @@ }, { "when": { - "attached": "up", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal2" @@ -82,8 +82,8 @@ }, { "when": { - "attached": "north", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal2", @@ -92,8 +92,8 @@ }, { "when": { - "attached": "south", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal2", @@ -102,8 +102,8 @@ }, { "when": { - "attached": "west", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal2", @@ -113,8 +113,8 @@ }, { "when": { - "attached": "east", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal2", @@ -124,8 +124,8 @@ }, { "when": { - "attached": "down", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal3", @@ -134,8 +134,8 @@ }, { "when": { - "attached": "up", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal3" @@ -143,8 +143,8 @@ }, { "when": { - "attached": "north", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal3", @@ -153,8 +153,8 @@ }, { "when": { - "attached": "south", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal3", @@ -163,8 +163,8 @@ }, { "when": { - "attached": "west", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal3", @@ -174,8 +174,8 @@ }, { "when": { - "attached": "east", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal3", @@ -185,8 +185,8 @@ }, { "when": { - "attached": "down", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal4", @@ -195,8 +195,8 @@ }, { "when": { - "attached": "up", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal4" @@ -204,8 +204,8 @@ }, { "when": { - "attached": "north", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal4", @@ -214,8 +214,8 @@ }, { "when": { - "attached": "south", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal4", @@ -224,8 +224,8 @@ }, { "when": { - "attached": "west", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal4", @@ -235,8 +235,8 @@ }, { "when": { - "attached": "east", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal4", @@ -246,8 +246,8 @@ }, { "when": { - "attached": "down", - "age": "4|5|6" + "age": "4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal5", @@ -256,8 +256,8 @@ }, { "when": { - "attached": "up", - "age": "4|5|6" + "age": "4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal5" @@ -265,8 +265,8 @@ }, { "when": { - "attached": "north", - "age": "4|5|6" + "age": "4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal5", @@ -275,8 +275,8 @@ }, { "when": { - "attached": "south", - "age": "4|5|6" + "age": "4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal5", @@ -285,8 +285,8 @@ }, { "when": { - "attached": "west", - "age": "4|5|6" + "age": "4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal5", @@ -296,8 +296,8 @@ }, { "when": { - "attached": "east", - "age": "4|5|6" + "age": "4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal5", @@ -307,8 +307,8 @@ }, { "when": { - "attached": "down", - "age": "5|6" + "age": "5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal6", @@ -317,8 +317,8 @@ }, { "when": { - "attached": "up", - "age": "5|6" + "age": "5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal6" @@ -326,8 +326,8 @@ }, { "when": { - "attached": "north", - "age": "5|6" + "age": "5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal6", @@ -336,8 +336,8 @@ }, { "when": { - "attached": "south", - "age": "5|6" + "age": "5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal6", @@ -346,8 +346,8 @@ }, { "when": { - "attached": "west", - "age": "5|6" + "age": "5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal6", @@ -357,8 +357,8 @@ }, { "when": { - "attached": "east", - "age": "5|6" + "age": "5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal6", @@ -368,8 +368,8 @@ }, { "when": { - "attached": "down", - "age": "6" + "age": "6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal7", @@ -378,8 +378,8 @@ }, { "when": { - "attached": "up", - "age": "6" + "age": "6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal7" @@ -387,8 +387,8 @@ }, { "when": { - "attached": "north", - "age": "6" + "age": "6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal7", @@ -397,8 +397,8 @@ }, { "when": { - "attached": "south", - "age": "6" + "age": "6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal7", @@ -407,8 +407,8 @@ }, { "when": { - "attached": "west", - "age": "6" + "age": "6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal7", @@ -418,8 +418,8 @@ }, { "when": { - "attached": "east", - "age": "6" + "age": "6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/corrosivecrystal7", diff --git a/src/generated/resources/assets/bloodmagic/blockstates/destructivedemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/destructivedemoncrystal.json index 57ec0106..b99a263f 100644 --- a/src/generated/resources/assets/bloodmagic/blockstates/destructivedemoncrystal.json +++ b/src/generated/resources/assets/bloodmagic/blockstates/destructivedemoncrystal.json @@ -2,8 +2,8 @@ "multipart": [ { "when": { - "attached": "down", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal1", @@ -12,8 +12,8 @@ }, { "when": { - "attached": "up", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal1" @@ -21,8 +21,8 @@ }, { "when": { - "attached": "north", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal1", @@ -31,8 +31,8 @@ }, { "when": { - "attached": "south", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal1", @@ -41,8 +41,8 @@ }, { "when": { - "attached": "west", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal1", @@ -52,8 +52,8 @@ }, { "when": { - "attached": "east", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal1", @@ -63,8 +63,8 @@ }, { "when": { - "attached": "down", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal2", @@ -73,8 +73,8 @@ }, { "when": { - "attached": "up", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal2" @@ -82,8 +82,8 @@ }, { "when": { - "attached": "north", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal2", @@ -92,8 +92,8 @@ }, { "when": { - "attached": "south", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal2", @@ -102,8 +102,8 @@ }, { "when": { - "attached": "west", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal2", @@ -113,8 +113,8 @@ }, { "when": { - "attached": "east", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal2", @@ -124,8 +124,8 @@ }, { "when": { - "attached": "down", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal3", @@ -134,8 +134,8 @@ }, { "when": { - "attached": "up", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal3" @@ -143,8 +143,8 @@ }, { "when": { - "attached": "north", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal3", @@ -153,8 +153,8 @@ }, { "when": { - "attached": "south", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal3", @@ -163,8 +163,8 @@ }, { "when": { - "attached": "west", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal3", @@ -174,8 +174,8 @@ }, { "when": { - "attached": "east", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal3", @@ -185,8 +185,8 @@ }, { "when": { - "attached": "down", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal4", @@ -195,8 +195,8 @@ }, { "when": { - "attached": "up", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal4" @@ -204,8 +204,8 @@ }, { "when": { - "attached": "north", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal4", @@ -214,8 +214,8 @@ }, { "when": { - "attached": "south", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal4", @@ -224,8 +224,8 @@ }, { "when": { - "attached": "west", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal4", @@ -235,8 +235,8 @@ }, { "when": { - "attached": "east", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal4", @@ -246,8 +246,8 @@ }, { "when": { - "attached": "down", - "age": "4|5|6" + "age": "4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal5", @@ -256,8 +256,8 @@ }, { "when": { - "attached": "up", - "age": "4|5|6" + "age": "4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal5" @@ -265,8 +265,8 @@ }, { "when": { - "attached": "north", - "age": "4|5|6" + "age": "4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal5", @@ -275,8 +275,8 @@ }, { "when": { - "attached": "south", - "age": "4|5|6" + "age": "4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal5", @@ -285,8 +285,8 @@ }, { "when": { - "attached": "west", - "age": "4|5|6" + "age": "4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal5", @@ -296,8 +296,8 @@ }, { "when": { - "attached": "east", - "age": "4|5|6" + "age": "4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal5", @@ -307,8 +307,8 @@ }, { "when": { - "attached": "down", - "age": "5|6" + "age": "5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal6", @@ -317,8 +317,8 @@ }, { "when": { - "attached": "up", - "age": "5|6" + "age": "5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal6" @@ -326,8 +326,8 @@ }, { "when": { - "attached": "north", - "age": "5|6" + "age": "5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal6", @@ -336,8 +336,8 @@ }, { "when": { - "attached": "south", - "age": "5|6" + "age": "5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal6", @@ -346,8 +346,8 @@ }, { "when": { - "attached": "west", - "age": "5|6" + "age": "5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal6", @@ -357,8 +357,8 @@ }, { "when": { - "attached": "east", - "age": "5|6" + "age": "5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal6", @@ -368,8 +368,8 @@ }, { "when": { - "attached": "down", - "age": "6" + "age": "6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal7", @@ -378,8 +378,8 @@ }, { "when": { - "attached": "up", - "age": "6" + "age": "6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal7" @@ -387,8 +387,8 @@ }, { "when": { - "attached": "north", - "age": "6" + "age": "6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal7", @@ -397,8 +397,8 @@ }, { "when": { - "attached": "south", - "age": "6" + "age": "6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal7", @@ -407,8 +407,8 @@ }, { "when": { - "attached": "west", - "age": "6" + "age": "6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal7", @@ -418,8 +418,8 @@ }, { "when": { - "attached": "east", - "age": "6" + "age": "6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/destructivecrystal7", diff --git a/src/generated/resources/assets/bloodmagic/blockstates/rawdemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/rawdemoncrystal.json index 868a1e78..be9a5c2a 100644 --- a/src/generated/resources/assets/bloodmagic/blockstates/rawdemoncrystal.json +++ b/src/generated/resources/assets/bloodmagic/blockstates/rawdemoncrystal.json @@ -2,8 +2,8 @@ "multipart": [ { "when": { - "attached": "down", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal1", @@ -12,8 +12,8 @@ }, { "when": { - "attached": "up", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal1" @@ -21,8 +21,8 @@ }, { "when": { - "attached": "north", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal1", @@ -31,8 +31,8 @@ }, { "when": { - "attached": "south", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal1", @@ -41,8 +41,8 @@ }, { "when": { - "attached": "west", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal1", @@ -52,8 +52,8 @@ }, { "when": { - "attached": "east", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal1", @@ -63,8 +63,8 @@ }, { "when": { - "attached": "down", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal2", @@ -73,8 +73,8 @@ }, { "when": { - "attached": "up", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal2" @@ -82,8 +82,8 @@ }, { "when": { - "attached": "north", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal2", @@ -92,8 +92,8 @@ }, { "when": { - "attached": "south", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal2", @@ -102,8 +102,8 @@ }, { "when": { - "attached": "west", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal2", @@ -113,8 +113,8 @@ }, { "when": { - "attached": "east", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal2", @@ -124,8 +124,8 @@ }, { "when": { - "attached": "down", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal3", @@ -134,8 +134,8 @@ }, { "when": { - "attached": "up", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal3" @@ -143,8 +143,8 @@ }, { "when": { - "attached": "north", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal3", @@ -153,8 +153,8 @@ }, { "when": { - "attached": "south", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal3", @@ -163,8 +163,8 @@ }, { "when": { - "attached": "west", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal3", @@ -174,8 +174,8 @@ }, { "when": { - "attached": "east", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal3", @@ -185,8 +185,8 @@ }, { "when": { - "attached": "down", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal4", @@ -195,8 +195,8 @@ }, { "when": { - "attached": "up", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal4" @@ -204,8 +204,8 @@ }, { "when": { - "attached": "north", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal4", @@ -214,8 +214,8 @@ }, { "when": { - "attached": "south", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal4", @@ -224,8 +224,8 @@ }, { "when": { - "attached": "west", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal4", @@ -235,8 +235,8 @@ }, { "when": { - "attached": "east", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal4", @@ -246,8 +246,8 @@ }, { "when": { - "attached": "down", - "age": "4|5|6" + "age": "4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal5", @@ -256,8 +256,8 @@ }, { "when": { - "attached": "up", - "age": "4|5|6" + "age": "4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal5" @@ -265,8 +265,8 @@ }, { "when": { - "attached": "north", - "age": "4|5|6" + "age": "4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal5", @@ -275,8 +275,8 @@ }, { "when": { - "attached": "south", - "age": "4|5|6" + "age": "4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal5", @@ -285,8 +285,8 @@ }, { "when": { - "attached": "west", - "age": "4|5|6" + "age": "4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal5", @@ -296,8 +296,8 @@ }, { "when": { - "attached": "east", - "age": "4|5|6" + "age": "4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal5", @@ -307,8 +307,8 @@ }, { "when": { - "attached": "down", - "age": "5|6" + "age": "5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal6", @@ -317,8 +317,8 @@ }, { "when": { - "attached": "up", - "age": "5|6" + "age": "5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal6" @@ -326,8 +326,8 @@ }, { "when": { - "attached": "north", - "age": "5|6" + "age": "5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal6", @@ -336,8 +336,8 @@ }, { "when": { - "attached": "south", - "age": "5|6" + "age": "5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal6", @@ -346,8 +346,8 @@ }, { "when": { - "attached": "west", - "age": "5|6" + "age": "5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal6", @@ -357,8 +357,8 @@ }, { "when": { - "attached": "east", - "age": "5|6" + "age": "5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal6", @@ -368,8 +368,8 @@ }, { "when": { - "attached": "down", - "age": "6" + "age": "6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal7", @@ -378,8 +378,8 @@ }, { "when": { - "attached": "up", - "age": "6" + "age": "6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal7" @@ -387,8 +387,8 @@ }, { "when": { - "attached": "north", - "age": "6" + "age": "6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal7", @@ -397,8 +397,8 @@ }, { "when": { - "attached": "south", - "age": "6" + "age": "6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal7", @@ -407,8 +407,8 @@ }, { "when": { - "attached": "west", - "age": "6" + "age": "6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal7", @@ -418,8 +418,8 @@ }, { "when": { - "attached": "east", - "age": "6" + "age": "6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/defaultcrystal7", diff --git a/src/generated/resources/assets/bloodmagic/blockstates/steadfastdemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/steadfastdemoncrystal.json index 5a7bc4f4..f886422f 100644 --- a/src/generated/resources/assets/bloodmagic/blockstates/steadfastdemoncrystal.json +++ b/src/generated/resources/assets/bloodmagic/blockstates/steadfastdemoncrystal.json @@ -2,8 +2,8 @@ "multipart": [ { "when": { - "attached": "down", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal1", @@ -12,8 +12,8 @@ }, { "when": { - "attached": "up", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal1" @@ -21,8 +21,8 @@ }, { "when": { - "attached": "north", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal1", @@ -31,8 +31,8 @@ }, { "when": { - "attached": "south", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal1", @@ -41,8 +41,8 @@ }, { "when": { - "attached": "west", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal1", @@ -52,8 +52,8 @@ }, { "when": { - "attached": "east", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal1", @@ -63,8 +63,8 @@ }, { "when": { - "attached": "down", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal2", @@ -73,8 +73,8 @@ }, { "when": { - "attached": "up", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal2" @@ -82,8 +82,8 @@ }, { "when": { - "attached": "north", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal2", @@ -92,8 +92,8 @@ }, { "when": { - "attached": "south", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal2", @@ -102,8 +102,8 @@ }, { "when": { - "attached": "west", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal2", @@ -113,8 +113,8 @@ }, { "when": { - "attached": "east", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal2", @@ -124,8 +124,8 @@ }, { "when": { - "attached": "down", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal3", @@ -134,8 +134,8 @@ }, { "when": { - "attached": "up", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal3" @@ -143,8 +143,8 @@ }, { "when": { - "attached": "north", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal3", @@ -153,8 +153,8 @@ }, { "when": { - "attached": "south", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal3", @@ -163,8 +163,8 @@ }, { "when": { - "attached": "west", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal3", @@ -174,8 +174,8 @@ }, { "when": { - "attached": "east", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal3", @@ -185,8 +185,8 @@ }, { "when": { - "attached": "down", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal4", @@ -195,8 +195,8 @@ }, { "when": { - "attached": "up", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal4" @@ -204,8 +204,8 @@ }, { "when": { - "attached": "north", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal4", @@ -214,8 +214,8 @@ }, { "when": { - "attached": "south", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal4", @@ -224,8 +224,8 @@ }, { "when": { - "attached": "west", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal4", @@ -235,8 +235,8 @@ }, { "when": { - "attached": "east", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal4", @@ -246,8 +246,8 @@ }, { "when": { - "attached": "down", - "age": "4|5|6" + "age": "4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal5", @@ -256,8 +256,8 @@ }, { "when": { - "attached": "up", - "age": "4|5|6" + "age": "4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal5" @@ -265,8 +265,8 @@ }, { "when": { - "attached": "north", - "age": "4|5|6" + "age": "4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal5", @@ -275,8 +275,8 @@ }, { "when": { - "attached": "south", - "age": "4|5|6" + "age": "4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal5", @@ -285,8 +285,8 @@ }, { "when": { - "attached": "west", - "age": "4|5|6" + "age": "4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal5", @@ -296,8 +296,8 @@ }, { "when": { - "attached": "east", - "age": "4|5|6" + "age": "4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal5", @@ -307,8 +307,8 @@ }, { "when": { - "attached": "down", - "age": "5|6" + "age": "5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal6", @@ -317,8 +317,8 @@ }, { "when": { - "attached": "up", - "age": "5|6" + "age": "5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal6" @@ -326,8 +326,8 @@ }, { "when": { - "attached": "north", - "age": "5|6" + "age": "5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal6", @@ -336,8 +336,8 @@ }, { "when": { - "attached": "south", - "age": "5|6" + "age": "5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal6", @@ -346,8 +346,8 @@ }, { "when": { - "attached": "west", - "age": "5|6" + "age": "5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal6", @@ -357,8 +357,8 @@ }, { "when": { - "attached": "east", - "age": "5|6" + "age": "5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal6", @@ -368,8 +368,8 @@ }, { "when": { - "attached": "down", - "age": "6" + "age": "6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal7", @@ -378,8 +378,8 @@ }, { "when": { - "attached": "up", - "age": "6" + "age": "6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal7" @@ -387,8 +387,8 @@ }, { "when": { - "attached": "north", - "age": "6" + "age": "6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal7", @@ -397,8 +397,8 @@ }, { "when": { - "attached": "south", - "age": "6" + "age": "6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal7", @@ -407,8 +407,8 @@ }, { "when": { - "attached": "west", - "age": "6" + "age": "6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal7", @@ -418,8 +418,8 @@ }, { "when": { - "attached": "east", - "age": "6" + "age": "6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/steadfastcrystal7", diff --git a/src/generated/resources/assets/bloodmagic/blockstates/vengefuldemoncrystal.json b/src/generated/resources/assets/bloodmagic/blockstates/vengefuldemoncrystal.json index 75afc7be..c4f8f825 100644 --- a/src/generated/resources/assets/bloodmagic/blockstates/vengefuldemoncrystal.json +++ b/src/generated/resources/assets/bloodmagic/blockstates/vengefuldemoncrystal.json @@ -2,8 +2,8 @@ "multipart": [ { "when": { - "attached": "down", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal1", @@ -12,8 +12,8 @@ }, { "when": { - "attached": "up", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal1" @@ -21,8 +21,8 @@ }, { "when": { - "attached": "north", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal1", @@ -31,8 +31,8 @@ }, { "when": { - "attached": "south", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal1", @@ -41,8 +41,8 @@ }, { "when": { - "attached": "west", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal1", @@ -52,8 +52,8 @@ }, { "when": { - "attached": "east", - "age": "0|1|2|3|4|5|6" + "age": "0|1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal1", @@ -63,8 +63,8 @@ }, { "when": { - "attached": "down", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal2", @@ -73,8 +73,8 @@ }, { "when": { - "attached": "up", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal2" @@ -82,8 +82,8 @@ }, { "when": { - "attached": "north", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal2", @@ -92,8 +92,8 @@ }, { "when": { - "attached": "south", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal2", @@ -102,8 +102,8 @@ }, { "when": { - "attached": "west", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal2", @@ -113,8 +113,8 @@ }, { "when": { - "attached": "east", - "age": "1|2|3|4|5|6" + "age": "1|2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal2", @@ -124,8 +124,8 @@ }, { "when": { - "attached": "down", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal3", @@ -134,8 +134,8 @@ }, { "when": { - "attached": "up", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal3" @@ -143,8 +143,8 @@ }, { "when": { - "attached": "north", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal3", @@ -153,8 +153,8 @@ }, { "when": { - "attached": "south", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal3", @@ -163,8 +163,8 @@ }, { "when": { - "attached": "west", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal3", @@ -174,8 +174,8 @@ }, { "when": { - "attached": "east", - "age": "2|3|4|5|6" + "age": "2|3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal3", @@ -185,8 +185,8 @@ }, { "when": { - "attached": "down", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal4", @@ -195,8 +195,8 @@ }, { "when": { - "attached": "up", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal4" @@ -204,8 +204,8 @@ }, { "when": { - "attached": "north", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal4", @@ -214,8 +214,8 @@ }, { "when": { - "attached": "south", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal4", @@ -224,8 +224,8 @@ }, { "when": { - "attached": "west", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal4", @@ -235,8 +235,8 @@ }, { "when": { - "attached": "east", - "age": "3|4|5|6" + "age": "3|4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal4", @@ -246,8 +246,8 @@ }, { "when": { - "attached": "down", - "age": "4|5|6" + "age": "4|5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal5", @@ -256,8 +256,8 @@ }, { "when": { - "attached": "up", - "age": "4|5|6" + "age": "4|5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal5" @@ -265,8 +265,8 @@ }, { "when": { - "attached": "north", - "age": "4|5|6" + "age": "4|5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal5", @@ -275,8 +275,8 @@ }, { "when": { - "attached": "south", - "age": "4|5|6" + "age": "4|5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal5", @@ -285,8 +285,8 @@ }, { "when": { - "attached": "west", - "age": "4|5|6" + "age": "4|5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal5", @@ -296,8 +296,8 @@ }, { "when": { - "attached": "east", - "age": "4|5|6" + "age": "4|5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal5", @@ -307,8 +307,8 @@ }, { "when": { - "attached": "down", - "age": "5|6" + "age": "5|6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal6", @@ -317,8 +317,8 @@ }, { "when": { - "attached": "up", - "age": "5|6" + "age": "5|6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal6" @@ -326,8 +326,8 @@ }, { "when": { - "attached": "north", - "age": "5|6" + "age": "5|6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal6", @@ -336,8 +336,8 @@ }, { "when": { - "attached": "south", - "age": "5|6" + "age": "5|6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal6", @@ -346,8 +346,8 @@ }, { "when": { - "attached": "west", - "age": "5|6" + "age": "5|6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal6", @@ -357,8 +357,8 @@ }, { "when": { - "attached": "east", - "age": "5|6" + "age": "5|6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal6", @@ -368,8 +368,8 @@ }, { "when": { - "attached": "down", - "age": "6" + "age": "6", + "attached": "down" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal7", @@ -378,8 +378,8 @@ }, { "when": { - "attached": "up", - "age": "6" + "age": "6", + "attached": "up" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal7" @@ -387,8 +387,8 @@ }, { "when": { - "attached": "north", - "age": "6" + "age": "6", + "attached": "north" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal7", @@ -397,8 +397,8 @@ }, { "when": { - "attached": "south", - "age": "6" + "age": "6", + "attached": "south" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal7", @@ -407,8 +407,8 @@ }, { "when": { - "attached": "west", - "age": "6" + "age": "6", + "attached": "west" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal7", @@ -418,8 +418,8 @@ }, { "when": { - "attached": "east", - "age": "6" + "age": "6", + "attached": "east" }, "apply": { "model": "bloodmagic:block/crystal/vengefulcrystal7", diff --git a/src/generated/resources/assets/bloodmagic/lang/en_us.json b/src/generated/resources/assets/bloodmagic/lang/en_us.json index 43c3f9b6..5020d07c 100644 --- a/src/generated/resources/assets/bloodmagic/lang/en_us.json +++ b/src/generated/resources/assets/bloodmagic/lang/en_us.json @@ -1,8 +1,11 @@ { + "anointment.bloodmagic.bow_power": "Heavy Shot", "anointment.bloodmagic.fortune": "Fortunate", "anointment.bloodmagic.hidden_knowledge": "Hidden Knowledge", "anointment.bloodmagic.holy_water": "Holy Light", + "anointment.bloodmagic.looting": "Plundering", "anointment.bloodmagic.melee_damage": "Whetstone", + "anointment.bloodmagic.quick_draw": "Deft Hands", "anointment.bloodmagic.silk_touch": "Soft Touch", "block.bloodmagic.accelerationrune": "Acceleration Rune", "block.bloodmagic.airritualstone": "Air Ritual Stone", @@ -91,6 +94,7 @@ "item.bloodmagic.basiccuttingfluid": "Basic Cutting Fluid", "item.bloodmagic.blankslate": "Blank Slate", "item.bloodmagic.bloodlightsigil": "Sigil of the Blood Lamp", + "item.bloodmagic.bow_power_anointment": "Iron Tip", "item.bloodmagic.coalsand": "Coal Sand", "item.bloodmagic.corrosivecrystal": "Corrosive Will Crystal", "item.bloodmagic.crystalline_resonator": "Crystalline Resonator", @@ -127,6 +131,7 @@ "item.bloodmagic.livinghelmet": "Living Helmet", "item.bloodmagic.livingleggings": "Living Leggings", "item.bloodmagic.livingplate": "Living Chestplate", + "item.bloodmagic.looting_anointment": "Plunderer's Glint", "item.bloodmagic.magicianbloodorb": "Magician Blood Orb", "item.bloodmagic.masterbloodorb": "Master Blood Orb", "item.bloodmagic.melee_anointment": "Honing Oil", @@ -135,6 +140,7 @@ "item.bloodmagic.primitive_crystalline_resonator": "Primitive Resonator", "item.bloodmagic.primitive_explosive_cell": "Primitive Explosive Cell", "item.bloodmagic.primitive_hydration_cell": "Primitive Hydration Cell", + "item.bloodmagic.quick_draw_anointment": "Dexterity Alkahest", "item.bloodmagic.reagentair": "Air Reagent", "item.bloodmagic.reagentbinding": "Binding Reagent", "item.bloodmagic.reagentbloodlight": "Blood Lamp Reagent", diff --git a/src/generated/resources/assets/bloodmagic/models/item/bow_power_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/bow_power_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/bow_power_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/looting_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/looting_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/looting_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/quick_draw_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/quick_draw_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/quick_draw_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/smelting_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/smelting_anointment.json new file mode 100644 index 00000000..5d52447b --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/smelting_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/bloodmagic/models/item/will_power_anointment.json b/src/generated/resources/assets/bloodmagic/models/item/will_power_anointment.json new file mode 100644 index 00000000..057dedef --- /dev/null +++ b/src/generated/resources/assets/bloodmagic/models/item/will_power_anointment.json @@ -0,0 +1,8 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "bloodmagic:item/alchemic_vial_will", + "layer1": "bloodmagic:item/alchemic_liquid", + "layer2": "bloodmagic:item/alchemic_ribbon_will" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json new file mode 100644 index 00000000..bf34285f --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/gold_ore_from_gilded.json @@ -0,0 +1,15 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "minecraft:gilded_blackstone" + } + ], + "output": { + "item": "minecraft:gold_nugget", + "count": 9 + }, + "syphon": 200, + "ticks": 100, + "upgradeLevel": 2 +} \ No newline at end of file diff --git a/src/generated/resources/data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json b/src/generated/resources/data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json new file mode 100644 index 00000000..629a12f4 --- /dev/null +++ b/src/generated/resources/data/bloodmagic/recipes/alchemytable/quick_draw_anointment.json @@ -0,0 +1,23 @@ +{ + "type": "bloodmagic:alchemytable", + "input": [ + { + "item": "bloodmagic:slate_vial" + }, + { + "tag": "forge:crops/nether_wart" + }, + { + "tag": "forge:string" + }, + { + "item": "minecraft:spectral_arrow" + } + ], + "output": { + "item": "bloodmagic:quick_draw_anointment" + }, + "syphon": 500, + "ticks": 100, + "upgradeLevel": 1 +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/anointment/Anointment.java b/src/main/java/wayoftime/bloodmagic/anointment/Anointment.java index e25cebff..1476eb9c 100644 --- a/src/main/java/wayoftime/bloodmagic/anointment/Anointment.java +++ b/src/main/java/wayoftime/bloodmagic/anointment/Anointment.java @@ -49,6 +49,7 @@ public class Anointment extends ForgeRegistryEntry private IAttributeProvider attributeProvider; private IDamageProvider damageProvider; private boolean consumeOnAttack = false; + private boolean consumeOnUseFinish = false; private boolean consumeOnHarvest = false; public Anointment(ResourceLocation key) @@ -204,6 +205,17 @@ public class Anointment extends ForgeRegistryEntry return this.consumeOnAttack; } + public Anointment setConsumeOnUseFinish() + { + this.consumeOnUseFinish = true; + return this; + } + + public boolean consumeOnUseFinish() + { + return this.consumeOnUseFinish; + } + public Anointment setConsumeOnHarvest() { this.consumeOnHarvest = true; diff --git a/src/main/java/wayoftime/bloodmagic/anointment/AnointmentHolder.java b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentHolder.java index 84b556c4..972d5f74 100644 --- a/src/main/java/wayoftime/bloodmagic/anointment/AnointmentHolder.java +++ b/src/main/java/wayoftime/bloodmagic/anointment/AnointmentHolder.java @@ -117,6 +117,33 @@ public class AnointmentHolder return didConsume; } + public boolean consumeAnointmentDurabilityOnUseFinish(ItemStack weaponStack, EquipmentSlotType type) + { + boolean didConsume = false; + List removedAnointments = new ArrayList(); + for (Entry entry : anointments.entrySet()) + { + Anointment annointment = entry.getKey(); + if (annointment.consumeOnUseFinish()) + { + AnointmentData data = entry.getValue(); + data.damage(1); + didConsume = true; + if (data.isMaxDamage()) + { + removedAnointments.add(annointment); + } + } + } + + for (Anointment anointment : removedAnointments) + { + removeAnointment(weaponStack, type, anointment); + } + + return didConsume; + } + public boolean consumeAnointmentDurabilityOnHarvest(ItemStack weaponStack, EquipmentSlotType type) { boolean didConsume = false; diff --git a/src/main/java/wayoftime/bloodmagic/client/ClientEvents.java b/src/main/java/wayoftime/bloodmagic/client/ClientEvents.java index c3c9468c..73592d16 100644 --- a/src/main/java/wayoftime/bloodmagic/client/ClientEvents.java +++ b/src/main/java/wayoftime/bloodmagic/client/ClientEvents.java @@ -32,6 +32,7 @@ import wayoftime.bloodmagic.client.render.block.RenderAlchemyArray; import wayoftime.bloodmagic.client.render.block.RenderAltar; import wayoftime.bloodmagic.client.render.block.RenderDemonCrucible; import wayoftime.bloodmagic.client.render.entity.BloodLightRenderer; +import wayoftime.bloodmagic.client.render.entity.EntityShapedChargeRenderer; import wayoftime.bloodmagic.client.render.entity.SoulSnareRenderer; import wayoftime.bloodmagic.client.screens.ScreenAlchemicalReactionChamber; import wayoftime.bloodmagic.client.screens.ScreenAlchemyTable; @@ -68,7 +69,7 @@ public class ClientEvents public static void colorHandlerEvent(ColorHandlerEvent.Item event) { - event.getItemColors().register(new AnointmentColor(), BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get(), BloodMagicItems.SILK_TOUCH_ANOINTMENT.get(), BloodMagicItems.FORTUNE_ANOINTMENT.get(), BloodMagicItems.HOLY_WATER_ANOINTMENT.get(), BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get()); + event.getItemColors().register(new AnointmentColor(), BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get(), BloodMagicItems.SILK_TOUCH_ANOINTMENT.get(), BloodMagicItems.FORTUNE_ANOINTMENT.get(), BloodMagicItems.HOLY_WATER_ANOINTMENT.get(), BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get(), BloodMagicItems.QUICK_DRAW_ANOINTMENT.get(), BloodMagicItems.LOOTING_ANOINTMENT.get(), BloodMagicItems.BOW_POWER_ANOINTMENT.get(), BloodMagicItems.WILL_POWER_ANOINTMENT.get(), BloodMagicItems.SMELTING_ANOINTMENT.get()); } @SuppressWarnings("deprecation") @@ -76,6 +77,7 @@ public class ClientEvents { RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.SNARE.getEntityType(), SoulSnareRenderer::new); RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.BLOOD_LIGHT.getEntityType(), BloodLightRenderer::new); + RenderingRegistry.registerEntityRenderingHandler(BloodMagicEntityTypes.SHAPED_CHARGE.getEntityType(), EntityShapedChargeRenderer::new); DeferredWorkQueue.runLater(() -> { RenderType rendertype = RenderType.getCutoutMipped(); diff --git a/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityShapedChargeRenderer.java b/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityShapedChargeRenderer.java new file mode 100644 index 00000000..c27ad2ec --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/client/render/entity/EntityShapedChargeRenderer.java @@ -0,0 +1,68 @@ +package wayoftime.bloodmagic.client.render.entity; + +import java.util.Random; + +import com.mojang.blaze3d.matrix.MatrixStack; + +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderTypeLookup; +import net.minecraft.client.renderer.entity.EntityRenderer; +import net.minecraft.client.renderer.entity.EntityRendererManager; +import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import wayoftime.bloodmagic.entity.projectile.EntityShapedCharge; + +@OnlyIn(Dist.CLIENT) +public class EntityShapedChargeRenderer extends EntityRenderer +{ + public EntityShapedChargeRenderer(EntityRendererManager renderManagerIn) + { + super(renderManagerIn); + this.shadowSize = 0.5F; + } + + public void render(EntityShapedCharge entityIn, float entityYaw, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn) + { +// System.out.println("Testing~"); + BlockState blockstate = entityIn.getBlockState(); + if (blockstate.getRenderType() == BlockRenderType.MODEL) + { + World world = entityIn.getWorldObj(); + if (blockstate != world.getBlockState(entityIn.getPosition()) && blockstate.getRenderType() != BlockRenderType.INVISIBLE) + { + matrixStackIn.push(); + BlockPos blockpos = new BlockPos(entityIn.getPosX(), entityIn.getBoundingBox().maxY, entityIn.getPosZ()); + matrixStackIn.translate(-0.5D, 0.0D, -0.5D); + BlockRendererDispatcher blockrendererdispatcher = Minecraft.getInstance().getBlockRendererDispatcher(); + for (net.minecraft.client.renderer.RenderType type : net.minecraft.client.renderer.RenderType.getBlockRenderTypes()) + { + if (RenderTypeLookup.canRenderInLayer(blockstate, type)) + { + net.minecraftforge.client.ForgeHooksClient.setRenderLayer(type); + blockrendererdispatcher.getBlockModelRenderer().renderModel(world, blockrendererdispatcher.getModelForState(blockstate), blockstate, blockpos, matrixStackIn, bufferIn.getBuffer(type), false, new Random(), 0, OverlayTexture.NO_OVERLAY); + } + } + net.minecraftforge.client.ForgeHooksClient.setRenderLayer(null); + matrixStackIn.pop(); + super.render(entityIn, entityYaw, partialTicks, matrixStackIn, bufferIn, packedLightIn); + } + } + } + + /** + * Returns the location of an entity's texture. + */ + public ResourceLocation getEntityTexture(EntityShapedCharge entity) + { + return AtlasTexture.LOCATION_BLOCKS_TEXTURE; + } +} \ No newline at end of file diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java index 53be9f2e..f5ca132e 100644 --- a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorItemModels.java @@ -98,6 +98,12 @@ public class GeneratorItemModels extends ItemModelProvider registerMultiLayerItem(BloodMagicItems.FORTUNE_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); registerMultiLayerItem(BloodMagicItems.HOLY_WATER_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); registerMultiLayerItem(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.QUICK_DRAW_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.LOOTING_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.BOW_POWER_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + registerMultiLayerItem(BloodMagicItems.WILL_POWER_ANOINTMENT.get(), modLoc("item/alchemic_vial_will"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon_will")); + registerMultiLayerItem(BloodMagicItems.SMELTING_ANOINTMENT.get(), modLoc("item/alchemic_vial"), modLoc("item/alchemic_liquid"), modLoc("item/alchemic_ribbon")); + } private void registerCustomFullTexture(Block block, String texturePath) diff --git a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java index fc42a594..0e00cc53 100644 --- a/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java +++ b/src/main/java/wayoftime/bloodmagic/common/data/GeneratorLanguage.java @@ -352,6 +352,9 @@ public class GeneratorLanguage extends LanguageProvider add("anointment.bloodmagic.fortune", "Fortunate"); add("anointment.bloodmagic.holy_water", "Holy Light"); add("anointment.bloodmagic.hidden_knowledge", "Hidden Knowledge"); + add("anointment.bloodmagic.quick_draw", "Deft Hands"); + add("anointment.bloodmagic.bow_power", "Heavy Shot"); + add("anointment.bloodmagic.looting", "Plundering"); // Guide add("guide.bloodmagic.name", "Sanguine Scientiem"); @@ -538,6 +541,9 @@ public class GeneratorLanguage extends LanguageProvider addItem(BloodMagicItems.FORTUNE_ANOINTMENT, "Fortuna Extract"); addItem(BloodMagicItems.HOLY_WATER_ANOINTMENT, "Holy Water"); addItem(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT, "Liquid Knowledge"); + addItem(BloodMagicItems.QUICK_DRAW_ANOINTMENT, "Dexterity Alkahest"); + addItem(BloodMagicItems.BOW_POWER_ANOINTMENT, "Iron Tip"); + addItem(BloodMagicItems.LOOTING_ANOINTMENT, "Plunderer's Glint"); // Alchemy Items addItem(BloodMagicItems.PLANT_OIL, "Plant Oil"); diff --git a/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java b/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java index 8f01525d..c7a8333d 100644 --- a/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java +++ b/src/main/java/wayoftime/bloodmagic/common/item/BloodMagicItems.java @@ -13,6 +13,7 @@ import wayoftime.bloodmagic.common.block.BloodMagicBlocks; import wayoftime.bloodmagic.common.item.arc.ItemARCToolBase; import wayoftime.bloodmagic.common.item.block.ItemBlockAlchemyTable; import wayoftime.bloodmagic.common.item.block.ItemBlockMimic; +import wayoftime.bloodmagic.common.item.block.ItemBlockShapedCharge; import wayoftime.bloodmagic.common.item.sigil.ItemSigilAir; import wayoftime.bloodmagic.common.item.sigil.ItemSigilBloodLight; import wayoftime.bloodmagic.common.item.sigil.ItemSigilDivination; @@ -97,8 +98,8 @@ public class BloodMagicItems public static final RegistryObject NETHE_SOIL_ITEM = ITEMS.register("nether_soil", () -> new BlockItem(BloodMagicBlocks.NETHER_SOIL.get(), new Item.Properties().group(BloodMagic.TAB))); public static final RegistryObject GROWING_DOUBT_ITEM = ITEMS.register("growing_doubt", () -> new BlockItem(BloodMagicBlocks.GROWING_DOUBT.get(), new Item.Properties().group(BloodMagic.TAB))); - public static final RegistryObject SHAPED_CHARGE_ITEM = ITEMS.register("shaped_charge", () -> new BlockItem(BloodMagicBlocks.SHAPED_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); - public static final RegistryObject DEFORESTER_CHARGE_ITEM = ITEMS.register("deforester_charge", () -> new BlockItem(BloodMagicBlocks.DEFORESTER_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject SHAPED_CHARGE_ITEM = ITEMS.register("shaped_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.SHAPED_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); + public static final RegistryObject DEFORESTER_CHARGE_ITEM = ITEMS.register("deforester_charge", () -> new ItemBlockShapedCharge(BloodMagicBlocks.DEFORESTER_CHARGE.get(), new Item.Properties().group(BloodMagic.TAB))); // TODO: Need to rework the above instantiations for the ItemBlocks so that it's // done with the Blocks. @@ -224,6 +225,11 @@ public class BloodMagicItems public static final RegistryObject FORTUNE_ANOINTMENT = ITEMS.register("fortune_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("fortune"), 3381504, 1, 256)); public static final RegistryObject HOLY_WATER_ANOINTMENT = ITEMS.register("holy_water_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("holy_water"), 0xC6E6FB, 1, 256)); public static final RegistryObject HIDDEN_KNOWLEDGE_ANOINTMENT = ITEMS.register("hidden_knowledge_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("hidden_knowledge"), 0xC8F902, 1, 256)); + public static final RegistryObject QUICK_DRAW_ANOINTMENT = ITEMS.register("quick_draw_anointment", () -> new ItemBowAnointmentProvider(BloodMagic.rl("quick_draw"), 0xF0E130, 1, 256, true)); + public static final RegistryObject LOOTING_ANOINTMENT = ITEMS.register("looting_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("looting"), 0x6D2AFF, 1, 256)); + public static final RegistryObject BOW_POWER_ANOINTMENT = ITEMS.register("bow_power_anointment", () -> new ItemBowAnointmentProvider(BloodMagic.rl("bow_power"), 0xD8D8D8, 1, 256, true)); + public static final RegistryObject WILL_POWER_ANOINTMENT = ITEMS.register("will_power_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("will_power"), 0xD8D8D8, 1, 256)); + public static final RegistryObject SMELTING_ANOINTMENT = ITEMS.register("smelting_anointment", () -> new ItemAnointmentProvider(BloodMagic.rl("smelting"), 0xCE2029, 1, 256)); // Fragments public static final RegistryObject IRON_FRAGMENT = BASICITEMS.register("ironfragment", () -> new ItemBase()); diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemAnointmentProvider.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemAnointmentProvider.java index f45b7ca2..f9042b42 100644 --- a/src/main/java/wayoftime/bloodmagic/common/item/ItemAnointmentProvider.java +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemAnointmentProvider.java @@ -77,7 +77,7 @@ public class ItemAnointmentProvider extends Item } stack.shrink(1); holder.toItemStack(weaponStack); - return ActionResult.resultSuccess(stack); + return ActionResult.resultConsume(stack); } } } else @@ -100,6 +100,8 @@ public class ItemAnointmentProvider extends Item world.addParticle(flag1 ? ParticleTypes.AMBIENT_ENTITY_EFFECT : ParticleTypes.ENTITY_EFFECT, player.getPosXRandom(0.3D), player.getPosYRandom(), player.getPosZRandom(0.3D), d0, d1, d2); } + + return ActionResult.resultConsume(stack); } } } diff --git a/src/main/java/wayoftime/bloodmagic/common/item/ItemBowAnointmentProvider.java b/src/main/java/wayoftime/bloodmagic/common/item/ItemBowAnointmentProvider.java new file mode 100644 index 00000000..af9ab56f --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/ItemBowAnointmentProvider.java @@ -0,0 +1,32 @@ +package wayoftime.bloodmagic.common.item; + +import net.minecraft.item.BowItem; +import net.minecraft.item.CrossbowItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +public class ItemBowAnointmentProvider extends ItemAnointmentProvider +{ + boolean crossbowsValid; + + public ItemBowAnointmentProvider(ResourceLocation anointRL, int colour, int level, int maxDamage, boolean crossbowsValid) + { + super(anointRL, colour, level, maxDamage); + this.crossbowsValid = crossbowsValid; + } + + public boolean isItemValidForApplication(ItemStack stack) + { + return isItemBow(stack) || (crossbowsValid && isItemCrossbow(stack)); + } + + public static boolean isItemBow(ItemStack stack) + { + return (stack.getItem() instanceof BowItem); + } + + public static boolean isItemCrossbow(ItemStack stack) + { + return (stack.getItem() instanceof CrossbowItem); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockShapedCharge.java b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockShapedCharge.java new file mode 100644 index 00000000..66c716cf --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/common/item/block/ItemBlockShapedCharge.java @@ -0,0 +1,49 @@ +package wayoftime.bloodmagic.common.item.block; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Hand; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.world.World; +import wayoftime.bloodmagic.entity.projectile.EntityShapedCharge; + +public class ItemBlockShapedCharge extends BlockItem +{ + public ItemBlockShapedCharge(Block blockIn, Properties builder) + { + super(blockIn, builder); + } + + @Override + public ActionResult onItemRightClick(World worldIn, PlayerEntity playerIn, Hand hand) + { + ItemStack stack = playerIn.getHeldItem(hand); + if (!playerIn.isCreative()) + { + stack.shrink(1); + } + + worldIn.playSound((PlayerEntity) null, playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F)); + + if (!worldIn.isRemote) + { + System.out.println("Attempting to spawn"); +// EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn); + EntityShapedCharge charge = new EntityShapedCharge(worldIn, this.getBlock(), playerIn); + charge.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); + worldIn.addEntity(charge); +// +// SnowballEntity snowballentity = new SnowballEntity(worldIn, playerIn); +// snowballentity.setItem(itemstack); +// snowballentity.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); +// worldIn.addEntity(snowballentity); + } + + return new ActionResult<>(ActionResultType.SUCCESS, stack); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulSnare.java b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulSnare.java index c69305d5..c2cf5273 100644 --- a/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulSnare.java +++ b/src/main/java/wayoftime/bloodmagic/common/item/soul/ItemSoulSnare.java @@ -6,7 +6,6 @@ import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.item.SnowballItem; import net.minecraft.util.ActionResult; import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; @@ -22,8 +21,7 @@ import wayoftime.bloodmagic.entity.projectile.EntitySoulSnare; public class ItemSoulSnare extends Item { - public static String[] names = - { "base" }; + public static String[] names = { "base" }; public ItemSoulSnare() { @@ -44,14 +42,11 @@ public class ItemSoulSnare extends Item stack.shrink(1); } - SnowballItem d; - - worldIn.playSound((PlayerEntity) null, playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F - / (random.nextFloat() * 0.4F + 0.8F)); + worldIn.playSound((PlayerEntity) null, playerIn.getPosX(), playerIn.getPosY(), playerIn.getPosZ(), SoundEvents.ENTITY_SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (random.nextFloat() * 0.4F + 0.8F)); if (!worldIn.isRemote) { - System.out.println("Attempting to spawn"); +// System.out.println("Attempting to spawn"); EntitySoulSnare snare = new EntitySoulSnare(worldIn, playerIn); snare.func_234612_a_(playerIn, playerIn.rotationPitch, playerIn.rotationYaw, 0.0F, 1.5F, 1.0F); worldIn.addEntity(snare); diff --git a/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyTableRecipeProvider.java b/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyTableRecipeProvider.java index ae1f0638..fe32787c 100644 --- a/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyTableRecipeProvider.java +++ b/src/main/java/wayoftime/bloodmagic/common/recipe/AlchemyTableRecipeProvider.java @@ -29,6 +29,7 @@ public class AlchemyTableRecipeProvider implements ISubRecipeProvider AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.CLAY_BALL, 2), 50, 100, 2).addIngredient(Ingredient.fromTag(Tags.Items.SAND)).addIngredient(Ingredient.fromTag(Tags.Items.SAND)).addIngredient(Ingredient.fromItems(Items.WATER_BUCKET)).build(consumer, BloodMagic.rl(basePath + "clay_from_sand")); AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.COBWEB), 50, 50, 1).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).build(consumer, BloodMagic.rl(basePath + "cobweb")); AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.NETHER_WART), 50, 40, 1).addIngredient(Ingredient.fromItems(Items.NETHER_WART_BLOCK)).build(consumer, BloodMagic.rl(basePath + "nether_wart_from_block")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.GOLD_NUGGET, 9), 200, 100, 2).addIngredient(Ingredient.fromItems(Items.GILDED_BLACKSTONE)).build(consumer, BloodMagic.rl(basePath + "gold_ore_from_gilded")); AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(Items.GUNPOWDER, 3), 0, 100, 0).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_SULFUR)).addIngredient(Ingredient.fromTag(BloodMagicTags.DUST_SALTPETER)).addIngredient(Ingredient.fromTag(ItemTags.COALS)).build(consumer, BloodMagic.rl(basePath + "gunpowder")); AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.PLANT_OIL.get()), 100, 100, 1).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_CARROT)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_CARROT)).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_CARROT)).addIngredient(Ingredient.fromItems(Items.BONE_MEAL)).build(consumer, BloodMagic.rl(basePath + "plantoil_from_carrots")); @@ -48,5 +49,6 @@ public class AlchemyTableRecipeProvider implements ISubRecipeProvider AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.MELEE_DAMAGE_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.BLAZE_POWDER)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_QUARTZ)).build(consumer, BloodMagic.rl(basePath + "melee_damage_anointment")); AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HOLY_WATER_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLISTERING_MELON_SLICE)).addIngredient(Ingredient.fromTag(Tags.Items.GEMS_QUARTZ)).build(consumer, BloodMagic.rl(basePath + "holy_water_anointment")); AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.HIDDEN_KNOWLEDGE_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromItems(Items.GLASS_BOTTLE)).addIngredient(Ingredient.fromItems(Items.ENCHANTED_BOOK)).build(consumer, BloodMagic.rl(basePath + "hidden_knowledge_anointment")); + AlchemyTableRecipeBuilder.alchemyTable(new ItemStack(BloodMagicItems.QUICK_DRAW_ANOINTMENT.get()), 500, 100, 1).addIngredient(Ingredient.fromItems(BloodMagicItems.SLATE_VIAL.get())).addIngredient(Ingredient.fromTag(Tags.Items.CROPS_NETHER_WART)).addIngredient(Ingredient.fromTag(Tags.Items.STRING)).addIngredient(Ingredient.fromItems(Items.SPECTRAL_ARROW)).build(consumer, BloodMagic.rl(basePath + "quick_draw_anointment")); } } diff --git a/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicEntityTypes.java b/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicEntityTypes.java index c5f775f0..3ad248c1 100644 --- a/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicEntityTypes.java +++ b/src/main/java/wayoftime/bloodmagic/common/registries/BloodMagicEntityTypes.java @@ -6,6 +6,7 @@ import wayoftime.bloodmagic.BloodMagic; import wayoftime.bloodmagic.common.registration.impl.EntityTypeDeferredRegister; import wayoftime.bloodmagic.common.registration.impl.EntityTypeRegistryObject; import wayoftime.bloodmagic.entity.projectile.EntityBloodLight; +import wayoftime.bloodmagic.entity.projectile.EntityShapedCharge; import wayoftime.bloodmagic.entity.projectile.EntitySoulSnare; public class BloodMagicEntityTypes @@ -19,4 +20,6 @@ public class BloodMagicEntityTypes public static final EntityTypeRegistryObject SNARE = ENTITY_TYPES.register("soulsnare", EntityType.Builder.create(EntitySoulSnare::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).size(0.25f, 0.25f)); public static final EntityTypeRegistryObject BLOOD_LIGHT = ENTITY_TYPES.register("bloodlight", EntityType.Builder.create(EntityBloodLight::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).size(0.25f, 0.25f)); + public static final EntityTypeRegistryObject SHAPED_CHARGE = ENTITY_TYPES.register("shapedcharge", EntityType.Builder.create(EntityShapedCharge::new, EntityClassification.MISC).setTrackingRange(64).setUpdateInterval(1).size(0.4f, 0.4f)); + } diff --git a/src/main/java/wayoftime/bloodmagic/core/AnointmentRegistrar.java b/src/main/java/wayoftime/bloodmagic/core/AnointmentRegistrar.java index 177095a0..4ae45c7f 100644 --- a/src/main/java/wayoftime/bloodmagic/core/AnointmentRegistrar.java +++ b/src/main/java/wayoftime/bloodmagic/core/AnointmentRegistrar.java @@ -26,6 +26,8 @@ public class AnointmentRegistrar def.put("melee_damage", BloodMagic.rl("melee_damage")); def.put("holy_water", BloodMagic.rl("holy_water")); def.put("hidden_knowledge", BloodMagic.rl("hidden_knowledge")); + def.put("quick_draw", BloodMagic.rl("quick_draw")); + def.put("bow_power", BloodMagic.rl("bow_power")); // def.put("arrow_shot", BloodMagic.rl("arrow_shot")); // def.put("critical_strike", BloodMagic.rl("critical_strike")); // def.put("digging", BloodMagic.rl("digging")); @@ -66,6 +68,16 @@ public class AnointmentRegistrar public static final AnointmentRegistryObject ANOINTMENT_HIDDEN_KNOWLEDGE = ANOINTMENTS.register("hidden_knowledge", () -> parseDefinition("hidden_knowledge").setConsumeOnHarvest()); + public static final AnointmentRegistryObject ANOINTMENT_QUICK_DRAW = ANOINTMENTS.register("quick_draw", () -> parseDefinition("quick_draw").setConsumeOnUseFinish()); + + public static final AnointmentRegistryObject ANOINTMENT_LOOTING = ANOINTMENTS.register("looting", () -> new Anointment(BloodMagic.rl("looting")).setConsumeOnAttack()); + + public static final AnointmentRegistryObject ANOINTMENT_BOW_POWER = ANOINTMENTS.register("bow_power", () -> parseDefinition("bow_power").setConsumeOnUseFinish()); + + public static final AnointmentRegistryObject ANOINTMENT_WILL_POWER = ANOINTMENTS.register("will_power", () -> new Anointment(BloodMagic.rl("will_power")).setConsumeOnAttack()); + + public static final AnointmentRegistryObject ANOINTMENT_SMELTING = ANOINTMENTS.register("smelting", () -> new Anointment(BloodMagic.rl("smelting")).setConsumeOnHarvest()); + public static void register() { registerAnointment(ANOINTMENT_MELEE_DAMAGE.get()); @@ -73,6 +85,12 @@ public class AnointmentRegistrar registerAnointment(ANOINTMENT_FORTUNE.get()); registerAnointment(ANOINTMENT_HOLY_WATER.get()); registerAnointment(ANOINTMENT_HIDDEN_KNOWLEDGE.get()); + registerAnointment(ANOINTMENT_QUICK_DRAW.get()); + registerAnointment(ANOINTMENT_LOOTING.get()); + registerAnointment(ANOINTMENT_BOW_POWER.get()); + registerAnointment(ANOINTMENT_WILL_POWER.get()); + registerAnointment(ANOINTMENT_SMELTING.get()); + // Registry.register(UPGRADES, UPGRADE_ARROW_PROTECT.getKey(), UPGRADE_ARROW_PROTECT); // Registry.register(UPGRADES, UPGRADE_ARROW_SHOT.getKey(), UPGRADE_ARROW_SHOT); // Registry.register(UPGRADES, UPGRADE_CRITICAL_STRIKE.getKey(), UPGRADE_CRITICAL_STRIKE); diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityBloodLight.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityBloodLight.java index f5ce9da8..2a82cb10 100644 --- a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityBloodLight.java +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityBloodLight.java @@ -1,6 +1,7 @@ package wayoftime.bloodmagic.entity.projectile; import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.projectile.ProjectileHelper; @@ -11,6 +12,7 @@ import net.minecraft.network.IPacket; import net.minecraft.particles.IParticleData; import net.minecraft.particles.ItemParticleData; import net.minecraft.particles.ParticleTypes; +import net.minecraft.tags.BlockTags; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; @@ -60,7 +62,8 @@ public class EntityBloodLight extends ProjectileItemEntity { BlockPos blockpos = ((BlockRayTraceResult) raytraceresult).getPos().offset(((BlockRayTraceResult) raytraceresult).getFace()); BlockState blockstate = this.world.getBlockState(blockpos); - if (blockstate.isAir()) + Material material = blockstate.getMaterial(); + if (blockstate.isAir() || blockstate.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable()) { this.getEntityWorld().setBlockState(blockpos, BloodMagicBlocks.BLOOD_LIGHT.get().getDefaultState()); this.setDead(); diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityShapedCharge.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityShapedCharge.java new file mode 100644 index 00000000..6c2e9c18 --- /dev/null +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntityShapedCharge.java @@ -0,0 +1,153 @@ +package wayoftime.bloodmagic.entity.projectile; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.material.Material; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.projectile.ProjectileHelper; +import net.minecraft.entity.projectile.ThrowableEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.NBTUtil; +import net.minecraft.network.IPacket; +import net.minecraft.tags.BlockTags; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.network.NetworkHooks; +import wayoftime.bloodmagic.common.block.BlockShapedExplosive; +import wayoftime.bloodmagic.common.block.BloodMagicBlocks; +import wayoftime.bloodmagic.common.registries.BloodMagicEntityTypes; + +public class EntityShapedCharge extends ThrowableEntity +{ +// private static final DataParameter> ITEMSTACK_DATA = EntityDataManager.createKey(ProjectileItemEntity.class, DataSerializers.OPTIONAL_BLOCK_STATE); + private BlockState fallTile = BloodMagicBlocks.SHAPED_CHARGE.get().getDefaultState(); + + public EntityShapedCharge(EntityType p_i50159_1_, World p_i50159_2_) + { + super(p_i50159_1_, p_i50159_2_); + } + + public EntityShapedCharge(World worldIn, Block block, LivingEntity throwerIn) + { + super(BloodMagicEntityTypes.SHAPED_CHARGE.getEntityType(), throwerIn, worldIn); + this.fallTile = block.getDefaultState(); + } + + public EntityShapedCharge(World worldIn, Block block, double x, double y, double z) + { + super(BloodMagicEntityTypes.SHAPED_CHARGE.getEntityType(), x, y, z, worldIn); + this.fallTile = block.getDefaultState(); + } + + @Override + public void tick() + { + super.tick(); + RayTraceResult raytraceresult = ProjectileHelper.func_234618_a_(this, this::func_230298_a_); +// boolean flag = false; + if (raytraceresult.getType() == RayTraceResult.Type.BLOCK) + { + Direction faceHit = ((BlockRayTraceResult) raytraceresult).getFace(); + BlockPos blockpos = ((BlockRayTraceResult) raytraceresult).getPos().offset(((BlockRayTraceResult) raytraceresult).getFace()); + BlockState blockstate = this.world.getBlockState(blockpos); + Material material = blockstate.getMaterial(); +// return state.isAir() || state.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable(); + if (blockstate.isAir() || blockstate.isIn(BlockTags.FIRE) || material.isLiquid() || material.isReplaceable()) + { + this.getEntityWorld().setBlockState(blockpos, fallTile.with(BlockShapedExplosive.ATTACHED, faceHit)); + this.setDead(); + } else + { +// BlockItem d; + this.entityDropItem(fallTile.getBlock()); + this.setDead(); +// blockstate.isReplaceable(BlockItemUseContext) + } + } + } + + @Override + protected void writeAdditional(CompoundNBT compound) + { + compound.put("BlockState", NBTUtil.writeBlockState(this.fallTile)); +// compound.putInt("Time", this.fallTime); +// compound.putBoolean("DropItem", this.shouldDropItem); +// compound.putBoolean("HurtEntities", this.hurtEntities); +// compound.putFloat("FallHurtAmount", this.fallHurtAmount); +// compound.putInt("FallHurtMax", this.fallHurtMax); +// if (this.tileEntityData != null) { +// compound.put("TileEntityData", this.tileEntityData); +// } + + } + + /** + * (abstract) Protected helper method to read subclass entity data from NBT. + */ + @Override + protected void readAdditional(CompoundNBT compound) + { + this.fallTile = NBTUtil.readBlockState(compound.getCompound("BlockState")); +// this.fallTime = compound.getInt("Time"); +// if (compound.contains("HurtEntities", 99)) { +// this.hurtEntities = compound.getBoolean("HurtEntities"); +// this.fallHurtAmount = compound.getFloat("FallHurtAmount"); +// this.fallHurtMax = compound.getInt("FallHurtMax"); +// } else if (this.fallTile.isIn(BlockTags.ANVIL)) { +// this.hurtEntities = true; +// } +// +// if (compound.contains("DropItem", 99)) { +// this.shouldDropItem = compound.getBoolean("DropItem"); +// } +// +// if (compound.contains("TileEntityData", 10)) { +// this.tileEntityData = compound.getCompound("TileEntityData"); +// } + + System.out.println("Reading additional data"); + + if (this.fallTile.isAir()) + { + this.fallTile = BloodMagicBlocks.SHAPED_CHARGE.get().getDefaultState(); + } + + } + + @Override + protected void registerData() + { + // TODO Auto-generated method stub + + } + + public BlockState getBlockState() + { + // TODO Auto-generated method stub + return fallTile; + } + + @OnlyIn(Dist.CLIENT) + public World getWorldObj() + { + return this.world; + } + +// @Override +// public IPacket createSpawnPacket() +// { +// return new SSpawnObjectPacket(this, Block.getStateId(this.getBlockState())); +// } + + @Override + public IPacket createSpawnPacket() + { + return NetworkHooks.getEntitySpawningPacket(this); + } +} diff --git a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntitySoulSnare.java b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntitySoulSnare.java index b19b87d7..7599d278 100644 --- a/src/main/java/wayoftime/bloodmagic/entity/projectile/EntitySoulSnare.java +++ b/src/main/java/wayoftime/bloodmagic/entity/projectile/EntitySoulSnare.java @@ -89,6 +89,5 @@ public class EntitySoulSnare extends ProjectileItemEntity this.world.addParticle(iparticledata, this.getPosX(), this.getPosY(), this.getPosZ(), 0.0D, 0.0D, 0.0D); } } - } } diff --git a/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java b/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java index 35f68889..ebf9c193 100644 --- a/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java +++ b/src/main/java/wayoftime/bloodmagic/loot/GlobalLootModifier.java @@ -1,5 +1,6 @@ package wayoftime.bloodmagic.loot; +import java.util.ArrayList; import java.util.List; import javax.annotation.Nonnull; @@ -8,7 +9,10 @@ import com.google.gson.JsonObject; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.enchantment.Enchantments; +import net.minecraft.inventory.Inventory; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.FurnaceRecipe; +import net.minecraft.item.crafting.IRecipeType; import net.minecraft.loot.LootContext; import net.minecraft.loot.LootParameterSets; import net.minecraft.loot.LootParameters; @@ -18,6 +22,7 @@ import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.loot.GlobalLootModifierSerializer; import net.minecraftforge.common.loot.LootModifier; import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.items.ItemHandlerHelper; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import wayoftime.bloodmagic.BloodMagic; @@ -29,6 +34,8 @@ public class GlobalLootModifier public static final DeferredRegister> GLM = DeferredRegister.create(ForgeRegistries.LOOT_MODIFIER_SERIALIZERS, BloodMagic.MODID); public static final RegistryObject SILKTOUCH = GLM.register("silk_touch_bamboo", SilkTouchTestModifier.Serializer::new); public static final RegistryObject FORTUNE = GLM.register("fortune", FortuneModifier.Serializer::new); + public static final RegistryObject LOOTING = GLM.register("looting", LootingModifier.Serializer::new); + public static final RegistryObject SMELT = GLM.register("smelt", SmeltingModifier.Serializer::new); private static class SilkTouchTestModifier extends LootModifier { @@ -114,10 +121,10 @@ public class GlobalLootModifier return generatedLoot; } - if (holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get()) > 0) - { - return generatedLoot; - } +// if (holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get()) > 0) +// { +// return generatedLoot; +// } ItemStack fakeTool = ctxTool.copy(); fakeTool.getOrCreateTag().putBoolean("bloodmagic:checked_fortune", true); @@ -146,4 +153,128 @@ public class GlobalLootModifier } } } + + private static class LootingModifier extends LootModifier + { + public LootingModifier(ILootCondition[] conditionsIn) + { + super(conditionsIn); + } + + @Nonnull + @Override + public List doApply(List generatedLoot, LootContext context) + { +// System.out.println("Checking for looting"); + ItemStack ctxTool = context.get(LootParameters.TOOL); + // return early if silk-touch is already applied (otherwise we'll get stuck in + // an infinite loop). + if (ctxTool.getTag() != null && ctxTool.getTag().getBoolean("bloodmagic:checked_looting")) + { + return generatedLoot; + } + + if (EnchantmentHelper.getEnchantments(ctxTool).containsKey(Enchantments.SILK_TOUCH)) + return generatedLoot; + AnointmentHolder holder = AnointmentHolder.fromItemStack(ctxTool); + if (holder == null) + { + return generatedLoot; + } + + int additionalLooting = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_LOOTING.get()); + if (additionalLooting <= 0) + { + return generatedLoot; + } + +// if (holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SILK_TOUCH.get()) > 0) +// { +// return generatedLoot; +// } + + ItemStack fakeTool = ctxTool.copy(); + fakeTool.getOrCreateTag().putBoolean("bloodmagic:checked_looting", true); + int baseLootingLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, ctxTool); + + fakeTool.addEnchantment(Enchantments.LOOTING, baseLootingLevel + additionalLooting); + LootContext.Builder builder = new LootContext.Builder(context); + builder.withParameter(LootParameters.TOOL, fakeTool); + LootContext ctx = builder.build(LootParameterSets.BLOCK); + LootTable loottable = context.getWorld().getServer().getLootTableManager().getLootTableFromLocation(context.get(LootParameters.BLOCK_STATE).getBlock().getLootTable()); + return loottable.generate(ctx); + } + + private static class Serializer extends GlobalLootModifierSerializer + { + @Override + public LootingModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) + { + return new LootingModifier(conditionsIn); + } + + @Override + public JsonObject write(LootingModifier instance) + { + return makeConditions(instance.conditions); + } + } + } + + private static class SmeltingModifier extends LootModifier + { + public SmeltingModifier(ILootCondition[] conditionsIn) + { + super(conditionsIn); + } + + @Nonnull + @Override + public List doApply(List generatedLoot, LootContext context) + { + ItemStack ctxTool = context.get(LootParameters.TOOL); + // return early if silk-touch is already applied (otherwise we'll get stuck in + // an infinite loop). + if (ctxTool.getTag() != null) + { + return generatedLoot; + } + + AnointmentHolder holder = AnointmentHolder.fromItemStack(ctxTool); + if (holder == null) + { + return generatedLoot; + } + + int smeltingLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_SMELTING.get()); + if (smeltingLevel <= 0) + { + return generatedLoot; + } + + ArrayList ret = new ArrayList(); + generatedLoot.forEach((stack) -> ret.add(smelt(stack, context))); + return ret; + } + + private static ItemStack smelt(ItemStack stack, LootContext context) + { + return context.getWorld().getRecipeManager().getRecipe(IRecipeType.SMELTING, new Inventory(stack), context.getWorld()).map(FurnaceRecipe::getRecipeOutput).filter(itemStack -> !itemStack.isEmpty()).map(itemStack -> ItemHandlerHelper.copyStackWithSize(itemStack, stack.getCount() * itemStack.getCount())).orElse(stack); + } + + private static class Serializer extends GlobalLootModifierSerializer + { + @Override + public SmeltingModifier read(ResourceLocation name, JsonObject json, ILootCondition[] conditionsIn) + { + return new SmeltingModifier(conditionsIn); + } + + @Override + public JsonObject write(SmeltingModifier instance) + { + return makeConditions(instance.conditions); + } + } + } } diff --git a/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java b/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java index a38439af..ae945cc7 100644 --- a/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java +++ b/src/main/java/wayoftime/bloodmagic/util/handler/event/GenericHandler.java @@ -11,16 +11,22 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.entity.projectile.ArrowEntity; import net.minecraft.inventory.EquipmentSlotType; +import net.minecraft.item.BowItem; +import net.minecraft.item.CrossbowItem; import net.minecraft.item.ItemStack; import net.minecraft.potion.EffectInstance; import net.minecraft.potion.Effects; import net.minecraft.util.DamageSource; +import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.Tags; import net.minecraftforge.common.ToolType; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.event.entity.living.LivingDamageEvent; +import net.minecraftforge.event.entity.living.LivingEntityUseItemEvent; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent; import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; @@ -552,4 +558,108 @@ public class GenericHandler AnointmentHolder holder = AnointmentHolder.fromItemStack(stack); AnointmentHolder.appendAnointmentTooltip(holder, event.getToolTip()); } + + private static final Map rollMap = new HashMap(); + + @SubscribeEvent + public void onEntityUseTick(LivingEntityUseItemEvent.Tick event) + { + ItemStack stack = event.getItem(); + if (stack.getItem() instanceof BowItem || stack.getItem() instanceof CrossbowItem) + { + AnointmentHolder holder = AnointmentHolder.fromItemStack(stack); + int quickDrawLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_QUICK_DRAW.get()); + if (quickDrawLevel > 0) + { + double amount = rollMap.getOrDefault(stack, 0D) + AnointmentRegistrar.ANOINTMENT_QUICK_DRAW.get().getBonusValue("speed", quickDrawLevel).doubleValue(); + if (amount >= 1) + { + int drawReduction = (int) amount; + event.setDuration(event.getDuration() - drawReduction); + } else + { + rollMap.put(stack, amount); + } + } + } + } + + @SubscribeEvent + public void onEntityFinishUse(LivingEntityUseItemEvent.Stop event) + { + ItemStack stack = event.getItem(); + if (stack.getItem() instanceof CrossbowItem) + { + int i = stack.getUseDuration() - event.getDuration(); + float f = getCharge(i, stack); + if (f < 0) + { + return; + } + } + AnointmentHolder holder = AnointmentHolder.fromItemStack(stack); + if (holder != null) + { + if (holder.consumeAnointmentDurabilityOnUseFinish(stack, EquipmentSlotType.MAINHAND)) + { + + holder.toItemStack(stack); + } + } + } + + @SubscribeEvent + public void onEntityJoinEvent(EntityJoinWorldEvent event) + { + Entity entity = event.getEntity(); + if (entity instanceof ArrowEntity) + { + if (entity.ticksExisted <= 0) + { +// System.out.println("An arrow joined the world! Looking for the shooter..."); + ArrowEntity arrowEntity = (ArrowEntity) entity; + Entity shooter = arrowEntity.func_234616_v_(); + if (shooter instanceof PlayerEntity) + { + PlayerEntity playerShooter = (PlayerEntity) shooter; + for (Hand hand : Hand.values()) + { + ItemStack heldStack = playerShooter.getHeldItem(hand); + AnointmentHolder holder = AnointmentHolder.fromItemStack(heldStack); + if (holder == null) + { + continue; + } + + int powerLevel = holder.getAnointmentLevel(AnointmentRegistrar.ANOINTMENT_BOW_POWER.get()); + if (powerLevel > 0) + { + arrowEntity.setDamage(arrowEntity.getDamage() * AnointmentRegistrar.ANOINTMENT_BOW_POWER.get().getBonusValue("damage", powerLevel).doubleValue()); + +// System.out.println("Arrow damage is now: " + arrowEntity.getDamage()); + } + + break; + } + } + } + } + } + + private static float getCharge(int useTime, ItemStack stack) + { + float f = (float) useTime / (float) getChargeTime(stack); + if (f > 1.0F) + { + f = 1.0F; + } + + return f; + } + + public static int getChargeTime(ItemStack stack) + { + int i = EnchantmentHelper.getEnchantmentLevel(Enchantments.QUICK_CHARGE, stack); + return i == 0 ? 25 : 25 - 5 * i; + } } diff --git a/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon_will.png b/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon_will.png new file mode 100644 index 00000000..d6fbc202 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/alchemic_ribbon_will.png differ diff --git a/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial_will.png b/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial_will.png new file mode 100644 index 00000000..d087b452 Binary files /dev/null and b/src/main/resources/assets/bloodmagic/textures/item/alchemic_vial_will.png differ diff --git a/src/main/resources/data/bloodmagic/anointment/bow_power.json b/src/main/resources/data/bloodmagic/anointment/bow_power.json new file mode 100644 index 00000000..602a88c4 --- /dev/null +++ b/src/main/resources/data/bloodmagic/anointment/bow_power.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:bow_power", + "bonuses": { + "damage": [ + 1.25, + 1.5, + 1.75 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/anointment/quick_draw.json b/src/main/resources/data/bloodmagic/anointment/quick_draw.json new file mode 100644 index 00000000..6f9f3685 --- /dev/null +++ b/src/main/resources/data/bloodmagic/anointment/quick_draw.json @@ -0,0 +1,10 @@ +{ + "id": "bloodmagic:quick_draw", + "bonuses": { + "speed": [ + 0.5, + 1, + 1.5 + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/loot_modifiers/looting.json b/src/main/resources/data/bloodmagic/loot_modifiers/looting.json new file mode 100644 index 00000000..f98ee249 --- /dev/null +++ b/src/main/resources/data/bloodmagic/loot_modifiers/looting.json @@ -0,0 +1,11 @@ +{ + "type": "bloodmagic:looting", + "conditions": [ + { + "condition": "minecraft:entity", + "predicate": { + + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/bloodmagic/loot_modifiers/smelt.json b/src/main/resources/data/bloodmagic/loot_modifiers/smelt.json new file mode 100644 index 00000000..4e9bf5a5 --- /dev/null +++ b/src/main/resources/data/bloodmagic/loot_modifiers/smelt.json @@ -0,0 +1,11 @@ +{ + "type": "bloodmagic:smelt", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json b/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json index f9b58116..af646989 100644 --- a/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json +++ b/src/main/resources/data/forge/loot_modifiers/global_loot_modifiers.json @@ -2,6 +2,8 @@ "replace": false, "entries": [ "bloodmagic:silk_touch_bamboo", - "bloodmagic:fortune" + "bloodmagic:fortune", + "bloodmagic:looting", + "bloodmagic:smelt" ] } \ No newline at end of file