Jump to content




[1.7.10] Turtle's world object does not show particles


7 replies to this topic

#1 KnightMiner

  • Members
  • 61 posts
  • Locationattempt to index "location" (a nil value)

Posted 04 April 2016 - 09:05 PM

I am currently working on a turtle which upon success is suppose to make a laser beam of particles, though the problem is the particles refuse to show up, despite my debug statements telling me the particles spawn at the proper location. The odd part is I know it is actually spawning the particles, as I have frozen the game from spawning too many particles with the turtle (due to a mistake in my math), though I still never see them. I also am able to spawn particles indirectly, such as by calling a generic function to break a block (with sounds/drops), and with a different turtle have done it using an explosion.

So I am wondering, how do I get a turtle to spawn particles? Here is a link to the code I'm using, note that the velocity is set based on the assumption that "reddust" particles here act the same as 1.8 command (and set the color), though I have also tried it with 0,0,0 velocity and the "explode" particle without anything showing up as well.

#2 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 05 April 2016 - 04:58 PM

I am not really a forge pro but I think you need to spawn particles client side.

#3 KnightMiner

  • Members
  • 61 posts
  • Locationattempt to index "location" (a nil value)

Posted 05 April 2016 - 07:04 PM

Particles are spawned on the server, otherwise players who did not trigger the particles won't see them. In either case, I really cannot get a client side version of the turtle world that I know of, as the turtle is stored serverside.

#4 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 05 April 2016 - 07:23 PM

View PostKnightMiner, on 05 April 2016 - 07:04 PM, said:

Particles are spawned on the server, otherwise players who did not trigger the particles won't see them. In either case, I really cannot get a client side version of the turtle world that I know of, as the turtle is stored serverside.

The world on the server side delegates to net.minecraft.world.WorldManager which has an empty spawnParticle method, so nothing happens on the server. You'll need to send a packet to all players telling particles to be spawned at a location instead.

#5 KnightMiner

  • Members
  • 61 posts
  • Locationattempt to index "location" (a nil value)

Posted 06 April 2016 - 05:12 AM

View PostSquidDev, on 05 April 2016 - 07:23 PM, said:

View PostKnightMiner, on 05 April 2016 - 07:04 PM, said:

Particles are spawned on the server, otherwise players who did not trigger the particles won't see them. In either case, I really cannot get a client side version of the turtle world that I know of, as the turtle is stored serverside.

The world on the server side delegates to net.minecraft.world.WorldManager which has an empty spawnParticle method, so nothing happens on the server. You'll need to send a packet to all players telling particles to be spawned at a location instead.
I was afraid it would come to that. At least it is better than no particles

#6 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 06 April 2016 - 01:25 PM

View PostKnightMiner, on 06 April 2016 - 05:12 AM, said:

View PostSquidDev, on 05 April 2016 - 07:23 PM, said:

View PostKnightMiner, on 05 April 2016 - 07:04 PM, said:

Particles are spawned on the server, otherwise players who did not trigger the particles won't see them. In either case, I really cannot get a client side version of the turtle world that I know of, as the turtle is stored serverside.

The world on the server side delegates to net.minecraft.world.WorldManager which has an empty spawnParticle method, so nothing happens on the server. You'll need to send a packet to all players telling particles to be spawned at a location instead.
I was afraid it would come to that. At least it is better than no particles
It is not that hard than it seems is :)
Personal experience :P

#7 KnightMiner

  • Members
  • 61 posts
  • Locationattempt to index "location" (a nil value)

Posted 06 April 2016 - 11:38 PM

View PostKonlab, on 06 April 2016 - 01:25 PM, said:

View PostKnightMiner, on 06 April 2016 - 05:12 AM, said:

View PostSquidDev, on 05 April 2016 - 07:23 PM, said:

View PostKnightMiner, on 05 April 2016 - 07:04 PM, said:

Particles are spawned on the server, otherwise players who did not trigger the particles won't see them. In either case, I really cannot get a client side version of the turtle world that I know of, as the turtle is stored serverside.
The world on the server side delegates to net.minecraft.world.WorldManager which has an empty spawnParticle method, so nothing happens on the server. You'll need to send a packet to all players telling particles to be spawned at a location instead.
I was afraid it would come to that. At least it is better than no particles
It is not that hard than it seems is :)/> Personal experience :P/>
Yeah, but it means I still need to learn a bit more in 1.7.10 modding before people move onto 1.8/1.9. :P

#8 Konlab

  • Members
  • 595 posts
  • LocationKerbin

Posted 07 April 2016 - 11:56 AM

View PostKnightMiner, on 06 April 2016 - 11:38 PM, said:

View PostKonlab, on 06 April 2016 - 01:25 PM, said:

View PostKnightMiner, on 06 April 2016 - 05:12 AM, said:

View PostSquidDev, on 05 April 2016 - 07:23 PM, said:

View PostKnightMiner, on 05 April 2016 - 07:04 PM, said:

Particles are spawned on the server, otherwise players who did not trigger the particles won't see them. In either case, I really cannot get a client side version of the turtle world that I know of, as the turtle is stored serverside.
The world on the server side delegates to net.minecraft.world.WorldManager which has an empty spawnParticle method, so nothing happens on the server. You'll need to send a packet to all players telling particles to be spawned at a location instead.
I was afraid it would come to that. At least it is better than no particles
It is not that hard than it seems is :)/>/> Personal experience :P/>/>
Yeah, but it means I still need to learn a bit more in 1.7.10 modding before people move onto 1.8/1.9. :P/>
But simplenetworkwrapper is the same in both versions





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users