Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey its me, the annoying sound guy :D so I've finally fixed all server issues with sounds playing etc. but now when it plays in eclipse the sound is perfect but when it plays on a minecraft client it becomes longer and WAY deeper. here is code:

package cerni;

import java.util.UUID;

import *****.proxy.CommonProxy;

import ibxm.Player;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.SoundCategory;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.Chat;
import net.minecraftforge.client.event.sound.SoundEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ServerChatEvent;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@Mod(modid = Main.MOD_ID, name = Main.NAME, version = Main.VERSION)
public class Main {
	public static final String MOD_ID = "zillexcm";
	public static final String NAME = "*****";
	public static final String VERSION = "0.1";
	public String msg;
	
	@Instance
	
	public static Main instance;
	
    @Mod.EventHandler
	
	public void init(FMLInitializationEvent event) {
    	MinecraftForge.EVENT_BUS.register((Object)this);
	}
    
    
    
    		@SubscribeEvent
    		
    		public void onDeath(final ClientChatReceivedEvent event) {
    			this.msg = event.message.getUnformattedText();
    			
    			if(this.msg.contains("Nostos")) {
    				Minecraft.getMinecraft().thePlayer.playSound("zillexcm:sounds.jigglypuff", 3.5F, 0.2F);
    			}
    		}
    

}

Thanks!

Edited by Zillex_

  • Author
14 hours ago, jabelar said:

Why are you using a 0.2F for the pitch value? That will make it sound slow and deep...

oh... what should i use? lol

 

edit nevermind 1.0 is default, THANKS

Edited by Zillex_

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.