
-
Particles only appear on a player's client who made an action but other players cannot see them
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.
-
[1.16.4] Clicking Run Does Not Work Within the IDE (solved)
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.
-
Particles only appear on a player's client who made an action but other players cannot see them
player.getEntityInWorld(); That function does not exist.
-
Particles only appear on a player's client who made an action but other players cannot see them
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.
-
[1.16.4] Clicking Run Does Not Work Within the IDE (solved)
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?
-
Funyaah joined the community
-
Particles only appear on a player's client who made an action but other players cannot see them
[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
IPS spam blocked by CleanTalk.