mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Make these actually random.
This commit is contained in:
		@@ -27,15 +27,21 @@ public final class Misc {
 | 
			
		||||
    // Sound Pitches & Volumes from CB
 | 
			
		||||
    public static final float ANVIL_USE_PITCH  = 0.3F; // Not in CB directly, I went off the place sound values
 | 
			
		||||
    public static final float ANVIL_USE_VOLUME = 1.0F; // Not in CB directly, I went off the place sound values
 | 
			
		||||
    public static final float FIZZ_PITCH       = 2.6F + (Misc.getRandom().nextFloat() - Misc.getRandom().nextFloat()) * 0.8F;
 | 
			
		||||
    public static final float FIZZ_VOLUME      = 0.5F;
 | 
			
		||||
    public static final float POP_PITCH        = ((getRandom().nextFloat() - getRandom().nextFloat()) * 0.7F + 1.0F) * 2.0F;
 | 
			
		||||
    public static final float POP_VOLUME       = 0.2F;
 | 
			
		||||
    public static final float BAT_VOLUME       = 1.0F;
 | 
			
		||||
    public static final float BAT_PITCH        = 0.6F;
 | 
			
		||||
 | 
			
		||||
    private Misc() {};
 | 
			
		||||
 | 
			
		||||
    public static float getFizzPitch() {
 | 
			
		||||
        return 2.6F + (getRandom().nextFloat() - getRandom().nextFloat()) * 0.8F;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static float getPopPitch() {
 | 
			
		||||
        return ((getRandom().nextFloat() - getRandom().nextFloat()) * 0.7F + 1.0F) * 2.0F;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static boolean isNPCEntity(Entity entity) {
 | 
			
		||||
        if (entity == null || entity.hasMetadata("NPC")) {
 | 
			
		||||
            return true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user