Skip to content

Commit

Permalink
boyyfrieneddddd :pleading:
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Apr 10, 2024
1 parent 48b7c61 commit aec72e4
Show file tree
Hide file tree
Showing 86 changed files with 453 additions and 247 deletions.
10 changes: 10 additions & 0 deletions src/generated/resources/assets/malum/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,19 +462,28 @@
"item.malum.rune_of_bolstering": "Rune of Bolstering",
"item.malum.rune_of_culling": "Rune of Culling",
"item.malum.rune_of_dexterity": "Rune of Dexterity",
"item.malum.rune_of_fervor": "Rune of Fervor",
"item.malum.rune_of_haste": "Rune of Haste",
"item.malum.rune_of_idle_restoration": "Rune of Idle Restoration",
"item.malum.rune_of_igneous_solace": "Rune of Igneous Solace",
"item.malum.rune_of_loyalty": "Rune of Loyalty",
"item.malum.rune_of_motion": "Rune of Motion",
"item.malum.rune_of_reactive_shielding": "Rune of Reactive Shielding",
"item.malum.rune_of_reinforcement": "Rune of Reinforcement",
"item.malum.rune_of_sacrificial_empowerment": "Rune of Sacrificial Empowerment",
"item.malum.rune_of_spell_mastery": "Rune of Spell Mastery",
"item.malum.rune_of_the_aether": "Rune of the Aether",
"item.malum.rune_of_the_challenger": "Rune of the Challenger",
"item.malum.rune_of_the_extinguisher": "Rune of the Extinguisher",
"item.malum.rune_of_the_heretic": "Rune of the Heretic",
"item.malum.rune_of_the_seas": "Rune of the Seas",
"item.malum.rune_of_toughness": "Rune of Toughness",
"item.malum.rune_of_twinned_duration": "Rune of Twinned Duration",
"item.malum.rune_of_unnatural_stamina": "Rune of Unnatural Stamina",
"item.malum.rune_of_volatile_distortion": "Rune of Volatile Distortion",
"item.malum.rune_of_warding": "Rune of Warding",
"item.malum.runewood_boat": "Runewood Boat",
"item.malum.runewood_tablet": "Runewood Tablet",
"item.malum.runic_brooch": "Runic Brooch",
"item.malum.runic_sap": "Runic Sap",
"item.malum.runic_sapball": "Runic Sapball",
Expand All @@ -501,6 +510,7 @@
"item.malum.soul_stained_steel_shovel": "Soulstained Steel Shovel",
"item.malum.soul_stained_steel_sword": "Soulstained Steel Sword",
"item.malum.soulwood_boat": "Soulwood Boat",
"item.malum.soulwood_tablet": "Soulwood Tablet",
"item.malum.spectral_lens": "Spectral Lens",
"item.malum.spectral_optic": "Spectral Optic",
"item.malum.spirit_fabric": "Spirit Fabric",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_fervor"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_loyalty"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_motion"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_the_aether"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_the_challenger"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_the_extinguisher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_the_seas"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runes/rune_of_warding"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/runewood_tablet"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "malum:item/soulwood_tablet"
}
}
8 changes: 8 additions & 0 deletions src/generated/resources/data/curios/tags/items/rune.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
"malum:rune_of_dexterity",
"malum:rune_of_aliment_cleansing",
"malum:rune_of_reactive_shielding",
"malum:rune_of_fervor",
"malum:rune_of_motion",
"malum:rune_of_loyalty",
"malum:rune_of_warding",
"malum:rune_of_haste",
"malum:rune_of_the_aether",
"malum:rune_of_the_seas",
"malum:rune_of_the_challenger",
"malum:rune_of_the_extinguisher",
"malum:rune_of_bolstering",
"malum:rune_of_sacrificial_empowerment",
"malum:rune_of_spell_mastery",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "malum:runeworking",
"output": {
"item": "malum:rune_of_haste"
"item": "malum:rune_of_fervor"
},
"primaryInput": {
"count": 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"values": [
"minecraft:snowy_plains",
"minecraft:snowy_taiga",
"minecraft:frozen_river",
"minecraft:snowy_beach"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"remove": [
"#forge:is_snowy"
],
"values": [
"#minecraft:is_forest"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"remove": [
"#forge:is_snowy"
],
"values": [
"#forge:is_plains",
"#forge:is_mountain",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected List<ModelPart> getGlowingParts() {
}
}

public void updateGlow(List<MalumRuneCurioItem> runes) {
public void updateGlow(List<AbstractRuneCurioItem> runes) {
activeGlows.clear();
activeGlows.addAll(runes.stream().map(r -> r.spiritType).toList());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.mojang.blaze3d.systems.*;
import com.mojang.blaze3d.vertex.*;
import com.sammy.malum.client.screen.codex.screens.*;
import com.sammy.malum.core.systems.rites.*;
import com.sammy.malum.common.spiritrite.*;
import com.sammy.malum.core.systems.ritual.*;
import com.sammy.malum.core.systems.spirit.*;
import com.sammy.malum.registry.client.*;
Expand Down Expand Up @@ -86,8 +86,8 @@ public static void renderRitualIcon(MalumRitualType rite, PoseStack stack, boole
renderRiteIcon(rite.getIcon(), rite.spirit, stack, corrupted, glowAlpha, x, y, 0);
}

public static void renderRiteIcon(MalumRiteType rite, PoseStack stack, boolean corrupted, float glowAlpha, int x, int y) {
renderRiteIcon(rite.getIcon(), rite.getEffectSpirit(), stack, corrupted, glowAlpha, x, y, 0);
public static void renderRiteIcon(TotemicRiteType rite, PoseStack stack, boolean corrupted, float glowAlpha, int x, int y) {
renderRiteIcon(rite.getIcon(), rite.getIdentifyingSpirit(), stack, corrupted, glowAlpha, x, y, 0);
}

public static void renderRiteIcon(ResourceLocation texture, MalumSpiritType spiritType, PoseStack stack, boolean corrupted, float glowAlpha, int x, int y) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ public static void setupEntries(ArcanaProgressionScreen screen) {
);

screen.addEntry("rune_of_haste", -13, 8, b -> b
.setWidgetConfig(w -> w.setIcon(RUNE_OF_HASTE))
.setWidgetConfig(w -> w.setIcon(RUNE_OF_FERVOR))
.addPage(new HeadlineTextPage<>("rune_of_haste", "rune_of_haste.1"))
.addPage(RuneworkingPage.fromOutput(RUNE_OF_HASTE.get()))
.addPage(RuneworkingPage.fromOutput(RUNE_OF_FERVOR.get()))
);

screen.addEntry("rune_of_aliment_cleansing", -13, 9, b -> b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import com.sammy.malum.client.screen.codex.*;
import com.sammy.malum.client.screen.codex.pages.text.*;
import com.sammy.malum.client.screen.codex.screens.*;
import com.sammy.malum.core.systems.rites.*;
import com.sammy.malum.common.spiritrite.*;
import net.minecraft.client.gui.*;

import java.util.*;

import static com.sammy.malum.client.screen.codex.ArcanaCodexHelper.*;

public class RiteEntryObject<T extends AbstractProgressionCodexScreen<T>> extends ProgressionEntryObject<T> {
public final MalumRiteType riteType;
public final TotemicRiteType riteType;

public RiteEntryObject(BookEntry<T> entry, int posX, int posY) {
super(entry, posX, posY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.sammy.malum.*;
import com.sammy.malum.client.screen.codex.pages.*;
import com.sammy.malum.client.screen.codex.screens.*;
import com.sammy.malum.core.systems.rites.*;
import com.sammy.malum.common.spiritrite.*;
import com.sammy.malum.core.systems.spirit.*;
import net.minecraft.client.*;
import net.minecraft.client.gui.*;
Expand All @@ -29,9 +29,9 @@ public class SpiritRiteRecipePage<T extends AbstractProgressionCodexScreen<T>> e

private static final ScreenParticleHolder RITE_PARTICLES = new ScreenParticleHolder();

private final MalumRiteType riteType;
private final TotemicRiteType riteType;

public SpiritRiteRecipePage(MalumRiteType riteType) {
public SpiritRiteRecipePage(TotemicRiteType riteType) {
super(MalumMod.malumPath("textures/gui/book/pages/spirit_rite_recipe_page.png"));
this.riteType = riteType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
import com.sammy.malum.*;
import com.sammy.malum.client.screen.codex.pages.*;
import com.sammy.malum.client.screen.codex.screens.*;
import com.sammy.malum.core.systems.rites.*;
import com.sammy.malum.common.spiritrite.*;
import net.minecraft.client.*;
import net.minecraft.client.gui.*;
import net.minecraft.network.chat.*;

import static com.sammy.malum.client.screen.codex.ArcanaCodexHelper.*;

public class SpiritRiteTextPage<T extends AbstractProgressionCodexScreen<T>> extends BookPage<T> {
public final MalumRiteType riteType;
public final TotemicRiteType riteType;
private final String translationKey;

public SpiritRiteTextPage(MalumRiteType riteType, String translationKey) {
public SpiritRiteTextPage(TotemicRiteType riteType, String translationKey) {
super(MalumMod.malumPath("textures/gui/book/pages/spirit_rite_page.png"));
this.riteType = riteType;
this.translationKey = translationKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,28 @@
import com.sammy.malum.*;
import com.sammy.malum.client.screen.codex.pages.*;
import com.sammy.malum.client.screen.codex.screens.*;
import com.sammy.malum.registry.client.*;
import com.sammy.malum.registry.common.*;
import net.minecraft.client.*;
import net.minecraft.client.gui.*;
import net.minecraft.client.multiplayer.*;
import net.minecraft.network.chat.*;
import net.minecraft.world.item.*;
import team.lodestar.lodestone.handlers.screenparticle.*;
import team.lodestar.lodestone.registry.common.particle.*;
import team.lodestar.lodestone.systems.particle.*;
import team.lodestar.lodestone.systems.particle.builder.*;
import team.lodestar.lodestone.systems.particle.data.*;
import team.lodestar.lodestone.systems.particle.data.spin.*;
import team.lodestar.lodestone.systems.particle.render_types.*;
import team.lodestar.lodestone.systems.particle.screen.*;

import static com.sammy.malum.client.screen.codex.ArcanaCodexHelper.*;

public class WeepingWellTextPage<T extends AbstractProgressionCodexScreen<T>> extends BookPage<T> {

private static final ScreenParticleHolder ITEM_PARTICLES = new ScreenParticleHolder();

private final String headlineTranslationKey;
private final String translationKey;
private final ItemStack stack;
Expand All @@ -36,9 +50,45 @@ public String translationKey() {

@Override
public void render(EntryScreen<T> screen, GuiGraphics guiGraphics, int left, int top, int mouseX, int mouseY, float partialTicks, boolean isRepeat) {
final ClientLevel level = Minecraft.getInstance().level;
var rand = level.random;
Component component = Component.translatable(headlineTranslationKey());
renderText(guiGraphics, component, left + 70 - Minecraft.getInstance().font.width(component.getString()) / 2, top + 5);
renderWrappingText(guiGraphics, translationKey(), left + 6, top + 75, 130);
if (!isRepeat) {
if (ScreenParticleHandler.canSpawnParticles) {
ITEM_PARTICLES.tick();
}
ScreenParticleHandler.renderParticles(ITEM_PARTICLES);
}
renderItem(screen, guiGraphics, stack, left + 63, top + 38, mouseX, mouseY);

if (level.getGameTime() % 4L == 0) {
if (ScreenParticleHandler.canSpawnParticles) {
int lifetime = 100;
float scale = 1.85f;
float spin = 6.28f * (level.getGameTime() / 240f);
final int x = left + 71;
final int y = top + 46;
ScreenParticleBuilder.create(LodestoneScreenParticleRegistry.STAR, ITEM_PARTICLES)
.setTransparencyData(GenericParticleData.create(0.02f, 0.4f, 0f).build())
.setSpinData(SpinParticleData.create(0).setSpinOffset(spin).build())
.setScaleData(GenericParticleData.create(0, scale*1.2f).build())
.setColorData(SpiritTypeRegistry.WICKED_SPIRIT.createMainColorData().setCoefficient(0.4f).build())
.setLifetime(lifetime)
.setDiscardFunction(SimpleParticleOptions.ParticleDiscardFunctionType.ENDING_CURVE_INVISIBLE)
.setRenderType(LodestoneScreenParticleRenderType.LUMITRANSPARENT)
.spawn(x, y);
ScreenParticleBuilder.create(ScreenParticleRegistry.SAW, ITEM_PARTICLES)
.setTransparencyData(GenericParticleData.create(0.02f, 0.2f, 0f).build())
.setSpinData(SpinParticleData.create(0).setSpinOffset(spin).build())
.setScaleData(GenericParticleData.create(0, scale*0.9f).build())
.setColorData(SpiritTypeRegistry.WICKED_SPIRIT.createMainColorData().setCoefficient(0.4f).build())
.setLifetime(lifetime)
.setDiscardFunction(SimpleParticleOptions.ParticleDiscardFunctionType.ENDING_CURVE_INVISIBLE)
.setRenderType(LodestoneScreenParticleRenderType.LUMITRANSPARENT)
.spawn(x, y);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.sammy.malum.common.block.storage.stand.*;
import com.sammy.malum.common.packets.particle.curiosities.rite.*;
import com.sammy.malum.common.spiritrite.*;
import com.sammy.malum.core.handlers.*;
import com.sammy.malum.core.systems.rites.*;
import com.sammy.malum.core.systems.spirit.*;
import com.sammy.malum.registry.common.*;
import com.sammy.malum.registry.common.block.*;
Expand All @@ -27,7 +27,7 @@

public class TotemBaseBlockEntity extends LodestoneBlockEntity {

public MalumRiteType rite;
public TotemicRiteType rite;
public List<MalumSpiritType> spirits = new ArrayList<>();
public Set<BlockPos> poles = new HashSet<>();
public Set<TotemPoleBlockEntity> cachedTotemPoleInstances = new HashSet<>();
Expand Down Expand Up @@ -74,7 +74,7 @@ public void tick() {
if (level.getBlockEntity(polePos) instanceof TotemPoleBlockEntity pole) {
addPole(pole);
} else {
MalumRiteType rite = SpiritRiteRegistry.getRite(spirits);
TotemicRiteType rite = SpiritRiteRegistry.getRite(spirits);
if (rite == null) {
endRite();
} else {
Expand Down Expand Up @@ -204,7 +204,7 @@ public void addPole(TotemPoleBlockEntity pole) {
}
}

public void completeRite(MalumRiteType rite) {
public void completeRite(TotemicRiteType rite) {
level.playSound(null, worldPosition, SoundRegistry.TOTEM_ACTIVATED.get(), SoundSource.BLOCKS, 1, 0.75f + height * 0.1f);
MALUM_CHANNEL.send(PacketDistributor.TRACKING_CHUNK.with(() -> level.getChunkAt(worldPosition)), new SpiritRiteActivationEffectPacket(spirits.stream().map(s -> s.identifier).collect(Collectors.toCollection(ArrayList::new)), worldPosition.above()));
poles.forEach(p -> {
Expand All @@ -215,7 +215,7 @@ public void completeRite(MalumRiteType rite) {
progress = 0;
this.rite = rite;
rite.executeRite(this);
if (rite.effect.category.equals(MalumRiteEffect.MalumRiteEffectCategory.ONE_TIME_EFFECT)) {
if (rite.effect.category.equals(TotemicRiteEffect.MalumRiteEffectCategory.ONE_TIME_EFFECT)) {
return;
}
disableOtherRites();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static void onEntityJump(LivingEvent.LivingJumpEvent event) {
LivingEntity entity = event.getEntity();
MobEffectInstance effectInstance = entity.getEffect(MobEffectRegistry.AETHERS_CHARM.get());
if (effectInstance != null) {
entity.setDeltaMovement(entity.getDeltaMovement().add(0, effectInstance.getAmplifier() * 0.15f, 0));
entity.setDeltaMovement(entity.getDeltaMovement().add(0, 0.1f + effectInstance.getAmplifier() * 0.05f, 0));
}
}

Expand Down
Loading

0 comments on commit aec72e4

Please sign in to comment.