Skip to content

Commit

Permalink
Update Minestom
Browse files Browse the repository at this point in the history
  • Loading branch information
zax71 committed Apr 12, 2024
1 parent 5610e47 commit 724795d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repositories {

dependencies {
// Minestom
implementation("net.minestom:minestom-snapshots:7320437640")
implementation("net.minestom:minestom-snapshots:7daf8d69b7")

// Randomness
implementation("de.articdive:jnoise-pipeline:4.1.0")
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/net/minestom/arena/game/mob/EvokerMob.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import net.minestom.server.entity.ai.target.ClosestEntityTarget;
import net.minestom.server.entity.metadata.monster.raider.EvokerMeta;
import net.minestom.server.entity.metadata.monster.raider.SpellcasterIllagerMeta;
import net.minestom.server.network.packet.server.play.ParticlePacket;
import net.minestom.server.particle.Particle;
import net.minestom.server.particle.ParticleCreator;
import net.minestom.server.timer.TaskSchedule;
import net.minestom.server.utils.time.Cooldown;
import net.minestom.server.utils.time.TimeUnit;
Expand Down Expand Up @@ -49,10 +49,9 @@ public EvokerMob(MobGenerationContext context) {
random.nextFloat(-2, 2)
);
silverfish.setInstance(instance, pos);
instance.sendGroupedPacket(ParticleCreator.createParticlePacket(
Particle.POOF, true, pos.x(), pos.y(), pos.z(),
0.2f, 0.2f, 0.2f, 0.1f, 10, null
));

instance.sendGroupedPacket(new ParticlePacket(Particle.POOF, true, pos.x(), pos.y(), pos.z(),
0.2f, 0.2f, 0.2f, 0.1f, 10));
}

((EvokerMeta) getEntityMeta()).setSpell(SpellcasterIllagerMeta.Spell.NONE);
Expand Down
16 changes: 7 additions & 9 deletions src/main/java/net/minestom/arena/game/mob/MobArena.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import net.minestom.server.instance.Instance;
import net.minestom.server.item.ItemStack;
import net.minestom.server.item.Material;
import net.minestom.server.network.packet.server.play.ParticlePacket;
import net.minestom.server.particle.Particle;
import net.minestom.server.particle.ParticleCreator;
import net.minestom.server.sound.SoundEvent;
import net.minestom.server.tag.Tag;
import net.minestom.server.timer.TaskSchedule;
Expand Down Expand Up @@ -605,10 +605,9 @@ public boolean hasOption(@Nullable ArenaOption option) {
return TaskSchedule.stop();
}

instance.sendGroupedPacket(ParticleCreator.createParticlePacket(
Particle.FIREWORK, true, pos.x(), pos.y(), pos.z(),
0.3f, 0.3f, 0.3f, 0.01f, 50, null
));
instance.sendGroupedPacket(new ParticlePacket(Particle.FIREWORK, pos.x(), pos.y(), pos.z(),
0.3f, 0.3f, 0.3f, 0.01f, 50));

instance.playSound(
Sound.sound(SoundEvent.ENTITY_AXOLOTL_SWIM, Sound.Source.NEUTRAL, 1, 1),
pos.x(), pos.y(), pos.z()
Expand Down Expand Up @@ -642,10 +641,9 @@ public boolean hasOption(@Nullable ArenaOption option) {
}

private static void explosion(DamageType damageType, Instance instance, Pos pos, int range, float offset, int damage, float volume) {
instance.sendGroupedPacket(ParticleCreator.createParticlePacket(
Particle.EXPLOSION, pos.x(), pos.y(), pos.z(),
offset, offset, offset, 5
));
instance.sendGroupedPacket(new ParticlePacket(Particle.EXPLOSION, pos.x(), pos.y(), pos.z(),
offset, offset, offset, 0.01f, 5));

instance.playSound(
Sound.sound(SoundEvent.ENTITY_GENERIC_EXPLODE, Sound.Source.NEUTRAL, volume, 1),
pos.x(), pos.y(), pos.z()
Expand Down

0 comments on commit 724795d

Please sign in to comment.