Skip to content

Commit

Permalink
The apparatice
Browse files Browse the repository at this point in the history
  • Loading branch information
SammySemicolon committed Dec 22, 2024
1 parent 9937d95 commit 04f233c
Show file tree
Hide file tree
Showing 56 changed files with 587 additions and 43 deletions.
Binary file modified aseprite/malum_textures.ase
Binary file not shown.
7 changes: 2 additions & 5 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ java {

neoForge {
version.set(project.property("neo_version").toString())

parchment {
mappingsVersion.set(project.property("parchment_mappings_version").toString())
minecraftVersion.set(project.property("parchment_minecraft_version").toString())
}

setAccessTransformers(
"src/main/resources/META-INF/accesstransformer.cfg",
"src/main/resources/META-INF/recipebuilders.cfg",
Expand Down Expand Up @@ -212,11 +214,6 @@ java {
}


tasks.jar.configure {
archiveClassifier.set("pure")
}



//jar {
//// exclude 'com/sammy/malum/core/data/**'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "malum:block/chronopulser"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "malum:block/pulsebank"
}
}
}
2 changes: 2 additions & 0 deletions src/generated/resources/assets/malum/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"block.malum.checkered_twisted_rock": "Checkered Twisted Rock",
"block.malum.chiseled_tainted_rock": "Chiseled Tainted Rock",
"block.malum.chiseled_twisted_rock": "Chiseled Twisted Rock",
"block.malum.chronopulser": "Chronopulser",
"block.malum.clinging_blight": "Clinging Blight",
"block.malum.cthonic_gold_cluster": "Cthonic Gold Cluster",
"block.malum.cthonic_gold_ore": "Cthonic Gold Ore",
Expand Down Expand Up @@ -105,6 +106,7 @@
"block.malum.polished_twisted_rock_stairs": "Polished Twisted Rock Stairs",
"block.malum.polished_twisted_rock_wall": "Polished Twisted Rock Wall",
"block.malum.primordial_soup": "The Weeping Well",
"block.malum.pulsebank": "Pulsebank",
"block.malum.repair_pylon": "Repair Pylon",
"block.malum.repair_pylon_component": "Repair Pylon Component",
"block.malum.revealed_runewood_log": "Revealed Runewood Log",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"bottom": "malum:block/redstone/runewood_frame_bottom",
"side": "malum:block/redstone/chronopulser_side",
"top": "malum:block/redstone/runewood_frame_top"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parent": "minecraft:block/cube_bottom_top",
"textures": {
"bottom": "malum:block/redstone/runewood_frame_bottom",
"side": "malum:block/redstone/pulsebank_side",
"top": "malum:block/redstone/runewood_frame_top"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "malum:block/chronopulser"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parent": "malum:block/pulsebank"
}
31 changes: 22 additions & 9 deletions src/generated/resources/data/malum/enchantment/spirit_plunder.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
{
"anvil_cost": 1,
"anvil_cost": 10,
"description": {
"translate": "enchantment.malum.spirit_plunder"
},
"effects": {
"minecraft:attributes": [
{
"amount": {
"type": "minecraft:linear",
"base": 1.0,
"per_level_above_first": 1.0
},
"attribute": "malum:spirit_spoils",
"id": "malum:enchantment.spirit_spoils",
"operation": "add_value"
}
]
},
"max_cost": {
"base": 6,
"per_level_above_first": 10
"base": 200,
"per_level_above_first": 0
},
"max_level": 2,
"min_cost": {
"base": 1,
"per_level_above_first": 10
"base": 55,
"per_level_above_first": 0
},
"primary_items": "#malum:soul_shatter_capable_weapons",
"slots": [
"hand"
"mainhand"
],
"supported_items": "#malum:soul_shatter_capable_weapons",
"weight": 10
"supported_items": "#malum:enchantable/spirit_spoils",
"weight": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "malum:chronopulser"
}
],
"rolls": 1.0
}
],
"random_sequence": "malum:blocks/chronopulser"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:block",
"pools": [
{
"bonus_rolls": 0.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "malum:pulsebank"
}
],
"rolls": 1.0
}
],
"random_sequence": "malum:blocks/pulsebank"
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"malum:runewood_totem_pole",
"malum:soulwood_totem_base",
"malum:soulwood_totem_pole",
"malum:chronopulser",
"malum:pulsebank",
"malum:soulwoven_banner",
"malum:stripped_runewood_log",
"malum:runewood_log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"malum:spirit_catalyzer_component",
"malum:repair_pylon",
"malum:repair_pylon_component",
"malum:chronopulser",
"malum:pulsebank",
"malum:spirit_mote",
"malum:void_depot",
"malum:weeping_well_bricks",
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/com/sammy/malum/client/RenderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import team.lodestar.lodestone.systems.rendering.*;
import team.lodestar.lodestone.systems.rendering.trail.*;

