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 90c73fed1..f65ee0c9f 100644 Binary files a/src/main/resources/assets/malum/textures/item/processed_soulstone.png and b/src/main/resources/assets/malum/textures/item/processed_soulstone.png differ diff --git a/src/main/resources/assets/malum/textures/item/raw_soulstone.png b/src/main/resources/assets/malum/textures/item/raw_soulstone.png index 1ac6d58c5..98b17590a 100644 Binary files a/src/main/resources/assets/malum/textures/item/raw_soulstone.png and b/src/main/resources/assets/malum/textures/item/raw_soulstone.png differ 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