diff --git a/Common/src/main/java/at/petrak/hexcasting/client/particles/ConjureParticle.java b/Common/src/main/java/at/petrak/hexcasting/client/particles/ConjureParticle.java index 622152bb..86611a5a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/particles/ConjureParticle.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/particles/ConjureParticle.java @@ -33,13 +33,11 @@ public class ConjureParticle extends TextureSheetParticle { this.quadSize *= light ? 0.9f : 0.75f; this.setParticleSpeed(dx, dy, dz); - var lightness = light ? 0.3f : 1.0f; var r = FastColor.ARGB32.red(color); var g = FastColor.ARGB32.green(color); var b = FastColor.ARGB32.blue(color); - var a = FastColor.ARGB32.alpha(color); - this.setColor(r / 255f * lightness, g / 255f * lightness, b / 255f * lightness); - this.setAlpha(a / 255f * lightness); + this.setColor(r / 255f, g / 255f, b / 255f); + this.setAlpha(light ? 0.3f : 1.0f); this.friction = 0.96F; this.gravity = light && dy != 0 && dx != 0 && dz != 0 ? -0.01F : 0F; @@ -63,6 +61,7 @@ public class ConjureParticle extends TextureSheetParticle { this.setSpriteFromAge(this.sprites); this.alpha = 1.0f - ((float) this.age / (float) this.lifetime); if (light) { + this.alpha *= 0.3f; this.quadSize *= 0.96f; } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityConjured.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityConjured.java index 319bfa81..f7bfac78 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityConjured.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/entity/BlockEntityConjured.java @@ -73,18 +73,16 @@ public class BlockEntityConjured extends HexBlockEntity { } public void landParticle(Entity entity, int number) { - if (getBlockState().getBlock() instanceof BlockConjuredLight) { - for (int i = 0; i < number * 2; i++) { - int color = this.colorizer.getColor(entity.tickCount, entity.position() - .add(new Vec3(RANDOM.nextFloat(), RANDOM.nextFloat(), RANDOM.nextFloat()).scale( - RANDOM.nextFloat() * 3))); - assert level != null; - level.addParticle(new ConjureParticleOptions(color, false), - entity.getX() + (RANDOM.nextFloat() * 0.8D) - 0.2D, - getBlockPos().getY() + (RANDOM.nextFloat() * 0.05D) + 0.95D, - entity.getZ() + (RANDOM.nextFloat() * 0.8D) - 0.2D, - 0.0, 0.0, 0.0); - } + for (int i = 0; i < number * 2; i++) { + int color = this.colorizer.getColor(entity.tickCount, entity.position() + .add(new Vec3(RANDOM.nextFloat(), RANDOM.nextFloat(), RANDOM.nextFloat()).scale( + RANDOM.nextFloat() * 3))); + assert level != null; + level.addParticle(new ConjureParticleOptions(color, false), + entity.getX() + (RANDOM.nextFloat() * 0.8D) - 0.2D, + getBlockPos().getY() + (RANDOM.nextFloat() * 0.05D) + 0.95D, + entity.getZ() + (RANDOM.nextFloat() * 0.8D) - 0.2D, + 0.0, 0.0, 0.0); } }