My last post was deleted and I am not sure why. Did I break the rules? Anyway, I'll post it here again in case it was an accident. I have my EventHandler and my WorldSavedData classes. Now, how do I save my variables from my class called Test.java? Thanks for any help given!
What? In my main mod class, this is where I have it:
public static void init1( FMLInitializationEvent event )
{
MinecraftForge.EVENT_BUS.register(new SoundHandler());
MinecraftForge.EVENT_BUS.register(new Test());
}
I did this, and it does not seem to work. I registered it to the event bus, so it should be working. Here is my class:
package mymod.quests;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
public class Test {
@ForgeSubscribe
public void onEntityDeath(LivingDeathEvent event) {
if(event.entityLiving instanceof EntityPlayer) {
System.out.println("Hello!");
}
}
}
Hello! I am trying to add a sound, but cannot seem to get it to work. I right click the iPod, but do not hear the "ipodsong" sound. The sound is at src/assets/mymod/sound. It is named "ipodsong.ogg". Here is my code:
Alright, I found out how to add it. Now, is there a way I can say a random message instead of just that one?
Ex: It will run only ONE of these messages: "Hi!", "Wow!", "Cool!", "Nice!", etc.