From 9e5454dcdab5e7f6006c486ccc400b31f4efc1e7 Mon Sep 17 00:00:00 2001 From: "yrsegal@gmail.com" Date: Thu, 28 Mar 2024 12:23:41 -0400 Subject: [PATCH] fix some visual bugs --- src/generated/resources/assets/malum/lang/en_us.json | 6 +++--- .../malum/client/screen/codex/ArcanaCodexHelper.java | 2 +- .../sammy/malum/common/spiritrite/ArcaneRiteType.java | 4 ++-- .../com/sammy/malum/compability/jei/JEIHandler.java | 10 +++++++--- src/main/java/com/sammy/malum/data/MalumLang.java | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/generated/resources/assets/malum/lang/en_us.json b/src/generated/resources/assets/malum/lang/en_us.json index e2153a0e0..c633c6121 100644 --- a/src/generated/resources/assets/malum/lang/en_us.json +++ b/src/generated/resources/assets/malum/lang/en_us.json @@ -822,7 +822,7 @@ "malum.gui.book.entry.page.text.cthonic_gold.4": "I'm not sure what use this metal will have quite yet, but I doubt I will be short for applications for a material with such atypical properties.", "malum.gui.book.entry.page.text.earthen_rite": "A simple aura rite, while active nearby friendly beings will find their bodies are tougher and more resistant to damage.", "malum.gui.book.entry.page.text.earthen_rite.hover": "Applies the Gaian Bulwark effect, increasing armor by four and armor toughness by two.", - "malum.gui.book.entry.page.text.elaborate_brooch.1": "Brooches symbolize a sacrifice, but that sacrifice can seem abstract, even comical, from the outside. A necklace is not so different from a belt in form, and by stripping away notions of $ifashion/$, I can wear a belt's power around my neck.", + "malum.gui.book.entry.page.text.elaborate_brooch.1": "Brooches symbolize a sacrifice, but that sacrifice can seem abstract, even comical, from the outside. A necklace is not so different from a belt in form, and by stripping away notions of $ifashion/$ and propriety, I can wear a belt's power around my neck.", "malum.gui.book.entry.page.text.eldritch_arcana.1": "Eldritch arcana is a mystery to me. It has no impulse, none that I can understand, at least. And yet, it doesn't act like raw arcana. It changes, emboldens, enlightens... Raw arcana merely amplifies. This... this alters.", "malum.gui.book.entry.page.text.eldritch_arcana.2": "I am not sure I understand what impulse creates this arcana. I find it in very few beings, and those I find it in are those who already defy explanation. But if it must be the pair to raw arcana, then that would imply that it's the impulse of endings, the $ilast/$ principle of all things.\n\nI do not like that thought.", "malum.gui.book.entry.page.text.elemental_arcana.aerial.1": "Aerial arcana is the simplest of the elemental arcana. That very simplicity that gives it its utility. I have heard tales of magi soaring on the winds, ruling the skies. If any arcana is to make those tales achievable, it is this.", @@ -848,7 +848,7 @@ "malum.gui.book.entry.page.text.focus_crystals.1": "By applying differing qualities of arcana to an Alchemical Impetus, I can cause more mundane crystals to be formed.", "malum.gui.book.entry.page.text.focus_metals.1": "By altering the composition of the Alchemical Impetus with niter, sulfur, and cthonic gold, it is possible to alter the artifact in such a way that allows for forming nodes of most pure metals.", "malum.gui.book.entry.page.text.focus_metals.2": "It isn't particularly efficient or fast, but it is certainly better than having to mine for every ingot I need. Each metallic node can be processed at a furnace of any kind into two thirds of an ingot worth of metal nuggets.", - "malum.gui.book.entry.page.text.glass_brooch.1": "The Runic Brooch works well, but my hands are not the only symbolic home of power. I can instead imbue them into my blood with the Glass Brooch, stripping a portion of my physical health away to imbue two runes within my chest.", + "malum.gui.book.entry.page.text.glass_brooch.1": "The Runic Brooch works well, but my hands are not the only symbolic home of power. I can instead imbue them into my blood with the Glass Brooch, stripping a portion of my physical health away to inscribe two runes within my chest.", "malum.gui.book.entry.page.text.gluttonous_brooch.1": "Some sacrifices are mental, rather than physical. The Gluttonous Brooch strips away satiation, causing my body to crave food even when it should be full. In exchange for this, my loosened belly has the space to accommodate an additional belt.", "malum.gui.book.entry.page.text.greater_aerial_rite": "An advanced rite, by twisting the power of the air, blocks before the totem will be made to fall as though they were sand. Nothing Silk Touch cannot grab will be affected, though.", "malum.gui.book.entry.page.text.greater_aerial_rite.hover": "Causes targeted blocks to fall downwards if there is nothing underneath them.", @@ -908,7 +908,7 @@ "malum.gui.book.entry.page.text.runeworking.1": "Every trinket I've made thus far has proven to have its place in my work, but it has become somewhat frustrating to have to spend time choosing out my jewelery before every task. After all, some effects may be able to be divorced from their genesis.", "malum.gui.book.entry.page.text.runeworking.2": "The process of Runeworking allows me to do so via Brooches and Runes. The brooch is simply the focus I have chosen, its placement over the heart symbolizing the price of suffering inherent to runic power.", "malum.gui.book.entry.page.text.runeworking.3": "To begin, I will need to create a Runic Workbench to inscribe these runes. The simplest beginning will be the Runic Brooch, which will allow me to equip what I have created.", - "malum.gui.book.entry.page.text.runic_brooch.1": "The simplest of brooches is the Runic Brooch. When worn, the Runic Brooch will, by stripping me of the option of a ring's power from my hand, grant me the opportunity to hold a rune in each palm.", + "malum.gui.book.entry.page.text.runic_brooch.1": "The simplest of brooches is the Runic Brooch. It represents the quest for power at price, and the bloodied palms with which one grasps a razored enlightenment. When worn, by symbolically removing one of my hands' capacity to channel magic from a ring, it will grant me the opportunity to inscribe a rune in each palm.", "malum.gui.book.entry.page.text.sacred_rite": "A simple rite, while active it will slowly mend the wounds of nearby entities.\n Avoids hostiles.", "malum.gui.book.entry.page.text.sacred_rite.hover": "Recovers one heart of damage every two seconds.", "malum.gui.book.entry.page.text.scythes.1": "After several inert attempts, I have socketed Soulstone into a weapon that can reliably harvest these spirit crystals. The long blade allows time for the body to die before I strike the soul, while also providing a wide sweep attack. It isn't as sharp as a sword, but for my purposes, it will do nicely.", diff --git a/src/main/java/com/sammy/malum/client/screen/codex/ArcanaCodexHelper.java b/src/main/java/com/sammy/malum/client/screen/codex/ArcanaCodexHelper.java index 050a655e0..bb3fa7353 100644 --- a/src/main/java/com/sammy/malum/client/screen/codex/ArcanaCodexHelper.java +++ b/src/main/java/com/sammy/malum/client/screen/codex/ArcanaCodexHelper.java @@ -339,7 +339,7 @@ public static void renderWrappingText(GuiGraphics guiGraphics, String text, int String noFormatting = ChatFormatting.stripFormatting(line.toString()); - if (chr == '\n' && !(noFormatting == null || noFormatting.isEmpty())) { + if (chr == '\n' && noFormatting != null) { line = newLine(lines, italic, bold, strikethrough, underline, obfuscated, line); } } else if (chr == '$') { diff --git a/src/main/java/com/sammy/malum/common/spiritrite/ArcaneRiteType.java b/src/main/java/com/sammy/malum/common/spiritrite/ArcaneRiteType.java index acc815010..1243158dd 100644 --- a/src/main/java/com/sammy/malum/common/spiritrite/ArcaneRiteType.java +++ b/src/main/java/com/sammy/malum/common/spiritrite/ArcaneRiteType.java @@ -71,11 +71,11 @@ public void doRiteEffect(TotemBaseBlockEntity totemBase) { LodestoneBlockEntityInventory inventoryForAltar = iMalumSpecialItemAccessPoint.getSuppliedInventory(); ItemStack stack = inventoryForAltar.getStackInSlot(0); var recipe = SpiritTransmutationRecipe.getRecipe(level, stack); - if (recipe != null) { + if (recipe != null && !inventoryForAltar.extractItem(0, 1, true).isEmpty()) { Vec3 itemPos = iMalumSpecialItemAccessPoint.getItemPos(); level.addFreshEntity(new ItemEntity(level, itemPos.x, itemPos.y, itemPos.z, recipe.output.copy())); MALUM_CHANNEL.send(PacketDistributor.TRACKING_CHUNK.with(() -> level.getChunkAt(p)), new BlightTransformItemParticlePacket(List.of(ARCANE_SPIRIT.identifier), itemPos)); - inventoryForAltar.getStackInSlot(0).shrink(1); + inventoryForAltar.extractItem(0, 1, false); BlockHelper.updateAndNotifyState(level, p); } } diff --git a/src/main/java/com/sammy/malum/compability/jei/JEIHandler.java b/src/main/java/com/sammy/malum/compability/jei/JEIHandler.java index 313a4191a..40cfa3af6 100644 --- a/src/main/java/com/sammy/malum/compability/jei/JEIHandler.java +++ b/src/main/java/com/sammy/malum/compability/jei/JEIHandler.java @@ -93,16 +93,20 @@ public void registerRecipes(@Nonnull IRecipeRegistration registry) { } registry.addRecipes(TRANSMUTATION, groups.values().stream() + .map(list -> list.stream().filter(it -> !it.output.isEmpty() && !it.ingredient.isEmpty()).collect(Collectors.toList())) .map(SpiritTransmutationWrapper::new) .collect(Collectors.toList())); registry.addRecipes(TRANSMUTATION, leftovers.stream() - .map(List::of) + .filter(it -> !it.output.isEmpty() && !it.ingredient.isEmpty()) + .map(List::of) .map(SpiritTransmutationWrapper::new) .collect(Collectors.toList())); - registry.addRecipes(FOCUSING, SpiritFocusingRecipe.getRecipes(level)); + registry.addRecipes(FOCUSING, SpiritFocusingRecipe.getRecipes(level).stream() + .filter(it -> !it.output.isEmpty()).collect(Collectors.toList())); registry.addRecipes(RITES, SpiritRiteRegistry.RITES); - registry.addRecipes(SPIRIT_REPAIR, SpiritRepairRecipe.getRecipes(level)); + registry.addRecipes(SPIRIT_REPAIR, SpiritRepairRecipe.getRecipes(level).stream() + .filter(it -> !it.inputs.isEmpty()).collect(Collectors.toList())); if (FarmersDelightCompat.LOADED) { FarmersDelightCompat.LoadedOnly.addInfo(registry); } diff --git a/src/main/java/com/sammy/malum/data/MalumLang.java b/src/main/java/com/sammy/malum/data/MalumLang.java index 2c50beee8..8f84a9d57 100644 --- a/src/main/java/com/sammy/malum/data/MalumLang.java +++ b/src/main/java/com/sammy/malum/data/MalumLang.java @@ -596,7 +596,7 @@ protected void addTranslations() { addEntryHeader("runic_brooch", "Runic Brooch", "Power in the palms"); addHeadline("runic_brooch", "Runic Brooch"); addPages("runic_brooch", - "The simplest of brooches is the Runic Brooch. It represents the quest for power at price, and the bloodied palms with which one grasps a razored enlightenment. When worn, by symbolically removing one of my hands capacity to channel magic from a ring, it will grant me the opportunity to inscribe a rune in each palm."); + "The simplest of brooches is the Runic Brooch. It represents the quest for power at price, and the bloodied palms with which one grasps a razored enlightenment. When worn, by symbolically removing one of my hands' capacity to channel magic from a ring, it will grant me the opportunity to inscribe a rune in each palm."); addEntryHeader("glass_brooch", "Glass Brooch", "Fragile power"); addHeadline("glass_brooch", "Glass Brooch");