From 4ace6fb55f8919fbf20a921c29a8791c92921b04 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:59:22 -0500 Subject: [PATCH 01/16] 3.2.2 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index ddf2e9080..0a8685f24 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,7 +23,7 @@ mapping_version=2022.11.27-1.19.2 # Irons Mod mod_id=irons_spellbooks -mod_version=1.19.2-3.2.1 +mod_version=1.19.2-3.2.2 mod_group_id=io.redspace.ironsspellbooks # Irons mods.toml From ee388297466ee1ceb8c27a989f90c6d2881986de Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 9 Jul 2024 18:25:55 -0500 Subject: [PATCH 02/16] fix jei arcane anvil recipe scroll merging going one past limit --- .../io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipeMaker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipeMaker.java b/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipeMaker.java index 66f367825..b4f981074 100644 --- a/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipeMaker.java +++ b/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipeMaker.java @@ -45,7 +45,7 @@ public static List getRecipes(IVanillaRecipeFactory vanillaRe private static Stream getScrollRecipes(IVanillaRecipeFactory vanillaRecipeFactory, IIngredientManager ingredientManager) { return SpellRegistry.getEnabledSpells().stream() .sorted(Comparator.comparing(AbstractSpell::getSpellId)) - .flatMap(spell -> IntStream.rangeClosed(spell.getMinLevel(), spell.getMaxLevel()).mapToObj(i -> new ArcaneAnvilRecipe(spell, i))); + .flatMap(spell -> IntStream.rangeClosed(spell.getMinLevel(), spell.getMaxLevel() - 1).mapToObj(i -> new ArcaneAnvilRecipe(spell, i))); /*.filter(ArcaneAnvilRecipe::isValid)*///Filter out any blank recipes created where min and max spell level are equal } From 10702d3b80c2f917e796d9e6d34164e9584e96e2 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Sun, 14 Jul 2024 15:45:35 -0500 Subject: [PATCH 03/16] adjust alchemist cauldron texture --- .../textures/block/alchemist_cauldron.png | Bin 4036 -> 1072 bytes .../textures/block/alchemist_cauldron.psd | Bin 45974 -> 34702 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/assets/irons_spellbooks/textures/block/alchemist_cauldron.png b/src/main/resources/assets/irons_spellbooks/textures/block/alchemist_cauldron.png index 5e09a4dbdc7f8a6cc480306e83ab27227361cee6..84b4f3045876c7dbb0abe6aeedf37738071b4af6 100644 GIT binary patch delta 1042 zcmX>izky?dq$o231H;_yjcX~$<;~12EG?~cb#!d3?bOuN)YaAJ*Vu+Q=z5x~nQO~xDTozE8t$Cn_Wh#D zXP~v_B|(0{|Iq;hx&T&we~jiN1_q{wo-U3d6?5K()ko&vauAqj_~sYK6lGQ0OExaH zA}ebQy zCe}MD{G2w&STm*+&I{<9+;&^sNq#lk$JuSG4)Zom5>I&3o*K>e)ALF!(;M^Ch4-2- z@LXj+y1P021G8(r*+*voMAw8B9y`CSPf8RoJ-n1P z(|TqhPZsy3cWm4n_P=tn3tFw`^7*b_#a=Z%2@AGlQC4k3kLbk@#2njRi+#{Mp(zzA z_qg$WSKe3%GiyqXhxE1BXqm-(oofa4C-3FlTR*vba`z&i^aIE3E30*0mE?8syGURDDY8N3;n7yp zBfO8jO;o2Yeda4`IPanUj#sy;KD`j?yAfjEv%bE^<^|6TT{-8A&FXy;znM=hJ~FG= zAUlbtZ$|TvzmX3+MJycR=YMLDJ{G)Ih;tdsRqpkc7I_l8H$OHy*s@K6H_5%n{p0HT zp402!>TKD^;@-2I>;C=@e#tt^*~*dyM^-%C(QB+P=OB3Ti8TL?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 z=ck_@>hOku+^T1K%?fkr*w5B2Uc9)u_n$WQ(if2BkR5fA;`n9GGv?di;c*iyGX-_c24v8D9#U;Zd_Jnqma&jd$h-Ii zddY`s>3Sq|O<1Yx=EODs%%KnX+xpM9z2l!hbNQYi$0+?nNtUH9K3+}iEbo>(6SO#= zmHJ+7>a+n5U)CELe!+JiwtahlE;pv}@uj1HRgF z!M~-V=0N;XVRw&>i|$v{)b&}nH|N_gu$=cQs!J##Pi@wwxdPw6XEnn9B1_ zH}zG5q^q@7o0kik50|alKDTCVWK`7o2h%Rke#c*nm*2V5bmnmJT=VMh8UusTyvj?L zHkWljHEPADbwQ7w4m#Vk>Z0B1y3lg##~)Ai8_^i<$_^b?JiV~T9H3kyya9tFic zM>m9Y)s!qQ*tGet_xt~$N59USLc4YgNI3e{{2il9mkTMbIEl~riOWt@EUnOz3k{87 z7yGZ(N3V0~(}wO_cw$&gUItv}H*=&PsvnUba1_y=U3B0=%WoPxpPzU!`O&tbmH}Z` ze*N)`!cpJ+@pw(mte>yo(kW6`7&5%M{*xYa zuiDllx2YX!$@hB|(vx)X&bwtdf|iZnF+ft7aZGcV%qS{PD4f^tcbEP$(Y55-+Lbe= z20p6({np;Dx)6LpR8{=nFI%?cPHB!?a?Z(io-)L=9tm0{?X>cWRvj-Q-J0(bm pNIpgqT|=V#pxu^q+zpyjl=we8F>Y+^wwNh1{|!Xgqp1J@ diff --git a/src/main/resources/assets/irons_spellbooks/textures/block/alchemist_cauldron.psd b/src/main/resources/assets/irons_spellbooks/textures/block/alchemist_cauldron.psd index f757074cb801a77e1702c52a9be08cd6c27f2209..e4ab403c380b6315a464247a7d75784be9e4eea2 100644 GIT binary patch literal 34702 zcmeHw4RjmFb?z({07d;-lw_HLLW%)1-D1 zg%SxY-gjpgAV7iyDBFqc!-aNt?#!J#Gk4~GcV>3Es`fXZVgi#7HEy;1+`vRRYU@kY z{y>xXQ%-GT4Y&(TmAvz`pYybhj3xNN7?1r0k1ga^o{7g^<8%YFo;w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7}4KE5iY#d$`@@ySm6!L8zUKH|gA6^vL z2I6@^+(0}ph#LrY#RlSeWD7VK`h|LKUY_XJ)8jhPbK=Ap-}5>~zeA-(zn;wKcc@_W zqoQJ9=qVcgTzRA4iFEYq$s7HUFGW9^zdic(q@&-7ywNYEU!%{~pN@V#MWbI&I{IZd zGCTV9Xb+{M-7QDIL$4+J?ahgPJ!knIaw3@?IeCL$SM`ak;8&DZOY-U9*JSM0Hf;sJ zf}~o?ecgheF+2DbA=AOn*s0UgXrR}18uj|(luDFD@asX`>T2uiLh$QB@GF&+_t4;H z)T1m4)8MB^@GC;sWaVcBzpl*Sw*!IT$8r$-jH%#fq`|KQN@0a0f}b%R{ERgCl|s_s z2VolgnzY?Uy^)R%7W@j4doqO){Pbe*GfKg)G*S$HdOd<4IyDviSaWZUc3O?bt>9-g zT5py9T?M~_x1kXH^52L;@Y{YX3c)YW%_s!Fytkte{OAoS1V45|3PF$EkYZQdkV5do z4XIlUet5^H%xdSYq!*7A4$!S%R`Bb_D*;nmKfL6y8ylMeF0K=_Nu8P-IHT3-bV-ia zVS8}KnZ&vw*+881wVJvE2NHEv2kPn$)amRlttKP*>0E|}0|&&N#(@R{eb=b&K-~cz zyOKnmT4(RkWo-WrageUt+WxTuGOLcSlhxKGv6WFD5KFK)sOvE_NV`C)SkVi`H)|{E z4(P0BIcXorWk*7VRaXZYp-!c21#sGN{)&- zA@q$5lJ>2z=sa?y6beDo$%3R^+#xz?+(VEofmEGg!l@w1We3TfNHIuCxl)kioV-!V zb)(CYG)NXF)l66nk{pVOhZrPpiKao4!=Th^@4Z(CqiB%4C0fbpIGq+dL@lmdQ9{YY zaK?PVu23srcGIJ98V~js{Q3hyGXEDK2$I{s0zr_>^Cbv^WZthq5G3grAqbM}ix31y p_C*N0;)@UjNqiA Date: Tue, 16 Jul 2024 17:10:59 -0500 Subject: [PATCH 04/16] fix cancel on screen causing cooldown for long casts --- .../io/redspace/ironsspellbooks/player/ClientPlayerEvents.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/player/ClientPlayerEvents.java b/src/main/java/io/redspace/ironsspellbooks/player/ClientPlayerEvents.java index e639c3d56..c9fefca23 100644 --- a/src/main/java/io/redspace/ironsspellbooks/player/ClientPlayerEvents.java +++ b/src/main/java/io/redspace/ironsspellbooks/player/ClientPlayerEvents.java @@ -5,6 +5,7 @@ import io.redspace.ironsspellbooks.api.entity.IMagicEntity; import io.redspace.ironsspellbooks.api.registry.SpellRegistry; import io.redspace.ironsspellbooks.api.spells.CastSource; +import io.redspace.ironsspellbooks.api.spells.CastType; import io.redspace.ironsspellbooks.api.spells.ISpellContainer; import io.redspace.ironsspellbooks.api.spells.SpellData; import io.redspace.ironsspellbooks.api.util.Utils; @@ -76,7 +77,7 @@ public static void onPlayerLogOut(ClientPlayerNetworkEvent.LoggingOut event) { @SubscribeEvent public static void onPlayerOpenScreen(ScreenEvent.Opening event) { if (ClientMagicData.isCasting()) { - Messages.sendToServer(new ServerboundCancelCast(true)); + Messages.sendToServer(new ServerboundCancelCast(SpellRegistry.getSpell(ClientMagicData.getCastingSpellId()).getCastType() == CastType.CONTINUOUS)); } } From 688a865081c93fe662408302a0d9a3e3d2be7386 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:12:09 -0500 Subject: [PATCH 05/16] buff school armor and upgrades. no changes to mana regen --- .../capabilities/magic/MagicManager.java | 3 +- .../item/armor/ExtendedArmorMaterials.java | 45 +++++++++++-------- .../item/armor/UpgradeTypes.java | 24 +++++----- 3 files changed, 41 insertions(+), 31 deletions(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/capabilities/magic/MagicManager.java b/src/main/java/io/redspace/ironsspellbooks/capabilities/magic/MagicManager.java index 4ae88eb03..a18572d3d 100644 --- a/src/main/java/io/redspace/ironsspellbooks/capabilities/magic/MagicManager.java +++ b/src/main/java/io/redspace/ironsspellbooks/capabilities/magic/MagicManager.java @@ -31,7 +31,8 @@ public boolean regenPlayerMana(ServerPlayer serverPlayer, MagicData playerMagicD var mana = playerMagicData.getMana(); if (mana != playerMaxMana) { float playerManaRegenMultiplier = (float) serverPlayer.getAttributeValue(MANA_REGEN.get()); - var increment = playerMaxMana * playerManaRegenMultiplier * .01f; +// var increment = (1 + (playerMaxMana - 100) * 0.005f) * playerManaRegenMultiplier; + var increment = playerMaxMana * 0.01f * playerManaRegenMultiplier; playerMagicData.setMana(Mth.clamp(playerMagicData.getMana() + increment, 0, playerMaxMana)); return true; } else { diff --git a/src/main/java/io/redspace/ironsspellbooks/item/armor/ExtendedArmorMaterials.java b/src/main/java/io/redspace/ironsspellbooks/item/armor/ExtendedArmorMaterials.java index 902b2816d..61fcb9c74 100644 --- a/src/main/java/io/redspace/ironsspellbooks/item/armor/ExtendedArmorMaterials.java +++ b/src/main/java/io/redspace/ironsspellbooks/item/armor/ExtendedArmorMaterials.java @@ -38,42 +38,51 @@ Attributes.ATTACK_DAMAGE, new AttributeModifier("minus damage", -.15, AttributeM AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 25, AttributeModifier.Operation.ADDITION) )), PUMPKIN("pumpkin", 33, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_TURTLE, 0.0F, 0.0F, () -> Ingredient.of(Items.HAY_BLOCK), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 50, AttributeModifier.Operation.ADDITION) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 75, AttributeModifier.Operation.ADDITION) )), PYROMANCER("pyromancer", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.FIRE_SPELL_POWER.get(), new AttributeModifier("Fire Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.FIRE_SPELL_POWER.get(), new AttributeModifier("Fire Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), ARCHEVOKER("archevoker", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.EVOCATION_SPELL_POWER.get(), new AttributeModifier("Evocation Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.EVOCATION_SPELL_POWER.get(), new AttributeModifier("Evocation Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), CULTIST("cultist", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.BLOOD_SPELL_POWER.get(), new AttributeModifier("Blood Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.BLOOD_SPELL_POWER.get(), new AttributeModifier("Blood Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), PRIEST("priest", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.HOLY_SPELL_POWER.get(), new AttributeModifier("Holy Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.HOLY_SPELL_POWER.get(), new AttributeModifier("Holy Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), CRYOMANCER("cryomancer", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.ICE_SPELL_POWER.get(), new AttributeModifier("Ice Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.ICE_SPELL_POWER.get(), new AttributeModifier("Ice Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), SHADOWWALKER("shadowwalker", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.ENDER_SPELL_POWER.get(), new AttributeModifier("Ender Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.ENDER_SPELL_POWER.get(), new AttributeModifier("Ender Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), PLAGUED("plagued", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.NATURE_SPELL_POWER.get(), new AttributeModifier("Nature Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.NATURE_SPELL_POWER.get(), new AttributeModifier("Nature Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), ELECTROMANCER("electromancer", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_LEATHER, 0.0F, 0.0F, () -> Ingredient.of(ItemRegistry.MAGIC_CLOTH.get()), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION), - AttributeRegistry.LIGHTNING_SPELL_POWER.get(), new AttributeModifier("Lightning Power", .08, AttributeModifier.Operation.MULTIPLY_BASE) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.LIGHTNING_SPELL_POWER.get(), new AttributeModifier("Lightning Power", .10, AttributeModifier.Operation.MULTIPLY_BASE), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )), NETHERITE_BATTLEMAGE("netherite", 38, new int[]{3, 6, 8, 3}, 15, SoundEvents.ARMOR_EQUIP_NETHERITE, 3.0F, 0.0F, () -> Ingredient.of(Tags.Items.INGOTS_NETHERITE), Map.of( - AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 100, AttributeModifier.Operation.ADDITION) + AttributeRegistry.MAX_MANA.get(), new AttributeModifier("Max Mana", 125, AttributeModifier.Operation.ADDITION), + AttributeRegistry.SPELL_POWER.get(), new AttributeModifier("Base Power", .05, AttributeModifier.Operation.MULTIPLY_BASE) )); private static final int[] HEALTH_PER_SLOT = new int[]{13, 15, 16, 11}; diff --git a/src/main/java/io/redspace/ironsspellbooks/item/armor/UpgradeTypes.java b/src/main/java/io/redspace/ironsspellbooks/item/armor/UpgradeTypes.java index 934c7dd02..c23acce3f 100644 --- a/src/main/java/io/redspace/ironsspellbooks/item/armor/UpgradeTypes.java +++ b/src/main/java/io/redspace/ironsspellbooks/item/armor/UpgradeTypes.java @@ -8,19 +8,19 @@ import net.minecraft.world.entity.ai.attributes.Attributes; public enum UpgradeTypes implements UpgradeType { - FIRE_SPELL_POWER("fire_power", AttributeRegistry.FIRE_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - ICE_SPELL_POWER("ice_power", AttributeRegistry.ICE_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - LIGHTNING_SPELL_POWER("lightning_power", AttributeRegistry.LIGHTNING_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - HOLY_SPELL_POWER("holy_power", AttributeRegistry.HOLY_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - ENDER_SPELL_POWER("ender_power", AttributeRegistry.ENDER_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - BLOOD_SPELL_POWER("blood_power", AttributeRegistry.BLOOD_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - EVOCATION_SPELL_POWER("evocation_power", AttributeRegistry.EVOCATION_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - NATURE_SPELL_POWER("nature_power", AttributeRegistry.NATURE_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .03f), - COOLDOWN("cooldown", AttributeRegistry.COOLDOWN_REDUCTION.get(), AttributeModifier.Operation.MULTIPLY_BASE, .06f), - SPELL_RESISTANCE("spell_resistance", AttributeRegistry.SPELL_RESIST.get(), AttributeModifier.Operation.MULTIPLY_BASE, .06f), + FIRE_SPELL_POWER("fire_power", AttributeRegistry.FIRE_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + ICE_SPELL_POWER("ice_power", AttributeRegistry.ICE_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + LIGHTNING_SPELL_POWER("lightning_power", AttributeRegistry.LIGHTNING_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + HOLY_SPELL_POWER("holy_power", AttributeRegistry.HOLY_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + ENDER_SPELL_POWER("ender_power", AttributeRegistry.ENDER_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + BLOOD_SPELL_POWER("blood_power", AttributeRegistry.BLOOD_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + EVOCATION_SPELL_POWER("evocation_power", AttributeRegistry.EVOCATION_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + NATURE_SPELL_POWER("nature_power", AttributeRegistry.NATURE_SPELL_POWER.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + COOLDOWN("cooldown", AttributeRegistry.COOLDOWN_REDUCTION.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), + SPELL_RESISTANCE("spell_resistance", AttributeRegistry.SPELL_RESIST.get(), AttributeModifier.Operation.MULTIPLY_BASE, .05f), MANA("mana", AttributeRegistry.MAX_MANA.get(), AttributeModifier.Operation.ADDITION, 50), - ATTACK_DAMAGE("melee_damage", Attributes.ATTACK_DAMAGE, AttributeModifier.Operation.MULTIPLY_BASE, .03f), - ATTACK_SPEED("melee_speed", Attributes.ATTACK_SPEED, AttributeModifier.Operation.MULTIPLY_BASE, .06f), + ATTACK_DAMAGE("melee_damage", Attributes.ATTACK_DAMAGE, AttributeModifier.Operation.MULTIPLY_BASE, .05f), + ATTACK_SPEED("melee_speed", Attributes.ATTACK_SPEED, AttributeModifier.Operation.MULTIPLY_BASE, .05f), HEALTH("health", Attributes.MAX_HEALTH, AttributeModifier.Operation.ADDITION, 2), ; From 74b652f0f2d094099d89284cf7a0f79b48b3643f Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:12:29 -0500 Subject: [PATCH 06/16] remove hold to cast --- .../io/redspace/ironsspellbooks/api/spells/CastType.java | 8 ++++---- .../io/redspace/ironsspellbooks/item/CastingItem.java | 5 ----- .../io/redspace/ironsspellbooks/mixin/MinecraftMixin.java | 5 +---- .../ironsspellbooks/player/ClientSpellCastHelper.java | 3 --- 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/api/spells/CastType.java b/src/main/java/io/redspace/ironsspellbooks/api/spells/CastType.java index dcdf3f7c5..618872662 100644 --- a/src/main/java/io/redspace/ironsspellbooks/api/spells/CastType.java +++ b/src/main/java/io/redspace/ironsspellbooks/api/spells/CastType.java @@ -4,8 +4,7 @@ public enum CastType { NONE(0), INSTANT(1), LONG(2), - CONTINUOUS(3)/*, - CHARGE(4)*/; + CONTINUOUS(3); private final int value; @@ -17,11 +16,12 @@ public int getValue() { return value; } + @Deprecated(forRemoval = true) public boolean holdToCast() { - return this == CONTINUOUS/* || this == LONG*/; + return false;//this == CONTINUOUS/* || this == LONG*/; } public boolean immediatelySuppressRightClicks() { - return this == LONG; + return this == LONG || this == CONTINUOUS; } } \ No newline at end of file diff --git a/src/main/java/io/redspace/ironsspellbooks/item/CastingItem.java b/src/main/java/io/redspace/ironsspellbooks/item/CastingItem.java index d1d654c63..c25456e49 100644 --- a/src/main/java/io/redspace/ironsspellbooks/item/CastingItem.java +++ b/src/main/java/io/redspace/ironsspellbooks/item/CastingItem.java @@ -54,11 +54,6 @@ public InteractionResultHolder use(Level level, Player player, Intera var castingSlot = hand.ordinal() == 0 ? SpellSelectionManager.MAINHAND : SpellSelectionManager.OFFHAND; if (spellData.getSpell().attemptInitiateCast(itemStack, spellLevel, level, player, selectionOption.getCastSource(), true, castingSlot)) { - if (spellData.getSpell().getCastType().holdToCast()) { - player.startUsingItem(hand); - } - //IronsSpellbooks.LOGGER.debug("CastingItem.Use.5 {} {}", level.isClientSide, hand); - return InteractionResultHolder.consume(itemStack); } else { //IronsSpellbooks.LOGGER.debug("CastingItem.Use.6 {} {}", level.isClientSide, hand); diff --git a/src/main/java/io/redspace/ironsspellbooks/mixin/MinecraftMixin.java b/src/main/java/io/redspace/ironsspellbooks/mixin/MinecraftMixin.java index 3ab20c96e..5a1adc7e0 100644 --- a/src/main/java/io/redspace/ironsspellbooks/mixin/MinecraftMixin.java +++ b/src/main/java/io/redspace/ironsspellbooks/mixin/MinecraftMixin.java @@ -20,9 +20,6 @@ public class MinecraftMixin { public void changeGlowOutline(Entity pEntity, CallbackInfoReturnable cir) { if (Minecraft.getInstance().player != null && Minecraft.getInstance().player.hasEffect(MobEffectRegistry.PLANAR_SIGHT.get()) && pEntity instanceof LivingEntity && Mth.abs((float) (pEntity.getY() - Minecraft.getInstance().player.getY())) < 18) { cir.setReturnValue(true); - }/* else if (pEntity instanceof LivingEntity entity && entity.hasEffect(MobEffectRegistry.GUIDING_BOLT.get())) { - cir.setReturnValue(true); - }*/ - //TODO: better guiding bolt glowing. need some way to sync a flag across all mobs (our synced data is only for casting mobs) + } } } diff --git a/src/main/java/io/redspace/ironsspellbooks/player/ClientSpellCastHelper.java b/src/main/java/io/redspace/ironsspellbooks/player/ClientSpellCastHelper.java index c3cb56249..badc2de7a 100644 --- a/src/main/java/io/redspace/ironsspellbooks/player/ClientSpellCastHelper.java +++ b/src/main/java/io/redspace/ironsspellbooks/player/ClientSpellCastHelper.java @@ -325,9 +325,6 @@ public static void handleClientBoundOnCastFinished(UUID castingEntityId, String } if (castingEntityId.equals(Minecraft.getInstance().player.getUUID()) && ClientInputEvents.isUseKeyDown) { - if (spell.getCastType().holdToCast()) { - ClientSpellCastHelper.setSuppressRightClicks(true); - } ClientInputEvents.hasReleasedSinceCasting = false; } } From 72550455aedeb6d62ea17ce698ffcc29c8dbb05f Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:12:48 -0500 Subject: [PATCH 07/16] increase scroll stack size. now upgraded directly with ink --- .../gui/arcane_anvil/ArcaneAnvilMenu.java | 18 +++++++++++++----- .../redspace/ironsspellbooks/item/InkItem.java | 12 ++++++++++++ .../redspace/ironsspellbooks/item/Scroll.java | 5 +---- .../ironsspellbooks/jei/ArcaneAnvilRecipe.java | 4 +++- .../player/ServerPlayerEvents.java | 17 ++++++++--------- 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/gui/arcane_anvil/ArcaneAnvilMenu.java b/src/main/java/io/redspace/ironsspellbooks/gui/arcane_anvil/ArcaneAnvilMenu.java index 4c1ba06b5..827678f8d 100644 --- a/src/main/java/io/redspace/ironsspellbooks/gui/arcane_anvil/ArcaneAnvilMenu.java +++ b/src/main/java/io/redspace/ironsspellbooks/gui/arcane_anvil/ArcaneAnvilMenu.java @@ -64,16 +64,24 @@ public void createResult() { ItemStack modifierItemStack = inputSlots.getItem(1); if (!baseItemStack.isEmpty() && !modifierItemStack.isEmpty()) { //Scroll Merging - if (baseItemStack.getItem() instanceof Scroll && modifierItemStack.getItem() instanceof Scroll) { + if (baseItemStack.getItem() instanceof Scroll && modifierItemStack.getItem() instanceof InkItem inkItem/*Scroll*/) { var spell1 = ISpellContainer.get(baseItemStack).getSpellAtIndex(0); - var spell2 = ISpellContainer.get(modifierItemStack).getSpellAtIndex(0); - - if (spell1.equals(spell2)) { - if (spell1.getLevel() < ServerConfigs.getSpellConfig(spell1.getSpell()).maxLevel()) { + if (spell1.getLevel() < spell1.getSpell().getMaxLevel()) { + var baseRarity = spell1.getRarity(); + var nextRarity = spell1.getSpell().getRarity(spell1.getLevel() + 1); + if (nextRarity.equals(inkItem.getRarity())) { result = new ItemStack(ItemRegistry.SCROLL.get()); ISpellContainer.createScrollContainer(spell1.getSpell(), spell1.getLevel() + 1, result); } } + //var spell2 = ISpellContainer.get(modifierItemStack).getSpellAtIndex(0); + + //if (spell1.equals(spell2)) { + // if (spell1.getLevel() < ServerConfigs.getSpellConfig(spell1.getSpell()).maxLevel()) { + // result = new ItemStack(ItemRegistry.SCROLL.get()); + // ISpellContainer.createScrollContainer(spell1.getSpell(), spell1.getLevel() + 1, result); + // } + //} } //Unique Weapon Improving else if (baseItemStack.getItem() instanceof UniqueItem && modifierItemStack.getItem() instanceof Scroll scroll) { diff --git a/src/main/java/io/redspace/ironsspellbooks/item/InkItem.java b/src/main/java/io/redspace/ironsspellbooks/item/InkItem.java index 52b93ff6d..459fdc78c 100644 --- a/src/main/java/io/redspace/ironsspellbooks/item/InkItem.java +++ b/src/main/java/io/redspace/ironsspellbooks/item/InkItem.java @@ -1,6 +1,7 @@ package io.redspace.ironsspellbooks.item; import io.redspace.ironsspellbooks.api.spells.SpellRarity; +import io.redspace.ironsspellbooks.registries.ItemRegistry; import io.redspace.ironsspellbooks.util.ItemPropertiesHelper; import net.minecraft.ChatFormatting; import net.minecraft.network.chat.Component; @@ -24,6 +25,17 @@ public SpellRarity getRarity() { return rarity; } + public static InkItem getInkForRarity(SpellRarity rarity) { + return switch (rarity) { + case COMMON -> (InkItem) ItemRegistry.INK_COMMON.get(); + case UNCOMMON -> (InkItem) ItemRegistry.INK_UNCOMMON.get(); + case RARE -> (InkItem) ItemRegistry.INK_RARE.get(); + case EPIC -> (InkItem) ItemRegistry.INK_EPIC.get(); + case LEGENDARY -> (InkItem) ItemRegistry.INK_LEGENDARY.get(); + default -> (InkItem) ItemRegistry.INK_COMMON.get(); + }; + } + @Override public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List lines, TooltipFlag pIsAdvanced) { super.appendHoverText(pStack, pLevel, lines, pIsAdvanced); diff --git a/src/main/java/io/redspace/ironsspellbooks/item/Scroll.java b/src/main/java/io/redspace/ironsspellbooks/item/Scroll.java index 72d33032d..9ba946948 100644 --- a/src/main/java/io/redspace/ironsspellbooks/item/Scroll.java +++ b/src/main/java/io/redspace/ironsspellbooks/item/Scroll.java @@ -29,7 +29,7 @@ public class Scroll extends Item implements IScroll { public Scroll() { - super(new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON)); + super(new Item.Properties().rarity(Rarity.UNCOMMON)); } private AbstractSpell getSpellFromStack(ItemStack itemStack) { @@ -90,9 +90,6 @@ public static void attemptRemoveScrollAfterCast(ServerPlayer serverPlayer) { var castingSlot = hand.ordinal() == 0 ? SpellSelectionManager.MAINHAND : SpellSelectionManager.OFFHAND; if (spell.attemptInitiateCast(stack, spell.getLevelFor(spellSlot.getLevel(), player), level, player, CastSource.SCROLL, false, castingSlot)) { - if (spell.getCastType().holdToCast()) { - player.startUsingItem(hand); - } return InteractionResultHolder.consume(stack); } else { return InteractionResultHolder.fail(stack); diff --git a/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipe.java b/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipe.java index 601f89be0..53dc11b34 100644 --- a/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipe.java +++ b/src/main/java/io/redspace/ironsspellbooks/jei/ArcaneAnvilRecipe.java @@ -4,6 +4,7 @@ import io.redspace.ironsspellbooks.api.spells.AbstractSpell; import io.redspace.ironsspellbooks.api.spells.ISpellContainer; import io.redspace.ironsspellbooks.capabilities.magic.UpgradeData; +import io.redspace.ironsspellbooks.item.InkItem; import io.redspace.ironsspellbooks.item.Scroll; import io.redspace.ironsspellbooks.item.UpgradeOrbItem; import io.redspace.ironsspellbooks.registries.ItemRegistry; @@ -58,9 +59,10 @@ public Tuple, List, List> getRecipeItems() case Scroll_Upgrade -> { var scroll1 = new ItemStack(ItemRegistry.SCROLL.get()); var scroll2 = new ItemStack(ItemRegistry.SCROLL.get()); + var ink = new ItemStack(InkItem.getInkForRarity(spell.getRarity(level + 1))); ISpellContainer.createScrollContainer(spell, level, scroll1); ISpellContainer.createScrollContainer(spell, level + 1, scroll2); - yield new Tuple<>(List.of(scroll1), List.of(scroll1), List.of(scroll2)); + yield new Tuple<>(List.of(scroll1), List.of(ink), List.of(scroll2)); } case Imbue -> { var tuple = new Tuple, List, List>(new ArrayList(), new ArrayList(), new ArrayList()); diff --git a/src/main/java/io/redspace/ironsspellbooks/player/ServerPlayerEvents.java b/src/main/java/io/redspace/ironsspellbooks/player/ServerPlayerEvents.java index 7a0b9e9b7..07ae05077 100644 --- a/src/main/java/io/redspace/ironsspellbooks/player/ServerPlayerEvents.java +++ b/src/main/java/io/redspace/ironsspellbooks/player/ServerPlayerEvents.java @@ -32,6 +32,7 @@ import io.redspace.ironsspellbooks.item.curios.LurkerRing; import io.redspace.ironsspellbooks.network.ClientboundEquipmentChanged; import io.redspace.ironsspellbooks.network.ClientboundSyncMana; +import io.redspace.ironsspellbooks.network.ServerboundCancelCast; import io.redspace.ironsspellbooks.registries.BlockRegistry; import io.redspace.ironsspellbooks.registries.ItemRegistry; import io.redspace.ironsspellbooks.registries.MobEffectRegistry; @@ -80,6 +81,7 @@ import top.theillusivec4.curios.api.event.CurioAttributeModifierEvent; import top.theillusivec4.curios.api.event.CurioChangeEvent; +import java.util.Objects; import java.util.Optional; @Mod.EventBusSubscriber @@ -101,8 +103,10 @@ public static void onPlayerDropItem(ItemTossEvent event) { var itemStack = event.getEntity().getItem(); if (itemStack.getItem() instanceof Scroll) { var magicData = MagicData.getPlayerMagicData(event.getPlayer()); - if (magicData.isCasting() && magicData.getCastSource() == CastSource.SCROLL && magicData.getCastType() == CastType.CONTINUOUS) { - itemStack.shrink(1); + if (magicData.isCasting() && magicData.getCastSource() == CastSource.SCROLL) { + if (magicData.getCastType() == CastType.CONTINUOUS) { + itemStack.shrink(1); + } } } } @@ -152,15 +156,10 @@ public static void onLivingEquipmentChangeEvent(LivingEquipmentChangeEvent event var isFromSpellContainer = ISpellContainer.isSpellContainer(event.getFrom()); if (isFromSpellContainer && ISpellContainer.get(event.getFrom()).getIndexForSpell(playerMagicData.getCastingSpell().getSpell()) >= 0) { + IronsSpellbooks.LOGGER.debug("onLivingEquipmentChangeEvent from:\n{}\n{}", event.getFrom().toString(), Integer.toHexString(event.getFrom().hashCode())); + IronsSpellbooks.LOGGER.debug("onLivingEquipmentChangeEvent to:\n{}\n{}", event.getTo().toString(), Integer.toHexString(event.getTo().hashCode())); if (playerMagicData.isCasting()) { Utils.serverSideCancelCast(serverPlayer); - if (event.getFrom().getItem() instanceof Scroll) { - IronsSpellbooks.LOGGER.debug("hit q on scorll"); - } else { - IronsSpellbooks.LOGGER.debug("idk"); - - } - Scroll.attemptRemoveScrollAfterCast(serverPlayer); } Messages.sendToPlayer(new ClientboundEquipmentChanged(), serverPlayer); } else if (isFromSpellContainer || ISpellContainer.isSpellContainer(event.getTo())) { From 220c6e1bcaf5a9dce83b524ea7b1de0fd94de91c Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:16:02 -0500 Subject: [PATCH 08/16] fix dead king loot table (1.1.0 bug???) --- .../data/irons_spellbooks/loot_tables/entities/dead_king.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/data/irons_spellbooks/loot_tables/entities/dead_king.json b/src/main/resources/data/irons_spellbooks/loot_tables/entities/dead_king.json index 51de572c0..d805c7b8e 100644 --- a/src/main/resources/data/irons_spellbooks/loot_tables/entities/dead_king.json +++ b/src/main/resources/data/irons_spellbooks/loot_tables/entities/dead_king.json @@ -57,8 +57,8 @@ "name": "irons_spellbooks:blank_rune" }, { - "type": "minecraft:loot_table", - "name": "irons_spellbooks:magic_items/great_ink" + "type": "minecraft:item", + "name": "irons_spellbooks:legendary_ink" } ], "rolls": 3 From 5cbedd185d280aa71dcce3e0cc7a21a82aa1ab5c Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:18:59 -0500 Subject: [PATCH 09/16] fix rarity over max level being common --- .../io/redspace/ironsspellbooks/api/spells/AbstractSpell.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/io/redspace/ironsspellbooks/api/spells/AbstractSpell.java b/src/main/java/io/redspace/ironsspellbooks/api/spells/AbstractSpell.java index 5a84dddc0..3568062f2 100644 --- a/src/main/java/io/redspace/ironsspellbooks/api/spells/AbstractSpell.java +++ b/src/main/java/io/redspace/ironsspellbooks/api/spells/AbstractSpell.java @@ -506,6 +506,9 @@ public SpellRarity getRarity(int level) { int maxRarity = getMaxRarity(); if (maxLevel == 1) return SpellRarity.values()[getMinRarity()]; + if (level >= maxLevel) { + return SpellRarity.LEGENDARY; + } double percentOfMaxLevel = (double) level / (double) maxLevel; //irons_spellbooks.LOGGER.debug("getRarity: {} {} {} {} {} {}", this.toString(), rarityRawWeights, rarityWeights, percentOfMaxLevel, minRarity, maxRarity); From c546a606e00eceeef697e9125edea97ebb400df2 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:25:52 -0500 Subject: [PATCH 10/16] fix utils#findRelativeGround level --- .../redspace/ironsspellbooks/api/util/Utils.java | 15 ++------------- .../spells/target_area/TargetAreaRenderer.java | 8 +++++++- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/main/java/io/redspace/ironsspellbooks/api/util/Utils.java b/src/main/java/io/redspace/ironsspellbooks/api/util/Utils.java index b784912cc..b3ca2a42e 100644 --- a/src/main/java/io/redspace/ironsspellbooks/api/util/Utils.java +++ b/src/main/java/io/redspace/ironsspellbooks/api/util/Utils.java @@ -566,7 +566,7 @@ public static boolean validAntiMagicTarget(Entity entity) { /** * From the given start position, this finds the first non-suffocating y level within +/- maxSteps, biased towards the ground */ - public static int findRelativeGroundLevel(Level level, Vec3 start, int maxSteps) { + public static float findRelativeGroundLevel(Level level, Vec3 start, int maxSteps) { if (level.getBlockState(new BlockPos(start)).isSuffocating(level, new BlockPos(start))) { for (int i = 0; i < maxSteps; i++) { start = start.add(0, 1, 0); @@ -576,18 +576,7 @@ public static int findRelativeGroundLevel(Level level, Vec3 start, int maxSteps) } } } -// //Vec3 upper = level.clip(new ClipContext(start, start.add(0, maxSteps, 0), ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, null)).getLocation(); -// Vec3 lower = level.clip(new ClipContext(start, start.add(0, maxSteps * -2, 0), ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, null)).getLocation(); -// return (int) (lower.y + .76f); - for (int i = 0; i < maxSteps; i++) { - BlockPos pos = new BlockPos(start).below(); - if (level.getBlockState(pos).isSuffocating(level, pos)) { - break; - } - start = start.add(0, -1, 0); - } - return (int) start.y; - + return (float) level.clip(new ClipContext(start, start.add(0, -maxSteps, 0), ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, null)).getLocation().y; } public static Vec3 moveToRelativeGroundLevel(Level level, Vec3 start, int maxSteps) { diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/target_area/TargetAreaRenderer.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/target_area/TargetAreaRenderer.java index bd10f544c..85a9485f7 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/target_area/TargetAreaRenderer.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/target_area/TargetAreaRenderer.java @@ -20,6 +20,8 @@ import net.minecraft.core.particles.ParticleType; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.Mth; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; public class TargetAreaRenderer extends EntityRenderer { public TargetAreaRenderer(EntityRendererProvider.Context pContext) { @@ -51,7 +53,11 @@ public void render(TargetedAreaEntity entity, float pEntityYaw, float pPartialTi int degrees = i * 60; float x = radius * Mth.cos(degrees * Mth.DEG_TO_RAD); float z = radius * Mth.sin(degrees * Mth.DEG_TO_RAD); - heights[i] = Utils.findRelativeGroundLevel(entity.level, entity.position().add(x, entity.getBbHeight(), z), (int) (entity.getBbHeight() * 4)) - entityY; + float y = Utils.findRelativeGroundLevel(entity.level, entity.position().add(x, entity.getBbHeight(), z), (int) (entity.getBbHeight() * 4)); + heights[i] = y - entityY; + if (entity.level.collidesWithSuffocatingBlock(null, AABB.ofSize(new Vec3(x, y, z), .1, .1, .1))) { + heights[i] = 0; + } //entity.level.addParticle(ParticleHelper.EMBERS, x + entity.getX(), heights[i] + entityY, z + entity.getZ(), 0, 0, 0); } From 31e3fb3d6a2b88bd710cd59babbb1180c9efa498 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:33:42 -0500 Subject: [PATCH 11/16] Update LATEST_CHANGES.MD --- LATEST_CHANGES.MD | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/LATEST_CHANGES.MD b/LATEST_CHANGES.MD index 175f0debc..00a714b96 100644 --- a/LATEST_CHANGES.MD +++ b/LATEST_CHANGES.MD @@ -2,15 +2,24 @@ - ### Changes -- Updated Japanese Translations, thanks to SAGA -- Updated Korean Translations, thanks to smoong -- Updated Russian Translations, thanks to Tefnya +- Changed Armor Balance + - School Armor now gives +10% school spell power per piece (previously +8%) + - School Armor and Netherite Battlemage Armor now give +5% Spell Power per piece + - School Armor and Netherite Battlemage Armor now give +125 Max Mana (previously +100) + - Scarecriw Armor now gives +75 Max Mana (previously +50) +- Changed Scroll Balance + - Increased stack size to 64 + - Upgrading scrolls now requires one ink per level, instead of a scroll of equal level + - The rarity of the ink is equal to the rarity of the resulting scroll rarity +- Tweaked Alchemist Cauldron Texture +- Removed strict hold-to-cast mechanics from scrolls and casting implements ### Fixes -- Fixed world upgrader code resetting spellbook slot NBT on relog after using Spell Slot Improvement item -- Fixed visual bug with the cast command resetting an item's use progress -- Fixed config loading incompatibility with Modernfix -- Fixed Arcane Anvil JEI recipe memory usage +- Fixed JEI Scroll Upgrade recipes showing one additional level past max level +- Fixed Long Casts going on cooldown if the cast was cancelled by opening a menu +- Fixed the Dead King dropping a loot table of ink, instead of always Legendary Ink +- Fixed ground height algorithm used in Target Area rendering +- Fixed spell rarity of a spell over its max level appearing as common ### API - From c0b7a98ca4a2521bf8ca0ef7e6f930834550342f Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 17:35:27 -0500 Subject: [PATCH 12/16] Update scrolls.json --- .../iss_guide_book/en_us/entries/spell_books/scrolls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/data/irons_spellbooks/patchouli_books/iss_guide_book/en_us/entries/spell_books/scrolls.json b/src/main/resources/data/irons_spellbooks/patchouli_books/iss_guide_book/en_us/entries/spell_books/scrolls.json index ec349f86f..5a5327baf 100644 --- a/src/main/resources/data/irons_spellbooks/patchouli_books/iss_guide_book/en_us/entries/spell_books/scrolls.json +++ b/src/main/resources/data/irons_spellbooks/patchouli_books/iss_guide_book/en_us/entries/spell_books/scrolls.json @@ -9,7 +9,7 @@ "type": "patchouli:spotlight", "title": "Scrolls", "item": "irons_spellbooks:scroll", - "text": "Scrolls can be found in chests, looted from mobs, or crafted. Each Scroll contains a spell with a level, similar to an enchanted book. Likewise, two scrolls of like kind and level can be upgraded in the Arcane Anvil like enchanted books." + "text": "Scrolls can be found in chests, looted from mobs, or crafted. Each Scroll contains a spell with a level, similar to an enchanted book. Scrolls can be upgraded in the Arcane Anvil by combining them with the corresponding rarity of ink of their next level." }, { "type": "patchouli:text", From 947264182cb611baf4e35b3f877ab97b7dc25ff9 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 18:35:57 -0500 Subject: [PATCH 13/16] add mana to spellbooks. mana regen untouched --- LATEST_CHANGES.MD | 25 ++++++++++++------- .../item/NecronomiconSpellBook.java | 3 ++- .../spell_books/SimpleAttributeSpellBook.java | 12 +++++++-- .../registries/ItemRegistry.java | 20 +++++++++------ 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/LATEST_CHANGES.MD b/LATEST_CHANGES.MD index 00a714b96..702d2f6bb 100644 --- a/LATEST_CHANGES.MD +++ b/LATEST_CHANGES.MD @@ -2,15 +2,22 @@ - ### Changes -- Changed Armor Balance - - School Armor now gives +10% school spell power per piece (previously +8%) - - School Armor and Netherite Battlemage Armor now give +5% Spell Power per piece - - School Armor and Netherite Battlemage Armor now give +125 Max Mana (previously +100) - - Scarecriw Armor now gives +75 Max Mana (previously +50) -- Changed Scroll Balance - - Increased stack size to 64 - - Upgrading scrolls now requires one ink per level, instead of a scroll of equal level - - The rarity of the ink is equal to the rarity of the resulting scroll rarity +- Large Balance Changes + - Armor + - School Armor now gives +10% school spell power per piece (previously +8%) + - School Armor and Netherite Battlemage Armor now gives +5% Spell Power per piece + - School Armor and Netherite Battlemage Armor now gives +125 Max Mana (previously +100) + - Scarecriw Armor now gives +75 Max Mana (previously +50) + - Scrolls + - Increased stack size to 64 + - Upgrading scrolls now requires one ink per level, instead of a scroll of equal level + - The rarity of the ink is equal to the rarity of the resulting scroll rarity + - Spellbooks + - Spellbooks now give max mana + - "High Tier" spellbooks (spellbooks with spell power buffs) now give +200 Max Mana + - Enchanted Spell Book and Ruined Spell Book now gives +100 Max Mana + - Apprentice Spell Book now gives +50 Max Mana + - In accordance with the increase in mana pool, the increase in mana regen gained from Max Mana is now halved - Tweaked Alchemist Cauldron Texture - Removed strict hold-to-cast mechanics from scrolls and casting implements diff --git a/src/main/java/io/redspace/ironsspellbooks/item/NecronomiconSpellBook.java b/src/main/java/io/redspace/ironsspellbooks/item/NecronomiconSpellBook.java index 4a09b4902..2396e8fc2 100644 --- a/src/main/java/io/redspace/ironsspellbooks/item/NecronomiconSpellBook.java +++ b/src/main/java/io/redspace/ironsspellbooks/item/NecronomiconSpellBook.java @@ -20,6 +20,7 @@ import org.jetbrains.annotations.Nullable; import java.util.List; +import java.util.UUID; public class NecronomiconSpellBook extends UniqueSpellBook { public NecronomiconSpellBook() { @@ -30,7 +31,7 @@ public NecronomiconSpellBook() { new SpellDataRegistryHolder(SpellRegistry.BLAZE_STORM_SPELL, 5) ), 6, () -> { ImmutableMultimap.Builder builder = ImmutableMultimap.builder(); - //builder.put(AttributeRegistry.EVOCATION_SPELL_POWER.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", .10, AttributeModifier.Operation.MULTIPLY_BASE)); + builder.put(AttributeRegistry.MAX_MANA.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", 200, AttributeModifier.Operation.ADDITION)); return builder.build(); }); } diff --git a/src/main/java/io/redspace/ironsspellbooks/item/spell_books/SimpleAttributeSpellBook.java b/src/main/java/io/redspace/ironsspellbooks/item/spell_books/SimpleAttributeSpellBook.java index d206a10f9..2ab95862d 100644 --- a/src/main/java/io/redspace/ironsspellbooks/item/spell_books/SimpleAttributeSpellBook.java +++ b/src/main/java/io/redspace/ironsspellbooks/item/spell_books/SimpleAttributeSpellBook.java @@ -3,6 +3,7 @@ import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; +import io.redspace.ironsspellbooks.api.registry.AttributeRegistry; import io.redspace.ironsspellbooks.api.spells.SpellRarity; import io.redspace.ironsspellbooks.item.SpellBook; import net.minecraft.world.entity.ai.attributes.Attribute; @@ -17,7 +18,11 @@ public class SimpleAttributeSpellBook extends SpellBook { private final Multimap defaultModifiers; public SimpleAttributeSpellBook(int spellSlots, SpellRarity rarity, Attribute attribute, double value) { - this(spellSlots, rarity, createMultimap(attribute, new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", value, AttributeModifier.Operation.MULTIPLY_BASE))); + this(spellSlots, rarity, attribute, value, 0); + } + + public SimpleAttributeSpellBook(int spellSlots, SpellRarity rarity, Attribute attribute, double value, double mana) { + this(spellSlots, rarity, createMultimap(attribute, new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", value, AttributeModifier.Operation.MULTIPLY_BASE), mana)); } public SimpleAttributeSpellBook(int spellSlots, SpellRarity rarity, Multimap defaultModifiers) { @@ -42,9 +47,12 @@ public Multimap getAttributeModifiers(SlotContext return attributeBuilder.build(); } - private static Multimap createMultimap(Attribute attribute, AttributeModifier modifier) { + private static Multimap createMultimap(Attribute attribute, AttributeModifier modifier, double mana) { Multimap map = HashMultimap.create(); map.put(attribute, modifier); + if(mana > 0){ + map.put(AttributeRegistry.MAX_MANA.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e88826d3"), "Weapon modifier", mana, AttributeModifier.Operation.ADDITION)); + } return map; } } diff --git a/src/main/java/io/redspace/ironsspellbooks/registries/ItemRegistry.java b/src/main/java/io/redspace/ironsspellbooks/registries/ItemRegistry.java index 6b22f1f26..ba27efe52 100644 --- a/src/main/java/io/redspace/ironsspellbooks/registries/ItemRegistry.java +++ b/src/main/java/io/redspace/ironsspellbooks/registries/ItemRegistry.java @@ -46,19 +46,24 @@ public static void register(IEventBus eventBus) { */ public static final RegistryObject WIMPY_SPELL_BOOK = ITEMS.register("wimpy_spell_book", () -> new SpellBook(0, SpellRarity.LEGENDARY, new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON))); public static final RegistryObject LEGENDARY_SPELL_BOOK = ITEMS.register("legendary_spell_book", () -> new SpellBook(12, SpellRarity.LEGENDARY, new Item.Properties().stacksTo(1).rarity(Rarity.UNCOMMON))); - public static final RegistryObject NETHERITE_SPELL_BOOK = ITEMS.register("netherite_spell_book", () -> new SimpleAttributeSpellBook(12, SpellRarity.LEGENDARY, AttributeRegistry.COOLDOWN_REDUCTION.get(), .20)); - public static final RegistryObject DIAMOND_SPELL_BOOK = ITEMS.register("diamond_spell_book", () -> new SpellBook(10, SpellRarity.EPIC)); - public static final RegistryObject GOLD_SPELL_BOOK = ITEMS.register("gold_spell_book", () -> new SimpleAttributeSpellBook(8, SpellRarity.RARE, AttributeRegistry.CAST_TIME_REDUCTION.get(), .15)); + public static final RegistryObject NETHERITE_SPELL_BOOK = ITEMS.register("netherite_spell_book", () -> new SimpleAttributeSpellBook(12, SpellRarity.LEGENDARY, AttributeRegistry.COOLDOWN_REDUCTION.get(), .20, 200)); + public static final RegistryObject DIAMOND_SPELL_BOOK = ITEMS.register("diamond_spell_book", () -> { + ImmutableMultimap.Builder builder = ImmutableMultimap.builder(); + builder.put(AttributeRegistry.MAX_MANA.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", 100, AttributeModifier.Operation.ADDITION)); + return new SimpleAttributeSpellBook(10, SpellRarity.EPIC, builder.build()); + }); + public static final RegistryObject GOLD_SPELL_BOOK = ITEMS.register("gold_spell_book", () -> new SimpleAttributeSpellBook(8, SpellRarity.RARE, AttributeRegistry.CAST_TIME_REDUCTION.get(), .15, 50)); public static final RegistryObject IRON_SPELL_BOOK = ITEMS.register("iron_spell_book", () -> new SpellBook(6, SpellRarity.UNCOMMON)); public static final RegistryObject COPPER_SPELL_BOOK = ITEMS.register("copper_spell_book", () -> new SpellBook(5, SpellRarity.COMMON)); - public static final RegistryObject ROTTEN_SPELL_BOOK = ITEMS.register("rotten_spell_book", () -> new SimpleAttributeSpellBook(8, SpellRarity.RARE, AttributeRegistry.SPELL_RESIST.get(), -.15)); - public static final RegistryObject BLAZE_SPELL_BOOK = ITEMS.register("blaze_spell_book", () -> new SimpleAttributeSpellBook(10, SpellRarity.LEGENDARY, AttributeRegistry.FIRE_SPELL_POWER.get(), .10)); - public static final RegistryObject DRAGONSKIN_SPELL_BOOK = ITEMS.register("dragonskin_spell_book", () -> new SimpleAttributeSpellBook(12, SpellRarity.LEGENDARY, AttributeRegistry.ENDER_SPELL_POWER.get(), .10)); - public static final RegistryObject DRUIDIC_SPELL_BOOK = ITEMS.register("druidic_spell_book", () -> new SimpleAttributeSpellBook(10, SpellRarity.LEGENDARY, AttributeRegistry.NATURE_SPELL_POWER.get(), .10)); + public static final RegistryObject ROTTEN_SPELL_BOOK = ITEMS.register("rotten_spell_book", () -> new SimpleAttributeSpellBook(8, SpellRarity.RARE, AttributeRegistry.SPELL_RESIST.get(), -.15, 100)); + public static final RegistryObject BLAZE_SPELL_BOOK = ITEMS.register("blaze_spell_book", () -> new SimpleAttributeSpellBook(10, SpellRarity.LEGENDARY, AttributeRegistry.FIRE_SPELL_POWER.get(), .10, 200)); + public static final RegistryObject DRAGONSKIN_SPELL_BOOK = ITEMS.register("dragonskin_spell_book", () -> new SimpleAttributeSpellBook(12, SpellRarity.LEGENDARY, AttributeRegistry.ENDER_SPELL_POWER.get(), .10, 200)); + public static final RegistryObject DRUIDIC_SPELL_BOOK = ITEMS.register("druidic_spell_book", () -> new SimpleAttributeSpellBook(10, SpellRarity.LEGENDARY, AttributeRegistry.NATURE_SPELL_POWER.get(), .10, 200)); public static final RegistryObject VILLAGER_SPELL_BOOK = ITEMS.register("villager_spell_book", () -> { ImmutableMultimap.Builder builder = ImmutableMultimap.builder(); builder.put(AttributeRegistry.HOLY_SPELL_POWER.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", .08, AttributeModifier.Operation.MULTIPLY_BASE)); builder.put(AttributeRegistry.CAST_TIME_REDUCTION.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", .08, AttributeModifier.Operation.MULTIPLY_BASE)); + builder.put(AttributeRegistry.MAX_MANA.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", 200, AttributeModifier.Operation.ADDITION)); return new SimpleAttributeSpellBook(10, SpellRarity.LEGENDARY, builder.build()); }); public static final RegistryObject GRAYBEARD_STAFF = ITEMS.register("graybeard_staff", () -> new StaffItem(ItemPropertiesHelper.equipment().stacksTo(1), 2, -3, Map.of(AttributeRegistry.MANA_REGEN.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", .25, AttributeModifier.Operation.MULTIPLY_BASE), AttributeRegistry.SPELL_POWER.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", .10, AttributeModifier.Operation.MULTIPLY_BASE)))); @@ -77,6 +82,7 @@ public static void register(IEventBus eventBus) { () -> { ImmutableMultimap.Builder builder = ImmutableMultimap.builder(); builder.put(AttributeRegistry.EVOCATION_SPELL_POWER.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", .10, AttributeModifier.Operation.MULTIPLY_BASE)); + builder.put(AttributeRegistry.MAX_MANA.get(), new AttributeModifier(UUID.fromString("667ad88f-901d-4691-b2a2-3664e42026d3"), "Weapon modifier", 200, AttributeModifier.Operation.ADDITION)); return builder.build(); }) ); From db73becb77f1558402ff513aa5a6a18606890e59 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:14:35 -0500 Subject: [PATCH 14/16] Update LATEST_CHANGES.MD --- LATEST_CHANGES.MD | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LATEST_CHANGES.MD b/LATEST_CHANGES.MD index 702d2f6bb..8163441ab 100644 --- a/LATEST_CHANGES.MD +++ b/LATEST_CHANGES.MD @@ -7,7 +7,7 @@ - School Armor now gives +10% school spell power per piece (previously +8%) - School Armor and Netherite Battlemage Armor now gives +5% Spell Power per piece - School Armor and Netherite Battlemage Armor now gives +125 Max Mana (previously +100) - - Scarecriw Armor now gives +75 Max Mana (previously +50) + - Scarecrow Armor now gives +75 Max Mana (previously +50) - Scrolls - Increased stack size to 64 - Upgrading scrolls now requires one ink per level, instead of a scroll of equal level @@ -17,7 +17,6 @@ - "High Tier" spellbooks (spellbooks with spell power buffs) now give +200 Max Mana - Enchanted Spell Book and Ruined Spell Book now gives +100 Max Mana - Apprentice Spell Book now gives +50 Max Mana - - In accordance with the increase in mana pool, the increase in mana regen gained from Max Mana is now halved - Tweaked Alchemist Cauldron Texture - Removed strict hold-to-cast mechanics from scrolls and casting implements From 293eef71a0fe8a0eb97f1ee3137dfcaa593f6ef1 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:30:12 -0500 Subject: [PATCH 15/16] cone of cold particles --- LATEST_CHANGES.MD | 1 + .../spells/cone_of_cold/ConeOfColdProjectile.java | 10 +++++----- .../ironsspellbooks/particle/SnowDustParticle.java | 11 +++++++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/LATEST_CHANGES.MD b/LATEST_CHANGES.MD index 8163441ab..51bcedceb 100644 --- a/LATEST_CHANGES.MD +++ b/LATEST_CHANGES.MD @@ -19,6 +19,7 @@ - Apprentice Spell Book now gives +50 Max Mana - Tweaked Alchemist Cauldron Texture - Removed strict hold-to-cast mechanics from scrolls and casting implements +- Adjust Cone of Cold particles ### Fixes - Fixed JEI Scroll Upgrade recipes showing one additional level past max level diff --git a/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java b/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java index 0c1a2852d..26e8309dd 100644 --- a/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java +++ b/src/main/java/io/redspace/ironsspellbooks/entity/spells/cone_of_cold/ConeOfColdProjectile.java @@ -37,8 +37,8 @@ public void spawnParticles() { double y = pos.y + owner.getEyeHeight() * .9f; double z = pos.z; - double speed = random.nextDouble() * .4 + .45; for (int i = 0; i < 10; i++) { + double speed = random.nextDouble() * .7 + .15; double offset = .125; double ox = Math.random() * 2 * offset - offset; double oy = Math.random() * 2 * offset - offset; @@ -50,10 +50,10 @@ public void spawnParticles() { level.addParticle(Math.random() > .15 ? ParticleHelper.SNOW_DUST : ParticleHelper.SNOWFLAKE, x + ox, y + oy, z + oz, result.x, result.y, result.z); } - if (tickCount % 12 == 0) { - var forward = rotation.scale(.5f); - level.addParticle(ParticleRegistry.RING_SMOKE_PARTICLE.get(), x, y, z, forward.x, forward.y, forward.z); - } +// if (tickCount % 12 == 0) { +// var forward = rotation.scale(.5f); +// level.addParticle(ParticleRegistry.RING_SMOKE_PARTICLE.get(), x, y, z, forward.x, forward.y, forward.z); +// } } @Override diff --git a/src/main/java/io/redspace/ironsspellbooks/particle/SnowDustParticle.java b/src/main/java/io/redspace/ironsspellbooks/particle/SnowDustParticle.java index f2f7b690f..2d65ba36e 100644 --- a/src/main/java/io/redspace/ironsspellbooks/particle/SnowDustParticle.java +++ b/src/main/java/io/redspace/ironsspellbooks/particle/SnowDustParticle.java @@ -1,18 +1,29 @@ package io.redspace.ironsspellbooks.particle; +import io.redspace.ironsspellbooks.api.util.Utils; import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.Particle; import net.minecraft.client.particle.ParticleProvider; import net.minecraft.client.particle.ParticleRenderType; import net.minecraft.client.particle.SpriteSet; import net.minecraft.core.particles.SimpleParticleType; +import net.minecraft.util.Mth; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public class SnowDustParticle extends SnowflakeParticle { + float maxSize, minSize; public SnowDustParticle(ClientLevel level, double xCoord, double yCoord, double zCoord, SpriteSet spriteSet, double xd, double yd, double zd) { super(level, xCoord, yCoord, zCoord, spriteSet, xd, yd, zd); + this.minSize = this.quadSize; + this.maxSize = Utils.random.nextFloat() * .4f + .7f; + } + + @Override + public void tick() { + super.tick(); + this.quadSize = Mth.clampedLerp(minSize, maxSize, this.age / (float) this.lifetime); } public ParticleRenderType getRenderType() { From b477ef2a4f8f290f31b71075d475ccb533afaba5 Mon Sep 17 00:00:00 2001 From: iron431 <34083081+iron431@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:35:12 -0500 Subject: [PATCH 16/16] Update LATEST_CHANGES.MD --- LATEST_CHANGES.MD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LATEST_CHANGES.MD b/LATEST_CHANGES.MD index 51bcedceb..0b21d7b43 100644 --- a/LATEST_CHANGES.MD +++ b/LATEST_CHANGES.MD @@ -19,7 +19,7 @@ - Apprentice Spell Book now gives +50 Max Mana - Tweaked Alchemist Cauldron Texture - Removed strict hold-to-cast mechanics from scrolls and casting implements -- Adjust Cone of Cold particles +- Adjusted Cone of Cold particles ### Fixes - Fixed JEI Scroll Upgrade recipes showing one additional level past max level