import javax.annotation.Nullable;
import java.awt.*;
import java.util.List;
import java.util.*;
Expand Down Expand Up @@ -55,7 +56,10 @@ public static void renderEntityTrail(PoseStack poseStack, VFXBuilders.WorldVFXBu
public static void drawCube(PoseStack poseStack, VFXBuilders.WorldVFXBuilder builder, float scale, CubeVertexData cubeVertexData) {
drawCube(poseStack, builder, builder, scale, cubeVertexData);
}
public static void drawCube(PoseStack poseStack, VFXBuilders.WorldVFXBuilder builder, VFXBuilders.WorldVFXBuilder sideBuilder, float scale, CubeVertexData cubeVertexData) {
public static void drawCubeSides(PoseStack poseStack, VFXBuilders.WorldVFXBuilder builder, float scale, CubeVertexData cubeVertexData) {
drawCube(poseStack, null, builder, scale, cubeVertexData);
}
public static void drawCube(PoseStack poseStack, @Nullable VFXBuilders.WorldVFXBuilder builder, VFXBuilders.WorldVFXBuilder sideBuilder, float scale, CubeVertexData cubeVertexData) {
Vector3f[] bottomVertices = cubeVertexData.bottomVertices;
Vector3f[] topVertices = cubeVertexData.topVertices;
Collection<Vector3f[]> offsetMap = cubeVertexData.offsetMap;
Expand All @@ -66,8 +70,10 @@ public static void drawCube(PoseStack poseStack, VFXBuilders.WorldVFXBuilder bui
for (Vector3f[] offsets : offsetMap) {
drawSide(poseStack, sideBuilder, offsets);
}
drawSide(poseStack, builder, new Vector3f[]{bottomVertices[3], bottomVertices[2], bottomVertices[1], bottomVertices[0]});
drawSide(poseStack, builder, topVertices);
if (builder != null) {
drawSide(poseStack, builder, new Vector3f[]{bottomVertices[3], bottomVertices[2], bottomVertices[1], bottomVertices[0]});
drawSide(poseStack, builder, topVertices);
}
poseStack.popPose();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.sammy.malum.client.renderer.block;

import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import com.sammy.malum.MalumMod;
import com.sammy.malum.client.RenderUtils;
import com.sammy.malum.client.SpiritBasedWorldVFXBuilder;
import com.sammy.malum.common.block.curiosities.redstone.ChronopulserBlockEntity;
import com.sammy.malum.common.block.curiosities.totem.TotemPoleBlockEntity;
import com.sammy.malum.common.item.ether.EtherItem;
import com.sammy.malum.core.systems.spirit.MalumSpiritType;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.core.Direction;
import net.minecraft.util.Mth;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import org.joml.Vector3f;
import team.lodestar.lodestone.helpers.ColorHelper;
import team.lodestar.lodestone.helpers.EasingHelper;
import team.lodestar.lodestone.registry.client.LodestoneRenderTypes;
import team.lodestar.lodestone.systems.easing.Easing;
import team.lodestar.lodestone.systems.rendering.VFXBuilders;
import team.lodestar.lodestone.systems.rendering.rendeertype.RenderTypeToken;
import team.lodestar.lodestone.systems.rendering.rendeertype.ShaderUniformHandler;

import java.awt.*;

import static com.sammy.malum.client.RenderUtils.drawCube;
import static com.sammy.malum.client.RenderUtils.drawCubeSides;


public class ChronopulserRenderer implements BlockEntityRenderer<ChronopulserBlockEntity> {

private static final RenderTypeToken TOKEN = RenderTypeToken.createToken(MalumMod.malumPath("textures/block/redstone/chronopulser_overlay.png"));
private static final Color COLOR = new Color(170, 15, 1);

public ChronopulserRenderer(BlockEntityRendererProvider.Context context) {
}

@Override
public void render(ChronopulserBlockEntity blockEntityIn, float partialTicks, PoseStack poseStack, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) {
float pct = Mth.clamp(1 - (blockEntityIn.timer / 15f), 0, 1);
if (pct > 0) {
float alpha = Easing.CUBIC_OUT.clamped(pct, 0, 1) * 0.8f;
float glowAlpha = Easing.SINE_OUT.clamped(pct, 0, 1) * 0.4f;
var cubeVertexData = RenderUtils.makeCubePositions(1f);
var builder = VFXBuilders.createWorld()
.setColor(COLOR);
poseStack.pushPose();
drawCubeSides(poseStack, builder.setAlpha(alpha).setRenderType(LodestoneRenderTypes.TRANSPARENT_TEXTURE.applyAndCache(TOKEN)), 1.00125f, cubeVertexData);
drawCubeSides(poseStack, builder.setAlpha(glowAlpha).setRenderType(LodestoneRenderTypes.ADDITIVE_TEXTURE.applyAndCache(TOKEN)), 1.0025f, cubeVertexData);
poseStack.popPose();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
import static com.sammy.malum.client.RenderUtils.*;


public class MoteOfManaRenderer implements BlockEntityRenderer<MoteOfManaBlockEntity> {
public class MoteOfManaRenderer implements BlockEntityRenderer<ManaMoteBlockEntity> {

public static final RenderTypeToken MOTE_OF_MANA = RenderTypeToken.createToken(MalumMod.malumPath("textures/block/spirit_mote.png"));

public MoteOfManaRenderer(BlockEntityRendererProvider.Context context) {
}

@Override
public void render(MoteOfManaBlockEntity blockEntityIn, float partialTicks, PoseStack poseStack, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) {
public void render(ManaMoteBlockEntity blockEntityIn, float partialTicks, PoseStack poseStack, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) {
poseStack.pushPose();
MalumSpiritType spiritType = MalumSpiritType.getSpiritType(blockEntityIn.getBlockState().getValue(SpiritMoteBlock.SPIRIT_TYPE));
MalumSpiritType spiritType = MalumSpiritType.getSpiritType(blockEntityIn.getBlockState().getValue(ManaMoteBlock.SPIRIT_TYPE));

var builder = SpiritBasedWorldVFXBuilder.create(spiritType)
.setRenderType(LodestoneRenderTypes.ADDITIVE_TEXTURE.applyAndCache(MOTE_OF_MANA));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.sammy.malum.client.renderer.block;

import com.mojang.blaze3d.vertex.PoseStack;
import com.sammy.malum.MalumMod;
import com.sammy.malum.client.RenderUtils;
import com.sammy.malum.common.block.curiosities.redstone.ChronopulserBlockEntity;
import com.sammy.malum.common.block.curiosities.redstone.PulsebankBlockEntity;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.blockentity.BlockEntityRenderer;
import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider;
import net.minecraft.util.Mth;
import team.lodestar.lodestone.registry.client.LodestoneRenderTypes;
import team.lodestar.lodestone.systems.easing.Easing;
import team.lodestar.lodestone.systems.rendering.VFXBuilders;
import team.lodestar.lodestone.systems.rendering.rendeertype.RenderTypeToken;

import java.awt.*;

import static com.sammy.malum.client.RenderUtils.drawCubeSides;


public class PulsebankRenderer implements BlockEntityRenderer<PulsebankBlockEntity> {

private static final RenderTypeToken TOKEN = RenderTypeToken.createToken(MalumMod.malumPath("textures/block/redstone/pulsebank_overlay.png"));
private static final Color COLOR = new Color(170, 15, 1);

public PulsebankRenderer(BlockEntityRendererProvider.Context context) {
}

@Override
public void render(PulsebankBlockEntity blockEntityIn, float partialTicks, PoseStack poseStack, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) {
float pct = Mth.clamp(blockEntityIn.timer / 40f, 0, 1);
if (pct > 0) {
float alpha = Easing.CUBIC_OUT.clamped(pct, 0, 1) * 0.8f;
float glowAlpha = Easing.SINE_OUT.clamped(pct, 0, 1) * 0.4f;
var cubeVertexData = RenderUtils.makeCubePositions(1f);
var builder = VFXBuilders.createWorld()
.setColor(COLOR);
poseStack.pushPose();
drawCubeSides(poseStack, builder.setAlpha(alpha).setRenderType(LodestoneRenderTypes.TRANSPARENT_TEXTURE.applyAndCache(TOKEN)), 1.00125f, cubeVertexData);
drawCubeSides(poseStack, builder.setAlpha(glowAlpha).setRenderType(LodestoneRenderTypes.ADDITIVE_TEXTURE.applyAndCache(TOKEN)), 1.0025f, cubeVertexData);
poseStack.popPose();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@ public static void setupEntries(ArcanaProgressionScreen screen) {
))
);

screen.addEntry("something1", 4, 8, b -> {});
// screen.addEntry("something2", 5, 8, b -> {});

screen.addEntry("ether", 5, 8, b -> b
screen.addEntry("ether", 4, 8, b -> b
.configureWidget(w -> w.setIcon(ETHER))
.addPage(new HeadlineTextPage("ether", "ether.1"))
.addPage(SpiritInfusionPage.fromOutput(ETHER.get()))
Expand All @@ -58,6 +55,14 @@ public static void setupEntries(ArcanaProgressionScreen screen) {
)
);

screen.addEntry("basic_artifice", 5, 8, b -> b
.configureWidget(w -> w.setIcon(CHRONOPULSER))
.addPage(new HeadlineTextPage("basic_artifice", "basic_artifice.1"))
.addPage(new TextPage("basic_artifice.2"))
.addPage(new HeadlineTextPage("basic_artifice.pulsebank", "basic_artifice.pulsebank.1"))
.addPage(new HeadlineTextPage("basic_artifice.chronopulser", "basic_artifice.chronopulser.1"))
);

screen.addEntry("soulwoven_silk", 4, 5, b -> b
.configureWidget(w -> w.setIcon(SOULWOVEN_SILK))
.addPage(new HeadlineTextPage("soulwoven_silk", "soulwoven_silk.1"))
Expand Down
Loading

0 comments on commit 04f233c

Please sign in to comment.