Skip to content

Commit

Permalink
Release Ready
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Oct 26, 2024
1 parent 106a8f7 commit 4e0675a
Show file tree
Hide file tree
Showing 48 changed files with 1,083 additions and 481 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parchmentVersion=2023.09.03-1.20.1
mixinVersion=0.8.5
modName=Malum
modId=malum
modVersion=1.6.4
modVersion=1.6.5
modLicense=All Rights Reserved
modGroupId=com.sammy.malum
modAuthors=Sammy Semicolon
Expand Down
24 changes: 19 additions & 5 deletions src/generated/resources/assets/malum/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,18 @@
"effect.malum.wicked_intent.description": "You bring forth a powerful counter attack, increasing scythe proficiency for just one strike.",
"effect.malum.zephyrs_courage": "Zephyr's Courage",
"effect.malum.zephyrs_courage.description": "The zephyr propels you forward, increasing your movement speed.",
"enchantment.malum.ascension": "Ascension",
"enchantment.malum.ascension.desc": "Enables the Scythe to propel the player upwards, pushing away nearby enemies when used.",
"enchantment.malum.haunted": "Haunted",
"enchantment.malum.haunted.desc": "Deals extra magic damage.",
"enchantment.malum.haunted.desc": "Improves the Weapon's Magic Damage",
"enchantment.malum.rebound": "Rebound",
"enchantment.malum.rebound.desc": "Allows the item to be thrown much like a boomerang, cooldown decreases with tier.",
"enchantment.malum.rebound.desc": "Allows the Scythe to be thrown much like a boomerang when used.",
"enchantment.malum.replenishing": "Replenishing",
"enchantment.malum.replenishing.desc": "Reduces the Staff's ranged attack cooldown when dealing melee damage.",
"enchantment.malum.spirit_plunder": "Spirit Plunder",
"enchantment.malum.spirit_plunder.desc": "Increases the amount of spirits created when shattering a soul.",
"enchantment.malum.spirit_plunder.desc": "Reaps extra Spirits when killing an enemy.",
"enchantment.malum.winded": "Winded",
"enchantment.malum.winded.desc": "Improves the Scythe's attack rate.",
"entity.malum.auric_flame_bolt": "Auric Flame Bolt",
"entity.malum.draining_bolt": "Draining Bolt",
"entity.malum.etheric_nitrate": "Etheric Nitrate",
Expand Down Expand Up @@ -541,6 +546,7 @@
"item.malum.soul_hunter_cloak": "Soulhunter Cloak",
"item.malum.soul_hunter_leggings": "Soulhunter Leggings",
"item.malum.soul_hunter_robe": "Soulhunter Robe",
"item.malum.soul_of_a_scythe": "Soul of A Scythe",
"item.malum.soul_stained_steel_axe": "Soulstained Steel Axe",
"item.malum.soul_stained_steel_boots": "Soulstained Steel Boots",
"item.malum.soul_stained_steel_chestplate": "Soulstained Steel Chestplate",
Expand Down Expand Up @@ -799,9 +805,11 @@
"malum.gui.book.entry.page.headline.runic_brooch": "Runic Brooch",
"malum.gui.book.entry.page.headline.scythes": "Scythes",
"malum.gui.book.entry.page.headline.scythes.enchanting": "Enchanting a Scythe",
"malum.gui.book.entry.page.headline.scythes.enchanting.ascension": "Ascension",
"malum.gui.book.entry.page.headline.scythes.enchanting.haunted": "Haunted",
"malum.gui.book.entry.page.headline.scythes.enchanting.rebound": "Rebound",
"malum.gui.book.entry.page.headline.scythes.enchanting.spirit_plunder": "Spirit Plunder",
"malum.gui.book.entry.page.headline.scythes.enchanting.winded": "Winded",
"malum.gui.book.entry.page.headline.shielding_apparatus": "Shielding Apparatus",
"malum.gui.book.entry.page.headline.soulhunter_gear": "Soulhunter Gear",
"malum.gui.book.entry.page.headline.soulstained_armor": "Soulstained Armor",
Expand Down Expand Up @@ -1061,9 +1069,11 @@
"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.",
"malum.gui.book.entry.page.text.scythes.2": "What I had managed to do before with careful, painstaking experiments, the scythe did in a matter of seconds. The souls of the monsters I slew shattered, streaming bits of deeply hued matter towards me: the spirit crystals. Finally, my research can begin in earnest.",
"malum.gui.book.entry.page.text.scythes.enchanting.1": "At its core, the scythe enchants like other weapons or tools I've used. It has its own set of enchantments, of course, due to its differing nature, but can take Unbreaking and the like as well as a sword can.",
"malum.gui.book.entry.page.text.scythes.enchanting.haunted.1": "The Soulstone can be used in ways other than just shattering the soul. By enchanting the stone, the swing of the blade gains a bit of the strange properties of the stone, cutting deeper into the target's soul and doing extra magic damage.",
"malum.gui.book.entry.page.text.scythes.enchanting.rebound.1": "By working my enchantments into the wooden handle, I found that my scythe can be made to return to my hand. As strange as it looks, using my scythe as a boomerang can be useful to cut through hordes of monsters. The stronger the enchantment, the less time until I can throw the scythe again.",
"malum.gui.book.entry.page.text.scythes.enchanting.ascension.1": "A fascinating bit of symbolism is the role of the tool in raising man up. Civilization was built by the food a scythe harvests. By harnessing the purpose of the blade as a tool, I can… well, raise myself, the winds I rise on sharp as the blade itself to my foes. Rebound is incompatible; literally, at cross purposes with this enchantment.",
"malum.gui.book.entry.page.text.scythes.enchanting.haunted.1": "Soulstone interacts with souls, obviously. The crudest and simplest use is blunt force, shattering a soul like a pane of glass. If I condense the arcane power of the stone, it would therefore hit and shatter harder, perhaps even damaging the body with the backlash.",
"malum.gui.book.entry.page.text.scythes.enchanting.rebound.1": "A scythe reaps. That is its purpose, and that can be harnessed. Should a reaper need my hand? By harnessing the purpose of the blade as a weapon, I can let it act on its own to some extent, as if it were a boomerang. The stronger the enchantment, the sooner it’s ready to throw again.",
"malum.gui.book.entry.page.text.scythes.enchanting.spirit_plunder.1": "This is not a perfect method. Some of the soul is unavoidably lost in the moment between blade and stone. But by enchanting the blade, that loss can be mitigated, and more of the soul condensed. This unfortunately strains the stone, and can result in my scythe's durability decreasing.",
"malum.gui.book.entry.page.text.scythes.enchanting.winded.1": "If power can be concentrated, it can be diffused. Interestingly, by diffusing the power that would be drawn together for Haunted into the rest of the scythe, the entire weapon gains a conceptual “lightness”, making its swings lighter and faster.",
"malum.gui.book.entry.page.text.shielding_apparatus.1": "By utilizing the multiphasic property of Soulstained Steel, the Shielding Apparatus provides a chance for the damage imposed upon the impetus to be $icompletely/$ absorbed, while also slightly stabilizing the focusing process. It does, however, reduce focusing speed.",
"malum.gui.book.entry.page.text.soulhunter_gear.1": "Spirit Fabric is an insulator, but that doesn't mean it has to dampen magic. This set of armor is designed to focus that magic, effectively amplifying the user's arcane abilities. Unfortunately, it's not exactly the strongest of materials, and it protects me just about as much as leather clothing.",
"malum.gui.book.entry.page.text.soulstained_armor.1": "Much like the Soulstained Scythe, I have improved upon my mundane iron armor to create the Soulstained Armor. To avoid the metal touching me directly, and so jostling and rubbing against my very soul, I used thin plates of Twisted Rock beneath the metal of the armor.",
Expand Down Expand Up @@ -1259,6 +1269,8 @@
"malum.gui.book.entry.sacred_rite.description": "Invigorating the soul",
"malum.gui.book.entry.scythes": "Scythes",
"malum.gui.book.entry.scythes.description": "Harvest",
"malum.gui.book.entry.scythes.enchanting": "Enchanting a Scythe",
"malum.gui.book.entry.scythes.enchanting.description": "Two ways to skin a soul",
"malum.gui.book.entry.shielding_apparatus": "Shielding Apparatus",
"malum.gui.book.entry.shielding_apparatus.description": "A bulwark against the storm",
"malum.gui.book.entry.soulhunter_gear": "Soulhunter Gear",
Expand Down Expand Up @@ -1402,6 +1414,7 @@
"malum.gui.curio.effect.crits": "Critical Strikes",
"malum.gui.curio.effect.eat_rotten": "Rotten Foods are Tastier",
"malum.gui.curio.effect.enchanted_explosions": "Explosions are Enchanted with %s",
"malum.gui.curio.effect.enhanced_maneuvers": "Augments Rebound and Ascension",
"malum.gui.curio.effect.erratic_damage": "Erratic Damage Output",
"malum.gui.curio.effect.explosion_drops_collected": "Automatic Collection of Explosion Drops",
"malum.gui.curio.effect.explosions_spare_valuables": "Protects Valuable Items from Explosions",
Expand Down Expand Up @@ -1644,6 +1657,7 @@
"malum.subtitle.scythe_spins_happily": "Scythe spins happily",
"malum.subtitle.scythe_sweeps": "Scythe sweeps",
"malum.subtitle.scythe_thrown": "Scythe thrown",
"malum.subtitle.scythe_user_ascends": "Scythe user ascends",
"malum.subtitle.shielding_apparatus_shields": "Shielding apparatus shields",
"malum.subtitle.song_of_the_void": "Song of the void",
"malum.subtitle.soul_stained_steel_break": "Block broken",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"malum:malignant_stronghold_leggings",
"malum:malignant_stronghold_boots",
"malum:weight_of_worlds",
"malum:edge_of_deliverance",
"malum:erosion_scepter",
"malum:mnemonic_hex_staff",
"malum:staff_of_the_auric_flame",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"values": [
"malum:crude_scythe",
"malum:soul_stained_steel_scythe",
"malum:creative_scythe",
"malum:mnemonic_hex_staff",
"malum:staff_of_the_auric_flame",
"malum:erosion_scepter"
]
}
1 change: 1 addition & 0 deletions src/generated/resources/data/malum/tags/items/scythe.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"values": [
"malum:crude_scythe",
"malum:soul_stained_steel_scythe",
"malum:edge_of_deliverance",
"malum:creative_scythe"
]
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"values": [
"malum:mnemonic_hex_staff",
"malum:staff_of_the_auric_flame",
"malum:erosion_scepter",
"#malum:scythe",
"#malum:staff",
"malum:tyrving",
"malum:crude_scythe",
"malum:soul_stained_steel_scythe",
"malum:creative_scythe",
"malum:weight_of_worlds",
"malum:soul_stained_steel_axe",
"malum:soul_stained_steel_pickaxe",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.sammy.malum.client.renderer.entity;
package com.sammy.malum.client.renderer.entity.scythe;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import com.sammy.malum.client.*;
import com.sammy.malum.common.entity.boomerang.ScytheBoomerangEntity;
import com.sammy.malum.common.entity.scythe.ScytheBoomerangEntity;
import com.sammy.malum.common.item.*;
import com.sammy.malum.common.item.curiosities.weapons.scythe.MalumScytheItem;
import com.sammy.malum.registry.client.*;
Expand All @@ -13,43 +13,46 @@
import net.minecraft.client.renderer.entity.ItemRenderer;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.renderer.texture.TextureAtlas;
import net.minecraft.client.resources.model.BakedModel;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.util.*;
import net.minecraft.world.entity.*;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.*;
import team.lodestar.lodestone.registry.client.*;
import team.lodestar.lodestone.systems.rendering.*;
import team.lodestar.lodestone.systems.rendering.rendeertype.*;

import java.awt.*;

import static com.sammy.malum.MalumMod.malumPath;

public class ScytheBoomerangEntityRenderer extends EntityRenderer<ScytheBoomerangEntity> {


public final ItemRenderer itemRenderer;

public ScytheBoomerangEntityRenderer(EntityRendererProvider.Context context) {
super(context);
this.itemRenderer = context.getItemRenderer();
this.shadowRadius = 2F;
this.shadowStrength = 0.5F;
}

@Override
public void render(ScytheBoomerangEntity entityIn, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource bufferIn, int packedLightIn) {
poseStack.pushPose();
var itemstack = entityIn.getItem();
var model = this.itemRenderer.getModel(itemstack, entityIn.level(), null, 1);
poseStack.mulPose(Axis.XP.rotationDegrees(90F));
poseStack.scale(2f, 2f, 2f);
if (entityIn.isEnhanced()) {
Vec3 direction = entityIn.getDeltaMovement().normalize();
float yRot = ((float) (Mth.atan2(direction.x, direction.z)));
poseStack.mulPose(Axis.YP.rotation(yRot+1.57f));
}
else {
poseStack.mulPose(Axis.XP.rotationDegrees(90f));
}
poseStack.mulPose(Axis.ZP.rotation((entityIn.age + partialTicks) * 0.9f));
poseStack.scale(2f, 2, 1.5f);
itemRenderer.render(itemstack, itemstack.getItem() instanceof MalumScytheItem ? ItemDisplayContext.NONE : ItemDisplayContext.FIXED, false, poseStack, bufferIn, packedLightIn, OverlayTexture.NO_OVERLAY, model);
poseStack.popPose();

var spirit = entityIn.getItem().getItem() instanceof ISpiritAffiliatedItem affiliatedItem ? affiliatedItem.getDefiningSpiritType() : null;
final boolean isMagical = spirit != null;
boolean isMagical = spirit != null;
var renderType = isMagical ?
LodestoneRenderTypeRegistry.ADDITIVE_TWO_SIDED_TEXTURE_TRIANGLE.applyAndCache(MalumRenderTypeTokens.CONCENTRATED_TRAIL) :
LodestoneRenderTypeRegistry.TRANSPARENT_TWO_SIDED_TEXTURE_TRIANGLE.applyAndCache(MalumRenderTypeTokens.CONCENTRATED_TRAIL, ShaderUniformHandler.LUMITRANSPARENT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,15 @@ public static void setupEntries(ArcanaProgressionScreen screen) {
.addPage(new HeadlineTextPage("scythes", "scythes.1"))
.addPage(CraftingPage.scythePage(ItemRegistry.CRUDE_SCYTHE.get(), Items.IRON_INGOT, PROCESSED_SOULSTONE.get()))
.addPage(new TextPage("scythes.2"))
.addPage(new HeadlineTextPage("scythes.enchanting", "scythes.enchanting.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.haunted", "scythes.enchanting.haunted.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.spirit_plunder", "scythes.enchanting.spirit_plunder.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.rebound", "scythes.enchanting.rebound.1"))
.addReference(new EntryReference(ENCHANTED_BOOK,
BookEntry.build("scythes.enchanting")
.addPage(new HeadlineTextPage("scythes.enchanting", "scythes.enchanting.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.spirit_plunder", "scythes.enchanting.spirit_plunder.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.haunted", "scythes.enchanting.haunted.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.winded", "scythes.enchanting.winded.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.rebound", "scythes.enchanting.rebound.1"))
.addPage(new HeadlineTextPage("scythes.enchanting.ascension", "scythes.enchanting.ascension.1"))
))
);

screen.addEntry("spirit_infusion", 0, 5, b -> b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,29 @@

public class HauntedEnchantment extends Enchantment {
public HauntedEnchantment() {
super(Rarity.UNCOMMON, EnchantmentRegistry.SCYTHE_OR_STAFF, new EquipmentSlot[]{EquipmentSlot.MAINHAND, EquipmentSlot.OFFHAND});
super(Rarity.UNCOMMON, EnchantmentRegistry.MAGIC_CAPABLE_WEAPON, new EquipmentSlot[]{EquipmentSlot.MAINHAND, EquipmentSlot.OFFHAND});
}

@Override
protected boolean checkCompatibility(Enchantment pOther) {
return !pOther.equals(EnchantmentRegistry.WINDED.get()) && super.checkCompatibility(pOther);
}

public static void addMagicDamage(ItemAttributeModifierEvent event) {
if (event.getSlotType().equals(EquipmentSlot.MAINHAND)) {
ItemStack itemStack = event.getItemStack();
var itemStack = event.getItemStack();
int enchantmentLevel = itemStack.getEnchantmentLevel(EnchantmentRegistry.HAUNTED.get());
if (enchantmentLevel > 0) {
UUID uuid = LodestoneAttributeRegistry.UUIDS.get(LodestoneAttributeRegistry.MAGIC_DAMAGE);
final Attribute magicDamage = LodestoneAttributeRegistry.MAGIC_DAMAGE.get();
var uuid = LodestoneAttributeRegistry.UUIDS.get(LodestoneAttributeRegistry.MAGIC_DAMAGE);
var magicDamage = LodestoneAttributeRegistry.MAGIC_DAMAGE.get();
if (event.getOriginalModifiers().containsKey(magicDamage)) {
AttributeModifier attributeModifier = null;
if (event.getOriginalModifiers().get(magicDamage).size() > 0) {
if (!event.getOriginalModifiers().get(magicDamage).isEmpty()) {
attributeModifier = event.getOriginalModifiers().get(magicDamage).iterator().next();
}
if (attributeModifier != null) {
final double amount = attributeModifier.getAmount() + enchantmentLevel;
AttributeModifier newMagicDamage = new AttributeModifier(uuid, "Weapon magic damage", amount, AttributeModifier.Operation.ADDITION);
double amount = attributeModifier.getAmount() + enchantmentLevel;
var newMagicDamage = new AttributeModifier(uuid, "Weapon magic damage", amount, AttributeModifier.Operation.ADDITION);
event.removeAttribute(magicDamage);
event.addModifier(magicDamage, newMagicDamage);
}
Expand Down
Loading

0 comments on commit 4e0675a

Please sign in to comment.