Jump to content

Funyaah

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Funyaah

  1. Thank you for reply, actually I already did "ServerWorld.spawnParticles" but result was same. I'm trying to use PlayerTickEvent to spawn particle using ClientWorld.addParticles... But to me it's odd because "SwordItem.onEntitySwing" could show particles for everyone on a server using ClientWorld.addParticles. This is also what I want to know.
  2. Ding, I assumed that you use JDK15 instead of 1.8. Check your project property if Java Compiler/Build path is pointing "real" JDK 1.8 instead of JDK15. You get this error "java.lang.NoClassDefFoundError: jdk/nashorn/api/scripting/NashornScriptEngineFactory" because this class does not exist anymore in JDK15.
  3. I can't use !world.isRemote since I cast world into ClientWorld in order to call implemented addParticle (ServerWorld.addParticle does not anything according to documentaiton). I also tried ServerWorld.spawnParticle, but result was same.
  4. The folder structure is correct, but I see a bunch of exception in the console. Can I see all of the exception messages? Also what would happen if you execute "gradlew build"? And you installed Java 1.8, right?
  5. [1.16.4] Hello, I'm pretty new to forge modding. Recently I made a mod that spawns particles when player jumps with specific suite of armour, and it certainly shows particles in multi player mode, but other players said they can't see them. (Using LivingJumpEvent) I also made a mod which spawns particles when player swing a special sword, but everyone can see the particles. (Using SwordItem.onEntitySwing) I don't quite get difference between those two. Can anyone tell me why there's gap on those? Here's the event subscriber for jump event: @Mod.EventBusSubscriber public static class ClientEvents { @SubscribeEvent public static void onJumping(final LivingEvent.LivingJumpEvent event) { LivingEntity player = event.getEntityLiving(); World world = player.getEntityWorld(); if (world.isRemote && isPlayerWearingTheArmours(player)) { ClientWorld clientWorld = (ClientWorld) world; for (int i = 0; i < 15; ++i) { clientWorld.addParticle(ParticleTypes.PORTAL, player.getPosXRandom(0.2D), player.getPosYRandom() - 0.25D, player.getPosZRandom(0.2D), (clientWorld.rand.nextDouble() - 0.25D) * 2.0D, -clientWorld.rand.nextDouble(), (clientWorld.rand.nextDouble() - 0.25D) * 2.0D); } } } } Thank you very much in advance! Funyaah
×
×
  • Create New...

Important Information

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