mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-25 06:36:45 +01:00
Tweaked Rupture's visual/audio effect
This commit is contained in:
parent
af6e6b9545
commit
6cad4993ed
@ -1,4 +1,5 @@
|
|||||||
Version 2.1.201
|
Version 2.1.201
|
||||||
|
Tweaked the visual/audio effect for Rupture
|
||||||
(API) TNT is set as the source in Blast Mining (1.16.1 and up)
|
(API) TNT is set as the source in Blast Mining (1.16.1 and up)
|
||||||
Fixed an exploit related to Ability Buffs remaining on tools
|
Fixed an exploit related to Ability Buffs remaining on tools
|
||||||
Blast Mining no longer drops Budding Amethyst since its not legal to obtain this item through normal gameplay
|
Blast Mining no longer drops Budding Amethyst since its not legal to obtain this item through normal gameplay
|
||||||
|
@ -53,7 +53,7 @@ public class AbilityDisableTask extends BukkitRunnable {
|
|||||||
mcMMOPlayer.setAbilityMode(ability, false);
|
mcMMOPlayer.setAbilityMode(ability, false);
|
||||||
mcMMOPlayer.setAbilityInformed(ability, false);
|
mcMMOPlayer.setAbilityInformed(ability, false);
|
||||||
|
|
||||||
ParticleEffectUtils.playAbilityDisabledEffect(player);
|
// ParticleEffectUtils.playAbilityDisabledEffect(player);
|
||||||
|
|
||||||
if (mcMMOPlayer.useChatNotifications()) {
|
if (mcMMOPlayer.useChatNotifications()) {
|
||||||
//player.sendMessage(ability.getAbilityOff());
|
//player.sendMessage(ability.getAbilityOff());
|
||||||
|
@ -12,6 +12,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public final class ParticleEffectUtils {
|
public final class ParticleEffectUtils {
|
||||||
|
|
||||||
@ -23,11 +24,15 @@ public final class ParticleEffectUtils {
|
|||||||
SoundManager.worldSendSoundMaxPitch(world, location, SoundType.POP);
|
SoundManager.worldSendSoundMaxPitch(world, location, SoundType.POP);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void playBleedEffect(LivingEntity livingEntity) {
|
public static void playBleedEffect(@NotNull LivingEntity livingEntity) {
|
||||||
if (!mcMMO.p.getGeneralConfig().getBleedEffectEnabled()) {
|
if (!mcMMO.p.getGeneralConfig().getBleedEffectEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
livingEntity.getWorld().playEffect(getParticleLocation(livingEntity), Effect.STEP_SOUND, Material.REDSTONE_WIRE);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static @NotNull Location getParticleLocation(@NotNull LivingEntity livingEntity) {
|
||||||
Location origin = livingEntity.getEyeLocation().clone();
|
Location origin = livingEntity.getEyeLocation().clone();
|
||||||
World world = origin.getWorld();
|
World world = origin.getWorld();
|
||||||
|
|
||||||
@ -37,30 +42,32 @@ public final class ParticleEffectUtils {
|
|||||||
|
|
||||||
double offSetVal = 0.3D;
|
double offSetVal = 0.3D;
|
||||||
|
|
||||||
Location locA = new Location(world, x - offSetVal, y, z);
|
switch(RandomUtils.nextInt(10)) {
|
||||||
Location locB = new Location(world, x + offSetVal, y, z);
|
|
||||||
Location locC = new Location(world, x, y + offSetVal, z);
|
|
||||||
Location locD = new Location(world, x, y - offSetVal, z);
|
|
||||||
Location locE = new Location(world, x, y, z + offSetVal);
|
|
||||||
Location locF = new Location(world, x, y, z - offSetVal);
|
|
||||||
|
|
||||||
Location locG = new Location(world, x + offSetVal, y, z + offSetVal);
|
case 0:
|
||||||
Location locH = new Location(world, x - offSetVal, y, z - offSetVal);
|
return new Location(world, x - offSetVal, y, z);
|
||||||
Location locI = new Location(world, x - offSetVal, y - offSetVal, z - offSetVal);
|
case 1:
|
||||||
Location locJ = new Location(world, x + offSetVal, y - offSetVal, z + offSetVal);
|
return new Location(world, x + offSetVal, y, z);
|
||||||
Location locK = new Location(world, x - offSetVal, y + offSetVal, z - offSetVal);
|
case 2:
|
||||||
Location locL = new Location(world, x - offSetVal, y + offSetVal, z - offSetVal);
|
return new Location(world, x, y + offSetVal, z);
|
||||||
|
case 3:
|
||||||
Location[] particleLocations = new Location[]{ locA, locB, locC, locD, locE, locF, locG, locH, locI, locJ, locK, locL};
|
return new Location(world, x, y - offSetVal, z);
|
||||||
|
case 4: Location locE = new Location(world, x, y, z + offSetVal);
|
||||||
for(Location location : particleLocations) {
|
return new Location(world, x, y, z - offSetVal);
|
||||||
if(RandomUtils.nextInt(100) > 30) {
|
case 5:
|
||||||
//TODO: Change
|
return new Location(world, x + offSetVal, y, z + offSetVal);
|
||||||
livingEntity.getWorld().playEffect(location, Effect.STEP_SOUND, Material.REDSTONE_WIRE);
|
case 6:
|
||||||
|
return new Location(world, x - offSetVal, y, z - offSetVal);
|
||||||
|
case 7:
|
||||||
|
return new Location(world, x - offSetVal, y - offSetVal, z - offSetVal);
|
||||||
|
case 8:
|
||||||
|
return new Location(world, x + offSetVal, y - offSetVal, z + offSetVal);
|
||||||
|
case 9:
|
||||||
|
return new Location(world, x - offSetVal, y + offSetVal, z - offSetVal);
|
||||||
|
default:
|
||||||
|
return new Location(world, x + offSetVal, y + offSetVal, z - offSetVal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static void playDodgeEffect(Player player) {
|
public static void playDodgeEffect(Player player) {
|
||||||
if (!mcMMO.p.getGeneralConfig().getDodgeEffectEnabled()) {
|
if (!mcMMO.p.getGeneralConfig().getDodgeEffectEnabled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user