-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9937d95
commit 04f233c
Showing
56 changed files
with
587 additions
and
43 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/malum/blockstates/chronopulser.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "malum:block/chronopulser" | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/assets/malum/blockstates/pulsebank.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"variants": { | ||
"": { | ||
"model": "malum:block/pulsebank" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/generated/resources/assets/malum/models/block/chronopulser.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
src/generated/resources/assets/malum/models/block/pulsebank.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/malum/models/item/chronopulser.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"parent": "malum:block/chronopulser" | ||
} |
3 changes: 3 additions & 0 deletions
3
src/generated/resources/assets/malum/models/item/pulsebank.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"parent": "malum:block/pulsebank" | ||
} |
31 changes: 22 additions & 9 deletions
31
src/generated/resources/data/malum/enchantment/spirit_plunder.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/malum/loot_table/blocks/chronopulser.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
21 changes: 21 additions & 0 deletions
21
src/generated/resources/data/malum/loot_table/blocks/pulsebank.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
src/main/java/com/sammy/malum/client/renderer/block/ChronopulserRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/main/java/com/sammy/malum/client/renderer/block/PulsebankRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.