sooo... Meanwhile I put the particle spawning code into a method called by the model when the entity is rendered, but that - of course - doesn't work in multiplayer.
My onUpdate method:
public void onUpdate() {
super.onUpdate();
if(this.onGround || this.isInWater()){
this.setIsFlying(false); //Updating entity's logic, so the particles are only spawned for the "flying"-boolean true
}
if(this.getIsFlying()){
if(worldObj.isRemote){ // or !worldObj.isRemote
EntityFX particle = new EntityReddustFX(this.worldObj, this.posX, posY, this.posZ, 1.0F, 2.0F, 1.0F); // actually, these three lines are repeated six times in a for loop,
particle.setRBGColorF(colorsR[i], colorsG[i], colorsB[i]); // to change colors and position. I simplified it a little here.
Mod.proxy.addParticleEffect(particle); // This method does nothing on server side and is only overridden by client
}
}
}
ClientProxy#addParticleEffect:
@Override
public void addParticleEffect(EntityFX particle) {
Minecraft.getMinecraft().effectRenderer.addEffect(particle);
}
Error logs with no check for isRemote or !isRemote:
net.minecraft.util.ReportedException: Ticking Particle
at net.minecraft.client.particle.EffectRenderer.updateEffects(EffectRenderer.java:102) ~[EffectRenderer.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2136) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1029) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:951) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_55]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_55]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_55]
[...]
Error with check for !isRemote:
at net.minecraft.entity.Entity.moveEntity(Entity.java:723)
at net.minecraft.entity.EntityLivingBase.moveEntityWithHeading(EntityLivingBase.java:1678)
at net.minecraft.entity.EntityLivingBase.onLivingUpdate(EntityLivingBase.java:2021)
at net.minecraft.entity.EntityLiving.onLivingUpdate(EntityLiving.java:431)
at net.minecraft.entity.EntityAgeable.onLivingUpdate(EntityAgeable.java:138)
at net.minecraft.entity.passive.EntityAnimal.onLivingUpdate(EntityAnimal.java:56)
at net.minecraft.entity.passive.EntitySheep.onLivingUpdate(EntitySheep.java:98)
at net.minecraft.entity.EntityLivingBase.onUpdate(EntityLivingBase.java:1814)
at net.minecraft.entity.EntityLiving.onUpdate(EntityLiving.java:250)
at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2296)
at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:684)
at net.minecraft.world.World.updateEntity(World.java:2256)
-- Entity being ticked --
Details:
Entity Type: Sheep (net.minecraft.entity.passive.EntitySheep)
Entity ID: 153
Entity Name: Sheep
Entity's Exact location: -200,78, 72,00, 415,77
Entity's Block location: World: (-201,72,415), Chunk: (at 7,4,15 in -13,25; contains blocks -208,0,400 to -193,255,415), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
Entity's Momentum: 0,00, -0,08, 0,00
Sometimes Sheep, sometimes Pig, sometimes Villager, sometimes Wolf. lol