diff --git a/src/generated/resources/assets/malum/lang/en_us.json b/src/generated/resources/assets/malum/lang/en_us.json index b8b2ad668..77bbf864e 100644 --- a/src/generated/resources/assets/malum/lang/en_us.json +++ b/src/generated/resources/assets/malum/lang/en_us.json @@ -226,26 +226,26 @@ "death.attack.scythe_sweep.player": "%s was sliced in twain by %s", "death.attack.voodoo": "%s's soul shattered", "death.attack.voodoo.player": "%s's soul was shattered by %s", - "effect.malum.aethers_charm": "Aether'''s Charm", + "effect.malum.aethers_charm": "Aether's Charm", "effect.malum.aethers_charm.description": "The heavens call for you, increasing jump height and decreasing gravity.", - "effect.malum.anglers_lure": "Angler'''s Lure", + "effect.malum.anglers_lure": "Angler's Lure", "effect.malum.anglers_lure.description": "Let any fish who meets my gaze learn the true meaning of fear; for I am the harbinger of death. The bane of creatures sub-aqueous, my rod is true and unwavering as I cast into the aquatic abyss. A man, scorned by this uncaring Earth, finds solace in the sea. My only friend, the worm upon my hook. Wriggling, writhing, struggling to surmount the mortal pointlessness that permeates this barren world. I am alone. I am empty. And yet, I fish.", - "effect.malum.cancerous_growth": "Cancerou'''s Growth", + "effect.malum.cancerous_growth": "Cancerous Growth", "effect.malum.earthen_might": "Earthen Might", "effect.malum.earthen_might.description": "Your fists and tools are reinforced with earth, increasing your overall damage.", "effect.malum.gaian_bulwark": "Gaian Bulwark", "effect.malum.gaian_bulwark.description": "You are protected by an earthen bulwark, increasing your armor.", "effect.malum.gluttony": "Gluttony", "effect.malum.gluttony.description": "You feed on the vulnerable, increasing scythe proficiency and gradually restoring lost hunger.", - "effect.malum.ifrits_embrace": "Ifrit'''s Embrace", + "effect.malum.ifrits_embrace": "Ifrit's Embrace", "effect.malum.ifrits_embrace.description": "The warm embrace of fire coats your soul, mending your seared scars.", - "effect.malum.miners_rage": "Miner'''s Rage", + "effect.malum.miners_rage": "Miner's Rage", "effect.malum.miners_rage.description": "Your tools are bolstered with radiance, increasing your mining and attack speed.", - "effect.malum.poseidons_grasp": "Poseidon'''s Grasp", + "effect.malum.poseidons_grasp": "Poseidon's Grasp", "effect.malum.poseidons_grasp.description": "You reach out for further power, increasing your reach and item pickup distance.", "effect.malum.rejected": "Rejected", "effect.malum.wicked_intent": "Wicked Intent", - "effect.malum.zephyrs_courage": "Zephyr'''s Courage", + "effect.malum.zephyrs_courage": "Zephyr's Courage", "effect.malum.zephyrs_courage.description": "The zephyr propels you forward, increasing your movement speed.", "enchantment.malum.haunted": "Haunted", "enchantment.malum.haunted.desc": "Deals extra magic damage.", diff --git a/src/main/java/com/sammy/malum/client/screen/codex/AbstractMalumScreen.java b/src/main/java/com/sammy/malum/client/screen/codex/AbstractMalumScreen.java index 8f42923b3..7005e3371 100644 --- a/src/main/java/com/sammy/malum/client/screen/codex/AbstractMalumScreen.java +++ b/src/main/java/com/sammy/malum/client/screen/codex/AbstractMalumScreen.java @@ -20,13 +20,13 @@ protected AbstractMalumScreen(Component pTitle) { public abstract Supplier getSweetenerSound(); public void playPageFlipSound(Supplier soundEvent, float pitch) { - playSound(soundEvent, 1, Math.max(1, pitch * 0.8f)); + playSound(soundEvent, 0.5f, Math.max(1, pitch * 0.8f)); playSound(getSweetenerSound(), 0.2f, pitch); } public void playSweetenedSound(Supplier soundEvent, float sweetenerPitch) { - playSound(soundEvent, 1, 1); - playSound(getSweetenerSound(), 0.2f, sweetenerPitch); + playSound(soundEvent, 0.5f, 1); + playSound(getSweetenerSound(), 0.1f, sweetenerPitch); } public void playSound(Supplier soundEvent, float volume, float pitch) { diff --git a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java index 2bfb9295e..5a9b1cd16 100644 --- a/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java +++ b/src/main/java/com/sammy/malum/common/block/curiosities/spirit_crucible/SpiritCrucibleCoreBlockEntity.java @@ -1,6 +1,7 @@ package com.sammy.malum.common.block.curiosities.spirit_crucible; import com.sammy.malum.common.block.*; +import com.sammy.malum.common.block.storage.*; import com.sammy.malum.common.item.impetus.*; import com.sammy.malum.common.item.spirit.*; import com.sammy.malum.common.packets.particle.curiosities.altar.*; @@ -197,6 +198,35 @@ public void tick() { } float speed = acceleratorData == null ? 0 : acceleratorData.speedIncrease; if (level instanceof ServerLevel) { + if (level.getBlockEntity(worldPosition.above(2)) instanceof MalumItemHolderBlockEntity itemHolderBlockEntity) { + ItemStack repairStack = itemHolderBlockEntity.inventory.getStackInSlot(0); + if (!repairStack.isEmpty()) { + final ItemStack repairedStack = inventory.getStackInSlot(0); + SpiritRepairRecipe repairRecipe = SpiritRepairRecipe.getRecipe(level, repairedStack, repairStack, spiritInventory.nonEmptyItemStacks); + if (repairRecipe != null) { + if (repairedStack.isDamaged()) { + float repaired = repairedStack.getMaxDamage() * repairRecipe.durabilityPercentage; + int newDurability = (int) Math.min(0, repairedStack.getDamageValue() - repaired); + repairedStack.setDamageValue(newDurability); + } + if (repairedStack.getItem() instanceof CrackedImpetusItem crackedImpetusItem) { + inventory.setStackInSlot(0, new ItemStack(crackedImpetusItem.impetus)); + } + repairStack.shrink(repairRecipe.repairMaterial.count); + for (SpiritWithCount spirit : repairRecipe.spirits) { + for (int i = 0; i < spiritInventory.slotCount; i++) { + ItemStack spiritStack = spiritInventory.getStackInSlot(i); + if (spirit.matches(spiritStack)) { + spiritStack.shrink(spirit.count); + break; + } + } + } + BlockHelper.updateAndNotifyState(level, worldPosition); + BlockHelper.updateAndNotifyState(level, worldPosition.above(2)); + } + } + } if (recipe != null) { if (acceleratorData != null) { boolean needsRecalibration = !acceleratorData.accelerators.stream().allMatch(ICrucibleAccelerator::canContinueAccelerating); @@ -212,6 +242,7 @@ public void tick() { } else { progress = 0; } + } else { spiritSpin += 1 + speed * 0.1f; diff --git a/src/main/java/com/sammy/malum/common/item/cosmetic/curios/CurioTokenOfGratitude.java b/src/main/java/com/sammy/malum/common/item/cosmetic/curios/CurioTokenOfGratitude.java index 9bf71c77a..24b800f59 100644 --- a/src/main/java/com/sammy/malum/common/item/cosmetic/curios/CurioTokenOfGratitude.java +++ b/src/main/java/com/sammy/malum/common/item/cosmetic/curios/CurioTokenOfGratitude.java @@ -32,6 +32,7 @@ public class CurioTokenOfGratitude extends MalumCurioItem implements IEventRespo public static final UUID DELLY = validateForGratitude("7c3a2f88-f6b8-47ff-971d-73544eb5ae62"); public static final UUID LOFI = validateForGratitude("85715c8f-4f71-4ebd-9f3a-96dfd8e8e390"); public static final UUID CREECHURE = validateForGratitude("9acb0ed8-a6a3-46bc-a6ff-23c176e5ec3d"); + public static final UUID SALT = validateForGratitude("3585541f-8289-45a9-b8d7-6729bb1d95da"); static { addTransScarf(validateForGratitude("72155db3-d5e4-47fa-8200-c85bf7f87370")); //copilot says it's 'Snake' @@ -52,7 +53,7 @@ public CurioTokenOfGratitude(Properties builder) { @Override public void curioTick(SlotContext slotContext, ItemStack stack) { if (slotContext.entity() instanceof Player player) { - if (player.getUUID().equals(SAMMY) || player.getUUID().equals(LOFI) || player.getUUID().equals(CREECHURE)) { + if (player.getUUID().equals(SAMMY) || player.getUUID().equals(LOFI) || player.getUUID().equals(CREECHURE) || player.getUUID().equals(SALT)) { int interval = player.isCrouching() ? 10 : 4000; if (player.level().getGameTime() % interval == 0) { SoundEvent soundEvent = player.getRandom().nextInt(8) == 0 ? SoundEvents.CAT_PURREOW : SoundEvents.CAT_PURR; diff --git a/src/main/java/com/sammy/malum/data/MalumLang.java b/src/main/java/com/sammy/malum/data/MalumLang.java index 789a32755..2717f19e5 100644 --- a/src/main/java/com/sammy/malum/data/MalumLang.java +++ b/src/main/java/com/sammy/malum/data/MalumLang.java @@ -97,7 +97,11 @@ protected void addTranslations() { String[] replacements = new String[]{"ns_", "rs_", "ts_"}; String alteredPath = e.getId().getPath(); for (String replacement : replacements) { - alteredPath = alteredPath.replaceFirst("s_", "'s_"); + int index = alteredPath.indexOf(replacement); + if (index != -1) { + alteredPath = alteredPath.replaceFirst("s_", "'s_"); + break; + } } String name = DataHelper.toTitleCase(alteredPath, "_"); add("effect.malum." + ForgeRegistries.MOB_EFFECTS.getKey(e.get()).getPath(), name);