From 0027f06f36f5701504a935144f0ccc12cb276f15 Mon Sep 17 00:00:00 2001 From: SammySemicolon Date: Sat, 23 Nov 2024 14:38:40 +0100 Subject: [PATCH] 1.6.5.1 --- .../tags/blocks/unchained_rite_catalyst.json | 6 ++++++ .../spiritrite/arcane/ArcaneRiteType.java | 8 +++++++- .../irons_spellbooks/IronsSpellsCompat.java | 2 +- .../com/sammy/malum/config/CommonConfig.java | 4 ++++ .../core/handlers/SpiritHarvestHandler.java | 3 ++- .../sammy/malum/data/block/MalumBlockTags.java | 2 ++ .../registry/common/block/BlockTagRegistry.java | 1 + .../malum/textures/item/processed_soulstone.png | Bin 282 -> 443 bytes .../malum/textures/item/raw_soulstone.png | Bin 450 -> 536 bytes .../spirit_data/entity/goety/whisperer.json | 1 - 10 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 src/generated/resources/data/malum/tags/blocks/unchained_rite_catalyst.json diff --git a/src/generated/resources/data/malum/tags/blocks/unchained_rite_catalyst.json b/src/generated/resources/data/malum/tags/blocks/unchained_rite_catalyst.json new file mode 100644 index 000000000..2a7edd5cf --- /dev/null +++ b/src/generated/resources/data/malum/tags/blocks/unchained_rite_catalyst.json @@ -0,0 +1,6 @@ +{ + "values": [ + "malum:blighted_earth", + "malum:blighted_soil" + ] +} \ No newline at end of file diff --git a/src/main/java/com/sammy/malum/common/spiritrite/arcane/ArcaneRiteType.java b/src/main/java/com/sammy/malum/common/spiritrite/arcane/ArcaneRiteType.java index 2d07d2dd2..7e55c726d 100644 --- a/src/main/java/com/sammy/malum/common/spiritrite/arcane/ArcaneRiteType.java +++ b/src/main/java/com/sammy/malum/common/spiritrite/arcane/ArcaneRiteType.java @@ -8,6 +8,7 @@ import com.sammy.malum.common.recipe.*; import com.sammy.malum.common.spiritrite.*; import com.sammy.malum.common.worldevent.*; +import com.sammy.malum.registry.common.block.BlockTagRegistry; import net.minecraft.core.*; import net.minecraft.server.level.*; import net.minecraft.world.entity.item.*; @@ -47,11 +48,16 @@ public void doRiteEffect(TotemBaseBlockEntity totemBase, ServerLevel level) { public TotemicRiteEffect getCorruptedEffect() { return new TotemicRiteEffect(TotemicRiteEffect.MalumRiteEffectCategory.RADIAL_BLOCK_EFFECT) { + @Override + public boolean canAffectBlock(TotemBaseBlockEntity totemBase, BlockState state, BlockPos pos) { + return state.is(BlockTagRegistry.UNCHAINED_RITE_CATALYST) && super.canAffectBlock(totemBase, state, pos); + } + @SuppressWarnings("ConstantConditions") @Override public void doRiteEffect(TotemBaseBlockEntity totemBase, ServerLevel level) { BlockPos pos = totemBase.getBlockPos(); - List nearbyBlocks = getNearbyBlocks(totemBase, BlightedSoilBlock.class).toList(); + List nearbyBlocks = getNearbyBlocks(totemBase, Block.class).toList(); for (BlockPos p : nearbyBlocks) { BlockPos posToTransmute = p.above(); BlockState stateToTransmute = level.getBlockState(posToTransmute); diff --git a/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java b/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java index a6631f35f..a9c657f3f 100644 --- a/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java +++ b/src/main/java/com/sammy/malum/compability/irons_spellbooks/IronsSpellsCompat.java @@ -133,7 +133,7 @@ public static void addSoulHunterSpellPower(Multimap map, float amount) { diff --git a/src/main/java/com/sammy/malum/config/CommonConfig.java b/src/main/java/com/sammy/malum/config/CommonConfig.java index 7a25bd9f7..3b875a92a 100644 --- a/src/main/java/com/sammy/malum/config/CommonConfig.java +++ b/src/main/java/com/sammy/malum/config/CommonConfig.java @@ -16,6 +16,10 @@ public class CommonConfig extends LodestoneConfig { builder.comment("If set to true, any spirits dropped will simply take the form of an item.") .define("noFancySpirits", false))); + public static ConfigValueHolder NO_FANCY_SPIRITS_FOR_TOTEMS = new ConfigValueHolder<>(MALUM, "common/spirit", (builder -> + builder.comment("If set to true, any spirits dropped through non-entity-means will simply take the form of an item.") + .define("noFancySpiritsTotem", true))); + public static ConfigValueHolder SOULLESS_SPAWNERS = new ConfigValueHolder<>(MALUM, "common/spirit/spawner", (builder -> builder.comment("If set to true, mob spawners will create soulless mobs instead.") .define("lameSpawners", false))); diff --git a/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java b/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java index 0e023eb2c..1b1dd576b 100644 --- a/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java +++ b/src/main/java/com/sammy/malum/core/handlers/SpiritHarvestHandler.java @@ -191,7 +191,9 @@ public static void createSpiritEntities(Level level, Collection spiri } private static void createSpiritEntities(Level level, Collection spirits, Vec3 position, float totalCount, @Nullable LivingEntity attacker) { + boolean noFancySpirits = CommonConfig.NO_FANCY_SPIRITS.getConfigValue(); if (attacker == null) { + noFancySpirits = CommonConfig.NO_FANCY_SPIRITS_FOR_TOTEMS.getConfigValue(); attacker = level.getNearestPlayer(position.x, position.y, position.z, 8, e -> true); } final UUID attackerUUID = attacker == null ? null : attacker.getUUID(); @@ -201,7 +203,6 @@ private static void createSpiritEntities(Level level, Collection spir if (stack.isEmpty()) { continue; } - boolean noFancySpirits = CommonConfig.NO_FANCY_SPIRITS.getConfigValue(); for (int j = 0; j < stack.getCount(); j++) { if (noFancySpirits) { ItemEntity itemEntity = new ItemEntity(level, position.x, position.y, position.z, stack); diff --git a/src/main/java/com/sammy/malum/data/block/MalumBlockTags.java b/src/main/java/com/sammy/malum/data/block/MalumBlockTags.java index dc69086c9..944c9c206 100644 --- a/src/main/java/com/sammy/malum/data/block/MalumBlockTags.java +++ b/src/main/java/com/sammy/malum/data/block/MalumBlockTags.java @@ -1,6 +1,7 @@ package com.sammy.malum.data.block; import com.sammy.malum.MalumMod; +import com.sammy.malum.registry.common.block.BlockRegistry; import com.sammy.malum.registry.common.block.BlockTagRegistry; import net.minecraft.core.HolderLookup; import net.minecraft.data.PackOutput; @@ -36,6 +37,7 @@ protected void addTags(HolderLookup.Provider pProvider) { Set> blocks = new HashSet<>(BLOCKS.getEntries()); tag(BlockTagRegistry.RITE_IMMUNE).addTags(BlockTagRegistry.TAINTED_ROCK, BlockTagRegistry.TWISTED_ROCK); + tag(BlockTagRegistry.UNCHAINED_RITE_CATALYST).add(BlockRegistry.BLIGHTED_EARTH.get(), BlockRegistry.BLIGHTED_SOIL.get()); tag(BlockTagRegistry.ENDLESS_FLAME); tag(BlockTagRegistry.GREATER_AERIAL_WHITELIST); diff --git a/src/main/java/com/sammy/malum/registry/common/block/BlockTagRegistry.java b/src/main/java/com/sammy/malum/registry/common/block/BlockTagRegistry.java index f285b30c4..4d1084df7 100644 --- a/src/main/java/com/sammy/malum/registry/common/block/BlockTagRegistry.java +++ b/src/main/java/com/sammy/malum/registry/common/block/BlockTagRegistry.java @@ -37,6 +37,7 @@ public class BlockTagRegistry { public static final TagKey TWISTED_WALLS = malumTag("twisted_rock_walls"); public static final TagKey RITE_IMMUNE = malumTag("rite_immune"); + public static final TagKey UNCHAINED_RITE_CATALYST = malumTag("unchained_rite_catalyst"); public static final TagKey ENDLESS_FLAME = malumTag("endless_flame"); diff --git a/src/main/resources/assets/malum/textures/item/processed_soulstone.png b/src/main/resources/assets/malum/textures/item/processed_soulstone.png index 90c73fed1a90fb7d6213c07a3f690af66ec02f72..f65ee0c9fa6934b3ef8aa846f0529261cbfba8b6 100644 GIT binary patch delta 417 zcmV;S0bc%^0=ol{B!2;OQb$4nuFf3k0004XNkl!0oA>+jz<kfXKhZSj^%xAv*g5AWHC7aD4=?X`+3DSvsBwb;?evYbV z8~v8S@&(_~94e!C<5(MQEaw(Tr*8?le8g`SIXv6`A(O$Z?>C0s-89*oImn&zT36ul z@}A?XeFOii%KrAS5OqalxrOVKb1oi|rrI0QBYQ-T>>4r1^QZX&S+9ETbAWQ500000 LNkvXXu0mjfP2Iu) delta 254 zcmV^&AKiN=F7L!}F;*{tG&_qs zFueQq8g9n<_g5K+G61AmkcXc^fmMbt#z*EL240~T5VEFR&GsBg8$51TAaDk4J z)qgPoVFq?~POu>lem`OO`SUx&s}FA(c({2nT!Ga9S#cSL_jg}DGRW~uF+BSCjKNS) zn?Z<86zmFgZ(ub*OG=$Vm`M=qe30KkUgBlu1{+4S0iXYV1-pWam5o82M-^Px$(n&-?R5*>Llh0}sQ5eO4%}mn_P9~Ib zVu^I}r-CCG6OmvEg6N{%`wCff)pt<0zC~UjyMha=Ac}&Nq&AoercK0P(@Z4OI3}j! zxDaEfGu4IP>fZ0qIp>~_3;!82e=9C$SKZ&|S8pE&_KN>vSbvvG^u=$CQb%re|D_M) zOa;r?Rrk^Phg6(0)nOZee&6IYh)+R2RdfO3k}}QNlkZ%PCFu7}A5rLZA`*>KT3lm3 zEK@yhaAR_tb-9EQ$pk75^dK)9423qe)N_>gb7NulDD zu?jW-duoTxnSU)hw;HIb>LU|Q4wn|!D3Bv`PoULmai_k*!srrV$Ks1*p=la}@rYO(tZ*>lH`s141n(TfQ^k!q=EO#AQ9QjqfTvGhpvgLMNg;kMhUs)kN;;rWXUD_t1DF=m zxW)Oqm<^kuWl?7*NT}a~ld+V(GX04k_THV@_Yf{GG@&CsR#yD=gt6`Y?JLlXxSA!)>vt&P10g1?w zI15kbuI7HL3fT4SiwA51&1oBfl_0J^QkVx>2srT_!!5E%jel<7)H;x9KPVsyfMnfk z+n@;qOBDu22eZ|TLY9NjHsQW}EB7e?#Jb1DVoT3ru+39Q>%EKEdT!g81n;sCuve4X0rT z&G92z-3}Ork?qd~kQj9Tf`GmCztuH$d4;m{n=d>j5+a8vN+nHx_C}Vz#$RQ*q!Cna TVPOCO002ovPDHLkV1fVu&U(u3 diff --git a/src/main/resources/data/malum/spirit_data/entity/goety/whisperer.json b/src/main/resources/data/malum/spirit_data/entity/goety/whisperer.json index 7bc271f8c..edf982e77 100644 --- a/src/main/resources/data/malum/spirit_data/entity/goety/whisperer.json +++ b/src/main/resources/data/malum/spirit_data/entity/goety/whisperer.json @@ -10,6 +10,5 @@ "spirit": "earthen", "count": 2 } - } ] } \ No newline at end of file