Fix particles and tweak the magic particle effect

This commit is contained in:
Sollace 2020-04-27 00:17:18 +02:00
parent 12208b147c
commit 6b9e0eaa30
4 changed files with 27 additions and 26 deletions

View file

@ -21,11 +21,11 @@ public class MagicParticle extends SpriteBillboardParticle {
velocityX = vX; velocityX = vX;
velocityY = vY; velocityY = vY;
velocityZ = vZ; velocityZ = vZ;
startX = x; startX = x + random.nextGaussian()/3;
startY = y; startY = y + random.nextGaussian()/3;
startZ = z; startZ = z + random.nextGaussian()/3;
scale = random.nextFloat() * 0.2F + 0.5F; scale = random.nextFloat() * 0.12F;
maxAge = (int)(Math.random() * 10) + 40; maxAge = (int)(Math.random() * 10) + 20;
colorRed = r; colorRed = r;
colorGreen = g; colorGreen = g;
@ -35,6 +35,7 @@ public class MagicParticle extends SpriteBillboardParticle {
MagicParticle(World w, double x, double y, double z, double vX, double vY, double vZ) { MagicParticle(World w, double x, double y, double z, double vX, double vY, double vZ) {
this(w, x, y, z, vX, vY, vZ, 1, 1, 1); this(w, x, y, z, vX, vY, vZ, 1, 1, 1);
colorAlpha = 0.7F;
colorGreen *= 0.3F; colorGreen *= 0.3F;
if (random.nextBoolean()) { if (random.nextBoolean()) {
@ -56,7 +57,7 @@ public class MagicParticle extends SpriteBillboardParticle {
@Override @Override
public ParticleTextureSheet getType() { public ParticleTextureSheet getType() {
return ParticleTextureSheet.TERRAIN_SHEET; return ParticleTextureSheet.PARTICLE_SHEET_TRANSLUCENT;
} }
@Override @Override

View file

@ -1,12 +1,12 @@
{ {
"textures": [ "textures": [
"minecraft:generic_0", "minecraft:particle/generic_0",
"minecraft:generic_1", "minecraft:particle/generic_1",
"minecraft:generic_2", "minecraft:particle/generic_2",
"minecraft:generic_3", "minecraft:particle/generic_3",
"minecraft:generic_4", "minecraft:particle/generic_4",
"minecraft:generic_5", "minecraft:particle/generic_5",
"minecraft:generic_6", "minecraft:particle/generic_6",
"minecraft:generic_7" "minecraft:particle/generic_7"
] ]
} }

View file

@ -1,8 +1,8 @@
{ {
"textures": [ "textures": [
"minecraft:splash_0", "minecraft:particle/splash_0",
"minecraft:splash_1", "minecraft:particle/splash_1",
"minecraft:splash_2", "minecraft:particle/splash_2",
"minecraft:splash_3" "minecraft:particle/splash_3"
] ]
} }

View file

@ -1,12 +1,12 @@
{ {
"textures": [ "textures": [
"minecraft:generic_0", "minecraft:particle/generic_0",
"minecraft:generic_1", "minecraft:particle/generic_1",
"minecraft:generic_2", "minecraft:particle/generic_2",
"minecraft:generic_3", "minecraft:particle/generic_3",
"minecraft:generic_4", "minecraft:particle/generic_4",
"minecraft:generic_5", "minecraft:particle/generic_5",
"minecraft:generic_6", "minecraft:particle/generic_6",
"minecraft:generic_7" "minecraft:particle/generic_7"
] ]
} }