Skip to content

Commit

Permalink
Beam
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsoltMolnarrr committed Jan 20, 2025
1 parent d298ba5 commit 0a98130
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ runes_version=1.0.3+1.21.1
structure_pool_api_version=1.1.3+1.21.1
shield_api_version=2.0.2+1.21.1

spell_engine_version=1.4.0+1.21.1
spell_engine_version=1.4.1+1.21.1
spell_power_version=1.0.8+1.21.1
cloth_config_version=15.0.130
player_anim_version=2.0.0-alpha1+1.21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import net.paladins.PaladinsMod;
import net.paladins.entity.BannerEntity;
import net.spell_engine.api.render.CustomModels;
import net.spell_engine.api.spell.Spell;
import net.spell_engine.client.render.BeamRenderer;
import net.spell_engine.client.util.Color;

public class BannerEntityRenderer<T extends BannerEntity> extends EntityRenderer<T> {
// Item renderer
Expand All @@ -32,6 +34,8 @@ public Identifier getTexture(T entity) {
private static final RenderLayer layer =
RenderLayer.getEntityTranslucent(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE);

private static Color.IntFormat innerColor = Color.IntFormat.fromLongRGBA(0xFF0000FFL);
private static Color.IntFormat outerColor = Color.IntFormat.fromLongRGBA(0xFFCC66FFL);

public void render(T entity, float yaw, float tickDelta, MatrixStack matrixStack, VertexConsumerProvider vertexConsumers, int light) {
super.render(entity, yaw, tickDelta, matrixStack, vertexConsumers, light);
Expand All @@ -42,9 +46,9 @@ public void render(T entity, float yaw, float tickDelta, MatrixStack matrixStack
CustomModels.render(layer, itemRenderer, modelId, matrixStack, vertexConsumers, light, entity.getId());

matrixStack.translate(0.5, 0, 0.5);
BeamRenderer.renderBeam(matrixStack, vertexConsumers, beamTexture, entity.age, tickDelta, 1.0F,
false, 255, 255, 255, 128,
0.0F, 128F, 0.3F);
// BeamRenderer.renderBeam(matrixStack, vertexConsumers, beamTexture, entity.age, tickDelta, 1.0F,
// false, innerColor, outerColor, BeamRenderer.layerSetFor(beamTexture, Spell.Release.Target.Beam.Luminance.HIGH),
// 0.0F, 128F, 0.3F);

matrixStack.pop();
}
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/data/paladins/spell/holy_beam.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"target": {
"type": "BEAM",
"beam": {
"color_rgba": 4292712959,
"width": 0.1,
"color_rgba": 4291585791,
"flow": 1.5,
"block_hit_particles": [
{
Expand Down

0 comments on commit 0a98130

Please sign in to comment.