-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unique steam particles for the Thermal Calcite Vents
- Loading branch information
Showing
17 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
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
74 changes: 74 additions & 0 deletions
74
src/main/java/biomesoplenty/client/particle/SteamParticle.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,74 @@ | ||
/******************************************************************************* | ||
* Copyright 2022, the Glitchfiend Team. | ||
* All rights reserved. | ||
******************************************************************************/ | ||
package biomesoplenty.client.particle; | ||
|
||
import net.minecraft.client.multiplayer.ClientLevel; | ||
import net.minecraft.client.particle.*; | ||
import net.minecraft.core.particles.SimpleParticleType; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
|
||
@OnlyIn(Dist.CLIENT) | ||
public class SteamParticle extends TextureSheetParticle | ||
{ | ||
SteamParticle(ClientLevel p_105856_, double p_105857_, double p_105858_, double p_105859_, double p_105860_, double p_105861_, double p_105862_) | ||
{ | ||
super(p_105856_, p_105857_, p_105858_, p_105859_); | ||
this.scale(2.0F); | ||
this.setSize(0.25F, 0.25F); | ||
this.lifetime = this.random.nextInt(50) + 280; | ||
this.gravity = 3.0E-6F; | ||
this.xd = p_105860_; | ||
this.yd = p_105861_ + (double)(this.random.nextFloat() / 500.0F); | ||
this.zd = p_105862_; | ||
} | ||
|
||
@Override | ||
public void tick() | ||
{ | ||
this.xo = this.x; | ||
this.yo = this.y; | ||
this.zo = this.z; | ||
if (this.age++ < this.lifetime && !(this.alpha <= 0.0F)) | ||
{ | ||
this.xd += (double)(this.random.nextFloat() / 5000.0F * (float)(this.random.nextBoolean() ? 1 : -1)); | ||
this.zd += (double)(this.random.nextFloat() / 5000.0F * (float)(this.random.nextBoolean() ? 1 : -1)); | ||
this.yd -= (double)this.gravity; | ||
this.move(this.xd, this.yd, this.zd); | ||
if (this.age >= this.lifetime - 60 && this.alpha > 0.01F) | ||
{ | ||
this.alpha -= 0.01F; | ||
} | ||
|
||
} | ||
else | ||
{ | ||
this.remove(); | ||
} | ||
} | ||
|
||
@Override | ||
public ParticleRenderType getRenderType() { | ||
return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; | ||
} | ||
|
||
@OnlyIn(Dist.CLIENT) | ||
public static class Provider implements ParticleProvider<SimpleParticleType> | ||
{ | ||
private final SpriteSet sprites; | ||
|
||
public Provider(SpriteSet p_105899_) { | ||
this.sprites = p_105899_; | ||
} | ||
|
||
public Particle createParticle(SimpleParticleType p_105910_, ClientLevel p_105911_, double p_105912_, double p_105913_, double p_105914_, double p_105915_, double p_105916_, double p_105917_) | ||
{ | ||
SteamParticle steamparticle = new SteamParticle(p_105911_, p_105912_, p_105913_, p_105914_, p_105915_, p_105916_, p_105917_); | ||
steamparticle.setAlpha(0.5F); | ||
steamparticle.pickSprite(this.sprites); | ||
return steamparticle; | ||
} | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
src/main/resources/assets/biomesoplenty/particles/steam.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,16 @@ | ||
{ | ||
"textures": [ | ||
"biomesoplenty:steam_0", | ||
"biomesoplenty:steam_1", | ||
"biomesoplenty:steam_2", | ||
"biomesoplenty:steam_3", | ||
"biomesoplenty:steam_4", | ||
"biomesoplenty:steam_5", | ||
"biomesoplenty:steam_6", | ||
"biomesoplenty:steam_7", | ||
"biomesoplenty:steam_8", | ||
"biomesoplenty:steam_9", | ||
"biomesoplenty:steam_10", | ||
"biomesoplenty:steam_11" | ||
] | ||
} |
Binary file added
BIN
+202 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+209 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+193 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+164 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+224 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+222 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+227 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+222 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+217 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+216 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+206 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+204 Bytes
src/main/resources/assets/biomesoplenty/textures/particle/steam_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.