bloodi
Members-
Posts
16 -
Joined
-
Last visited
Everything posted by bloodi
-
Thanks a lot guys (Still don't get why the other events worked without registration^^)
-
Oh sorry, I'm using 1.7.10. So what exactly do I need to do to get that working?
-
The method is in my main class and e.g the LivingAttackEvent also works there. So it should work without the event bus registration?
-
Hey, I want to run a method every second and use something like the bukkit scheduler for this. I tried it with the ServerTickEvent but nothing happens with it: int tick = 0; @SubscribeEvent public void scheduler(ServerTickEvent e){ if(tick != 20){ tick++; return; } tick = 0; //do stuff Also tried with @EventHandler (idk the difference^^) Hope for a good reply
-
yeah I just got it... it was "random.anvil_break"... Thanks to everyone for helping me
-
Thanks - but still doesn't work. Code is now: double x = attacker.posX; double y = attacker.posY; double z = attacker.posZ; World w = attacker.worldObj; w.playSoundEffect(x, y, z, "Sound.ANVIL_BREAK", 1, 1);
-
I tried... int x = player.chunkCoordX; int y = player.chunkCoordY; int z = player.chunkCoordZ; World w = DimensionManager.getWorld(0); w.playSoundEffect((double) x, (double) y, (double) z, "SOUND.RANDOM.WOOD_CLICK", 1F, 1F); but it doesnt work. Where is the problem?
-
Could you explain a bit more? I didn't find anything like that...
-
Thank you very much, that worked! I'm using a Cauldron 1.7.10 server with Forge 7.10.85.1236.
-
Hello, (((I am looking for a way to make a mod server-side only so Forge allows players to join without the mod installed.))) Also I want to play a sound for a player with this (serverside) mod. (How) is this possible? I tried player.playSound("SOUND.RANDOM.ANVIL_BREAK", 1, 1) but nothing happens. I would very much appreciate your help
-
Thank you sooo much, I'm new to Forge Modding Spent so much time with that, so dumb^^ Liebe Grüße Kollege
-
Thanks, seems helpful but I tried it and it crashes with the same error when casting it. if(source != null){ if (((source instanceof EntityDamageSource))){ Entity sourceentity = ((EntityDamageSource)source).getEntity(); Where is the problem? Its also pretty weird because I as a player am an entity and a player, so there should be no error
-
Hey, I am working on a method that returns the attacker of an entity. I tried: DamageSource source = event.source; if(source != null){ if (((source instanceof EntityDamageSource))){ if(source.getEntity() != null){ if(source.getEntity() instanceof EntityPlayerMP){ EntityPlayerMP attacker = (EntityPlayerMP)source.getEntity(); System.out.println(attacker.toString() + " is the attacker"); } } } } These if-functions should prevent the case to go on if there is no attacker but the game crashes as soon as I hit an animal. Here is the error: Line 61 is: " if(source.getEntity() != null){" I am using the recommended Forge 1.7.10 version. I hope someone can help.
-
Okay thanks. Is there a way to let mods and plugins communicate?
-
Thanks for this great adivce but I want to use it in multiplayer and server-side only...
-
Hello, i am looking for a way to use forge/cauldron Events in my plugins. I need the LivingAttackEvent (the Bukkit "EntityDamage" event doesn't work in this case), so I tried use Cauldron as build path and create the Event: @SubscribeEvent public void onHit(LivingAttackEvent e){ System.out.println("Test Message"); } Unfortunately it doesn't work. Does anyone of you have experiences with Cauldron? Greetings, bloodi