SteamWar/FightSystem
Archiviert
13
1

Fix sound strength

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-10-29 12:24:43 +01:00
Ursprung bef28a99b2
Commit f04a9edb41

Datei anzeigen

@ -44,10 +44,12 @@ import org.bukkit.event.server.BroadcastMessageEvent;
import org.bukkit.inventory.ItemStack;
import java.util.EnumSet;
import java.util.Random;
public class EventRecordListener extends BasicListener {
private static final int AIR = 0;
private static final Random random = new Random();
public EventRecordListener() {
super(Config.event() ? EnumSet.allOf(FightState.class) : EnumSet.noneOf(FightState.class));
@ -131,7 +133,7 @@ public class EventRecordListener extends BasicListener {
Location loc = e.getLocation();
RecordSystem.entityDespawns(e.getEntity());
RecordSystem.particle(loc.getX(), loc.getY(), loc.getZ(), Particle.EXPLOSION_LARGE.name());
RecordSystem.sound(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), Sound.ENTITY_GENERIC_EXPLODE.name(), SoundCategory.BLOCKS.name(), 255.0f, 1.0f);
RecordSystem.sound(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), Sound.ENTITY_GENERIC_EXPLODE.name(), SoundCategory.BLOCKS.name(), 4.0F, (1.0F + (random.nextFloat() - random.nextFloat()) * 0.2F) * 0.7F);
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)