Posted September 23, 201510 yr Hi so I'm trying to make it so that when a mob gets hit by my projectile a puddle of water will spawn at it's feet however I'm not quite sure how to get the active water to spawn so that it goes away after a little bit. My code: @Override protected void onImpact(MovingObjectPosition movingobjectposition) { if (movingobjectposition.entityHit != null) { float getDmg = 2; movingobjectposition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), getDmg); int rand = random.nextInt(5); if (rand == 4) { int x = MathHelper.floor_double(this.posX); int y = MathHelper.floor_double(movingobjectposition.entityHit.posY); int z = MathHelper.floor_double(this.posZ); this.worldObj.setBlock(x, y, z, Blocks.water); } } for (int l = 0; l <7; ++l) { this.worldObj.spawnParticle("splash", this.posX, this.posY, this.posZ, 0.0D, 0.0D, 0.0D); } if (!this.worldObj.isRemote) { this.setDead(); } } as you see right now its block.water how do i get the active water?
September 23, 201510 yr Author oh wow lol, I searched through all the blocks and somehow missed it thx!
September 23, 201510 yr Author so I tried Blocks.flowing_water and it gets the spawned water flowing but it still stays, I want the blocks that are not permanent (the nonsource blocks) to spawn, is it possible to do this?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.