Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[1.5.1] [FORGE] Server/Client Problem


  • Please log in to reply
21 replies to this topic

#1

SynthTones

Posted 28 April 2013 - 07:54 PM

I have an item, it shoots an entity. When the entity hits something, it makes an Explosion(Explosion.java).
But, when I walk into the area it exploded, my player twitches everywhere and I can't jump(same effects as walking into a world hole). Explosion.java also produces fire, but when I walk into it, it binds the fire over my screen(and every mob that walks into it is "burning"), but nothing is being hurt. Also, when I quit and come back into the world, it is as nothing even happened. No burning, no flames anywhere, and no hole from any explosions. Is there any way I can fix this?

onImpact method:
Spoiler:

If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

Register or log in to remove.

#2

CrazyBloodwing
  • Location: Looting The Pandoran Vault
  • Minecraft: Jun117
  • Xbox:ClumsyRecon

Posted 28 April 2013 - 08:41 PM

Try it with out is flaming.
Posted Image

#3

SynthTones

Posted 28 April 2013 - 08:46 PM

Uhh.. what?
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#4

SynthTones

Posted 28 April 2013 - 09:06 PM

Any ideas?
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#5

kaikaii99

Posted 28 April 2013 - 10:36 PM

protected void onImpact(MovingObjectPosition par1)
{
//spawn lightning
this.worldObj.spawnEntityInWorld(new EntityLightningBolt(this.worldObj, par1.blockX, par1.blockY, par1.blockZ));
Explosion explosion = new Explosion(
this.worldObj,
this,
par1.blockX,
par1.blockY,
par1.blockZ,
1);
         explosion.isFlaming = false;
         explosion.isSmoking = true;
         explosion.doExplosionA();
         explosion.doExplosionB(true);
this.setDead();





try that, and maybe thats because your minecraft was laggy

Posted Image

#6

SynthTones

Posted 28 April 2013 - 10:39 PM

Even before trying, I know that won't fix it because I'll still twitch everywhere.
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#7

TwistedCarny

Posted 28 April 2013 - 11:28 PM

I have the same problem with my explosive arrow.

#8

CrazyBloodwing
  • Location: Looting The Pandoran Vault
  • Minecraft: Jun117
  • Xbox:ClumsyRecon

Posted 29 April 2013 - 07:35 AM

Try this instead of the explosion stuff:
this.worldObj.createExplosion(this, par1.blockX, par1.blockY, par1.blockZ, 4, true);
Posted Image

#9

CrazyBloodwing
  • Location: Looting The Pandoran Vault
  • Minecraft: Jun117
  • Xbox:ClumsyRecon

Posted 29 April 2013 - 07:53 AM

By that I mean^^^^^^^^
Remove this:
Explosion explosion = new Explosion(
this.worldObj,
this,
par1.blockX,
par1.blockY,
par1.blockZ,
1);
explosion.isFlaming = true;
explosion.isSmoking = true;
explosion.doExplosionA();
explosion.doExplosionB(true);

Posted Image

#10

SynthTones

Posted 29 April 2013 - 07:07 PM

That won't help. I even tried to do this.worldObj.setBlock() and it wouldn't work.
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#11

SynthTones

Posted 29 April 2013 - 07:52 PM

bump
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#12

CrazyBloodwing
  • Location: Looting The Pandoran Vault
  • Minecraft: Jun117
  • Xbox:ClumsyRecon

Posted 29 April 2013 - 08:59 PM

No that method was the explosion code.

I made an item that explodes the player when right clicked and I just used that code.
Posted Image

#13

SynthTones

Posted 29 April 2013 - 09:04 PM

I know, but whatever I do, it always breaks. Explosions, setting blocks, even spawning mobs probably. It always disappears.
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#14

SynthTones

Posted 01 May 2013 - 07:30 PM

bump :/
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#15

SynthTones

Posted 03 May 2013 - 08:26 PM

bump... Guess no one has ideas.
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#16

Toffie_of_Truth

Posted 03 May 2013 - 08:59 PM

	protected void onImpact(MovingObjectPosition par1)
	{
		if (!this.worldObj.isRemote) {
			//spawn lightning
			this.worldObj.spawnEntityInWorld(new EntityLightningBolt(this.worldObj, (double)par1.blockX, (double)par1.blockY, (double)par1.blockZ));
			this.worldObj.newExplosion(this, (double)par1.blockX, (double)par1.blockY, (double)par1.blockZ, 1.0F, true, true);
			this.setDead();
		}
	}


#17

SynthTones

Posted 04 May 2013 - 02:00 PM

Honestly, I don't think any of you get it. I'm not trying to get different code for an explosion. Anything I do; spawn mobs, set blocks, create explosions; nothing works. It's all client side.
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#18

Toffie_of_Truth

Posted 04 May 2013 - 02:16 PM

View PostToffie_of_Truth, on 03 May 2013 - 08:59 PM, said:

if (!this.worldObj.isRemote) {


#19

SynthTones

Posted 04 May 2013 - 04:52 PM

View PostToffie_of_Truth, on 04 May 2013 - 02:16 PM, said:

When I do that, it doesn't even make lightning or an explosion.
If I helped you then please press the Posted Image button. :)
Be sure to quote my post if you want a reply.

#20

Toffie_of_Truth

Posted 04 May 2013 - 05:25 PM

The only other thing I can think of is using this.posX/posY/posZ instead of par1.blockX/blockY/blockZ.

Other than that, the code I posted is adapted from the EntityEgg projectile class.