-
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.
- Loading branch information
Showing
20 changed files
with
128 additions
and
72 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
4 changes: 2 additions & 2 deletions
4
src/generated/resources/.cache/d5eb3be92e574684753d96c043bc0149b9dc9be7
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// 1.20.1 2024-03-10T11:57:53.9149035 Tags for minecraft:mob_effect mod id ars_elemental | ||
// 1.20.1 2024-04-04T12:55:45.8490267 Tags for minecraft:mob_effect mod id ars_elemental | ||
bf78cab890974f864aecbb8b86f90cff309bf461 data/ars_elemental/tags/mob_effect/manabubble_blacklist.json | ||
c3b7e8630b0cb0882260bf5e3ab8c45b4a446bdb data/ars_nouveau/tags/mob_effect/to_sync.json | ||
8fa46e97c5ec2993fbb89bc556681143b7cda2ff data/ars_nouveau/tags/mob_effect/to_sync.json |
2 changes: 1 addition & 1 deletion
2
src/generated/resources/data/ars_nouveau/tags/mob_effect/to_sync.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"values": [ | ||
"ars_elemental:hellfire", | ||
"ars_elemental:static_charged" | ||
"ars_elemental:venom" | ||
] | ||
} |
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
43 changes: 43 additions & 0 deletions
43
src/main/java/alexthw/ars_elemental/client/particle/VenomParticle.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,43 @@ | ||
package alexthw.ars_elemental.client.particle; | ||
|
||
import net.minecraft.client.multiplayer.ClientLevel; | ||
import net.minecraft.client.particle.ParticleProvider; | ||
import net.minecraft.client.particle.ParticleRenderType; | ||
import net.minecraft.client.particle.SpriteSet; | ||
import net.minecraft.client.particle.TextureSheetParticle; | ||
import net.minecraft.core.particles.SimpleParticleType; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class VenomParticle extends TextureSheetParticle { | ||
private final SpriteSet spriteSet; | ||
|
||
private VenomParticle(ClientLevel levelIn, double xCoordIn, double yCoordIn, double zCoordIn, double xSpeedIn, double ySpeedIn, double zSpeedIn, SpriteSet spriteSet) { | ||
super(levelIn, xCoordIn, yCoordIn, zCoordIn, xSpeedIn, ySpeedIn, zSpeedIn); | ||
lifetime = 20; | ||
|
||
this.spriteSet = spriteSet; | ||
pickSprite(spriteSet); | ||
xd = xSpeedIn; | ||
yd = ySpeedIn; | ||
zd = zSpeedIn; | ||
//oRoll = roll = random.nextFloat() * 2 * (float) Math.PI; | ||
} | ||
|
||
@Override | ||
public void tick() { | ||
super.tick(); | ||
if ((age % 4) == 0) { | ||
pickSprite(spriteSet); | ||
} | ||
} | ||
|
||
@Override | ||
public @NotNull ParticleRenderType getRenderType() { | ||
return ParticleRenderType.PARTICLE_SHEET_OPAQUE; | ||
} | ||
|
||
@NotNull | ||
public static ParticleProvider<SimpleParticleType> factory(SpriteSet spriteSet) { | ||
return (data, level, x, y, z, dx, dy, dz) -> new VenomParticle(level, x, y, z, dx, dy, dz, spriteSet); | ||
} | ||
} |
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
28 changes: 0 additions & 28 deletions
28
src/main/java/alexthw/ars_elemental/common/mob_effects/ParticleMobEffect.java
This file was deleted.
Oops, something went wrong.
27 changes: 22 additions & 5 deletions
27
src/main/java/alexthw/ars_elemental/common/mob_effects/VenomEffect.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 |
---|---|---|
@@ -1,28 +1,45 @@ | ||
package alexthw.ars_elemental.common.mob_effects; | ||
|
||
import alexthw.ars_elemental.registry.ModParticles; | ||
import alexthw.ars_elemental.registry.ModRegistry; | ||
import com.hollingsworth.arsnouveau.api.util.DamageUtil; | ||
import net.minecraft.world.effect.MobEffect; | ||
import com.hollingsworth.arsnouveau.common.potions.ParticleMobEffect; | ||
import net.minecraft.core.particles.ParticleOptions; | ||
import net.minecraft.world.effect.MobEffectCategory; | ||
import net.minecraft.world.effect.MobEffects; | ||
import net.minecraft.world.entity.LivingEntity; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class VenomEffect extends MobEffect { | ||
public class VenomEffect extends ParticleMobEffect { | ||
public VenomEffect() { | ||
super(MobEffectCategory.HARMFUL, MobEffects.POISON.getColor()); | ||
} | ||
|
||
@Override | ||
public void applyEffectTick(@NotNull LivingEntity pLivingEntity, int pAmplifier) { | ||
public void applyEffectTick(@NotNull LivingEntity living, int pAmplifier) { | ||
if (living.level.isClientSide) | ||
//3 loops | ||
for (int i = 0; i < 3; i++) { | ||
living.level.addParticle(getParticle(), living.getRandomX(.75D), 0.35 + living.getRandomY(), living.getRandomZ(.75D), 0.0D, 0.0D, 0.0D); | ||
} | ||
else | ||
living.hurt(DamageUtil.source(living.level(), ModRegistry.POISON), 2 + (0.25F * pAmplifier)); | ||
|
||
pLivingEntity.hurt(DamageUtil.source(pLivingEntity.level(), ModRegistry.POISON), 2); | ||
} | ||
|
||
@Override | ||
public ParticleOptions getParticle() { | ||
return ModParticles.VENOM.get(); | ||
} | ||
|
||
@Override | ||
public boolean isDurationEffectTick(int pDuration, int pAmplifier) { | ||
int j = 32 >> pAmplifier; | ||
int j = switch (pAmplifier) { | ||
case 0 -> 20; | ||
case 1 -> 10; | ||
default -> 32 >> pAmplifier; | ||
}; | ||
return j == 0 || pDuration % j == 0; | ||
} | ||
|
||
} |
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
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
15 changes: 7 additions & 8 deletions
15
src/main/resources/assets/ars_elemental/particles/spark.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 |
---|---|---|
@@ -1,12 +1,11 @@ | ||
{ | ||
"textures": [ | ||
"cofh_core:spark_0", | ||
"cofh_core:spark_1", | ||
"cofh_core:spark_2", | ||
"cofh_core:spark_3", | ||
"cofh_core:spark_4", | ||
"cofh_core:spark_5", | ||
"cofh_core:spark_6", | ||
"cofh_core:spark_7" | ||
"ars_elemental:spark_0", | ||
"ars_elemental:spark_1", | ||
"ars_elemental:spark_2", | ||
"ars_elemental:spark_3", | ||
"ars_elemental:spark_4", | ||
"ars_elemental:spark_5", | ||
"ars_elemental:spark_6" | ||
] | ||
} |
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,8 @@ | ||
{ | ||
"textures": [ | ||
"ars_elemental:venom_0", | ||
"ars_elemental:venom_1", | ||
"ars_elemental:venom_2", | ||
"ars_elemental:venom_3" | ||
] | ||
} |
Binary file added
BIN
+372 Bytes
src/main/resources/assets/ars_elemental/textures/particle/venom_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
+405 Bytes
src/main/resources/assets/ars_elemental/textures/particle/venom_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
+387 Bytes
src/main/resources/assets/ars_elemental/textures/particle/venom_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
+396 Bytes
src/main/resources/assets/ars_elemental/textures/particle/venom_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.