Skip to content

Commit

Permalink
1.6.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Nov 23, 2024
1 parent 0ca4b5d commit 0027f06
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"values": [
"malum:blighted_earth",
"malum:blighted_soil"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand Down Expand Up @@ -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<BlockPos> nearbyBlocks = getNearbyBlocks(totemBase, BlightedSoilBlock.class).toList();
List<BlockPos> nearbyBlocks = getNearbyBlocks(totemBase, Block.class).toList();
for (BlockPos p : nearbyBlocks) {
BlockPos posToTransmute = p.above();
BlockState stateToTransmute = level.getBlockState(posToTransmute);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static void addSoulHunterSpellPower(Multimap<Attribute, AttributeModifier
}

public static void addGluttonySpellPower(GluttonyEffect effect) {
effect.addAttributeModifier(AttributeRegistry.SPELL_POWER.get(), "90523925-900e-49bf-b07d-12e2e7350f2d", 0.2f, AttributeModifier.Operation.MULTIPLY_TOTAL);
effect.addAttributeModifier(AttributeRegistry.SPELL_POWER.get(), "90523925-900e-49bf-b07d-12e2e7350f2d", 0.1f, AttributeModifier.Operation.MULTIPLY_TOTAL);
}

public static void addSpellPowerToCurio(MalumCurioItem item, Multimap<Attribute, AttributeModifier> map, float amount) {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/sammy/malum/config/CommonConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Boolean> 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<Boolean> 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)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ public static void createSpiritEntities(Level level, Collection<ItemStack> spiri
}

private static void createSpiritEntities(Level level, Collection<ItemStack> 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();
Expand All @@ -201,7 +203,6 @@ private static void createSpiritEntities(Level level, Collection<ItemStack> 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);
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/sammy/malum/data/block/MalumBlockTags.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -36,6 +37,7 @@ protected void addTags(HolderLookup.Provider pProvider) {
Set<RegistryObject<Block>> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class BlockTagRegistry {
public static final TagKey<Block> TWISTED_WALLS = malumTag("twisted_rock_walls");

public static final TagKey<Block> RITE_IMMUNE = malumTag("rite_immune");
public static final TagKey<Block> UNCHAINED_RITE_CATALYST = malumTag("unchained_rite_catalyst");

public static final TagKey<Block> ENDLESS_FLAME = malumTag("endless_flame");

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/malum/textures/item/raw_soulstone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
"spirit": "earthen",
"count": 2
}
}
]
}

0 comments on commit 0027f06

Please sign in to comment.