generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update structure nbts + add particle
- Loading branch information
Showing
16 changed files
with
62 additions
and
9 deletions.
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
51 changes: 51 additions & 0 deletions
51
src/client/java/net/ugi/sculk_depths/particle/ModPortalParticle.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,51 @@ | ||
package net.ugi.sculk_depths.particle; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.minecraft.client.particle.AscendingParticle; | ||
import net.minecraft.client.particle.Particle; | ||
import net.minecraft.client.particle.ParticleFactory; | ||
import net.minecraft.client.particle.SpriteProvider; | ||
import net.minecraft.client.render.WorldRenderer; | ||
import net.minecraft.client.world.ClientWorld; | ||
import net.minecraft.particle.SimpleParticleType; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.MathHelper; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
public class ModPortalParticle | ||
extends AscendingParticle { | ||
|
||
|
||
|
||
protected ModPortalParticle(ClientWorld world, double x, double y, double z, float randomVelocityXMultiplier, float randomVelocityYMultiplier, float randomVelocityZMultiplier, double velocityX, double velocityY, double velocityZ, float scaleMultiplier, SpriteProvider spriteProvider, float colorMultiplier, int baseMaxAge, float gravityStrength, boolean collidesWithWorld) { | ||
super(world, x, y, z, randomVelocityXMultiplier, randomVelocityYMultiplier, randomVelocityZMultiplier, velocityX, velocityY, velocityZ, scaleMultiplier, spriteProvider, colorMultiplier, baseMaxAge, gravityStrength, collidesWithWorld); | ||
} | ||
|
||
@Override | ||
protected int getBrightness(float tint) { | ||
return 15728880; //look at original and it's methods to see why | ||
} | ||
|
||
@Environment(value = EnvType.CLIENT) | ||
public static class Factory | ||
implements ParticleFactory<SimpleParticleType> { | ||
private final SpriteProvider spriteProvider; | ||
|
||
public Factory(SpriteProvider spriteProvider) { | ||
this.spriteProvider = spriteProvider; | ||
} | ||
|
||
@Nullable | ||
@Override | ||
public Particle createParticle(SimpleParticleType parameters, ClientWorld clientWorld, double x, double y, double z, double g, double h, double i) { | ||
|
||
ModPortalParticle particle = new ModPortalParticle(clientWorld, x, y, z, 0.3f, 0.1f, 0.3f, 0f, -0.01f, 0f, 0.18f, this.spriteProvider, 1f, 40, -0.001f, false); | ||
particle.setColor(1,1,1); | ||
particle.maxAge = MathHelper.nextBetween(clientWorld.random, 40, 200); | ||
//particle.gravityStrength = -0.01f;//not needed? | ||
return particle; | ||
} | ||
|
||
} | ||
} |
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
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
5 changes: 5 additions & 0 deletions
5
src/main/resources/assets/sculk_depths/particles/sculk_depths_portal_particle.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,5 @@ | ||
{ | ||
"textures": [ | ||
"sculk_depths:sculk_depths_portal_particle" | ||
] | ||
} |
Binary file added
BIN
+119 Bytes
...esources/assets/sculk_depths/textures/particle/sculk_depths_portal_particle.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 modified
BIN
+7.85 KB
(250%)
src/main/resources/data/sculk_depths/structure/portal_structure/city/dining_room.nbt
Binary file not shown.
Binary file modified
BIN
+5.05 KB
(160%)
src/main/resources/data/sculk_depths/structure/portal_structure/city/fortress.nbt
Binary file not shown.
Binary file modified
BIN
+4.49 KB
(140%)
src/main/resources/data/sculk_depths/structure/portal_structure/city/houses.nbt
Binary file not shown.
Binary file modified
BIN
+4.19 KB
(160%)
src/main/resources/data/sculk_depths/structure/portal_structure/city/kryslum_storage.nbt
Binary file not shown.
Binary file modified
BIN
+805 Bytes
(110%)
src/main/resources/data/sculk_depths/structure/portal_structure/city/pathway_cross.nbt
Binary file not shown.
Binary file modified
BIN
+119 Bytes
(110%)
src/main/resources/data/sculk_depths/structure/portal_structure/city/pathway_end.nbt
Binary file not shown.
Binary file added
BIN
+421 Bytes
src/main/resources/data/sculk_depths/structure/portal_structure/city/pathway_end_small.nbt
Binary file not shown.
Binary file modified
BIN
+533 Bytes
(110%)
src/main/resources/data/sculk_depths/structure/portal_structure/city/pathway_straight.nbt
Binary file not shown.
Binary file modified
BIN
+6.34 KB
(110%)
src/main/resources/data/sculk_depths/structure/portal_structure/portal/portal.nbt
Binary file not shown.