Skip to content

Commit

Permalink
ss
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheaterpaul committed Oct 19, 2024
1 parent b01ef4b commit a489e12
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class MistSmokeParticle extends SimpleAnimatedParticle {
this.friction = 0.92F;
this.quadSize = 0.5F;
this.setAlpha(0.8F);
this.setColor(1, 1, 1);
this.setColor(0.3f, 0.3f, 0.3f);
this.lifetime = (int)((double)(this.quadSize * 12.0F) / (Math.random() * 0.8F + 0.2F));
this.setSpriteFromAge(pSprites);
this.hasPhysics = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.teamlapen.vampirism.entity.player.vampire.VampirePlayer;
import de.teamlapen.vampirism.entity.player.vampire.VampirePlayerSpecialAttributes;
import de.teamlapen.vampirism.entity.player.vampire.actions.VampireActions;
import de.teamlapen.vampirism.entity.player.vampire.skills.VampireSkills;
import de.teamlapen.vampirism.items.CrucifixItem;
import de.teamlapen.vampirism.mixin.client.accessor.CameraAccessor;
import de.teamlapen.vampirism.util.Helper;
Expand Down Expand Up @@ -251,6 +252,9 @@ public void onRenderLivingPre(RenderLivingEvent.@NotNull Pre<Player, PlayerModel
}
}
}
if (entity instanceof Player player && VampirePlayer.get(player).getActionHandler().isActionActive(VampireActions.HALF_INVULNERABLE)) {
event.setCanceled(true);
}
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ private void test(T pEntity, float pEntityYaw, float pPartialTicks, PoseStack pP

@WrapOperation(method = "render(Lnet/minecraft/world/entity/LivingEntity;FFLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/EntityModel;renderToBuffer(Lcom/mojang/blaze3d/vertex/PoseStack;Lcom/mojang/blaze3d/vertex/VertexConsumer;III)V"))
private void changeColor(EntityModel instance, PoseStack poseStack, VertexConsumer consumer, int i1, int i2, int i3, Operation<Void> original, @Share("mist") LocalBooleanRef mist) {
original.call(instance, poseStack, consumer, i1, i2, mist.get() ? FastColor.ARGB32.color(0,255,255,255) : i3);
original.call(instance, poseStack, consumer, i1, i2, mist.get() ? FastColor.ARGB32.color(10,255,255,255) : i3);
}
}

0 comments on commit a489e12

Please sign in to comment.