Examples of PacketSpawnParticle


Examples of pneumaticCraft.common.network.PacketSpawnParticle

        }
        return true;
    }

    private void spawnParticle(World world, String particleName, double spawnX, double spawnY, double spawnZ, double spawnMotX, double spawnMotY, double spawnMotZ){
        NetworkHandler.sendToAllAround(new PacketSpawnParticle(particleName, spawnX, spawnY, spawnZ, spawnMotX, spawnMotY, spawnMotZ), world);
    }
View Full Code Here

Examples of pneumaticCraft.common.network.PacketSpawnParticle

                        float f1 = (rand.nextFloat() - 0.5F) * 0.2F;
                        float f2 = (rand.nextFloat() - 0.5F) * 0.2F;
                        double d7 = x + 0.5D + (plant.posX - (x + 0.5D)) * d6 + (rand.nextDouble() - 0.5D);
                        double d8 = y + 0.5D + (plant.posY - (y + 0.5D)) * d6 + rand.nextDouble();
                        double d9 = z + 0.5D + (plant.posZ - (z + 0.5D)) * d6 + (rand.nextDouble() - 0.5D);
                        NetworkHandler.sendToAllAround(new PacketSpawnParticle("portal", d7, d8, d9, f, f1, f2), world);
                    }
                    world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) - 2, 3);
                    break;
                }
            }
View Full Code Here

Examples of pneumaticCraft.common.network.PacketSpawnParticle

            if(teleportCounter < TELEPORT_TICKS - 40) {
                Random rand = pathfindingEntity.getRNG();
                float f = (rand.nextFloat() - 0.5F) * 0.02F * teleportCounter;
                float f1 = (rand.nextFloat() - 0.5F) * 0.02F * teleportCounter;
                float f2 = (rand.nextFloat() - 0.5F) * 0.02F * teleportCounter;
                NetworkHandler.sendToAllAround(new PacketSpawnParticle("portal", pathfindingEntity.posX, pathfindingEntity.posY, pathfindingEntity.posZ, f, f1, f2), pathfindingEntity.worldObj);
            }

            if(++teleportCounter > TELEPORT_TICKS) {
                if(pathfindingEntity.isBlockValidPathfindBlock(telX, telY, telZ)) {
                    teleport();
View Full Code Here

Examples of pneumaticCraft.common.network.PacketSpawnParticle

            float f1 = (rand.nextFloat() - 0.5F) * 0.2F;
            float f2 = (rand.nextFloat() - 0.5F) * 0.2F;
            double d7 = pathfindingEntity.posX + (telX + 0.5 - pathfindingEntity.posX) * d6 + (rand.nextDouble() - 0.5D) * width * 2.0D;
            double d8 = pathfindingEntity.posY + (telY - pathfindingEntity.posY) * d6 + rand.nextDouble() * height;
            double d9 = pathfindingEntity.posZ + (telZ + 0.5 - pathfindingEntity.posZ) * d6 + (rand.nextDouble() - 0.5D) * width * 2.0D;
            NetworkHandler.sendToAllAround(new PacketSpawnParticle("portal", d7, d8, d9, f, f1, f2), pathfindingEntity.worldObj);
        }

        pathfindingEntity.worldObj.playSoundEffect(pathfindingEntity.posX, pathfindingEntity.posY, pathfindingEntity.posZ, "mob.endermen.portal", 1.0F, 1.0F);
        pathfindingEntity.playSound("mob.endermen.portal", 1.0F, 1.0F);

View Full Code Here

Examples of pneumaticCraft.common.network.PacketSpawnParticle

            }
        }
    }

    protected void spawnParticle(String particleName, World world, double spawnX, double spawnY, double spawnZ, double spawnMotX, double spawnMotY, double spawnMotZ){
        NetworkHandler.sendToAllAround(new PacketSpawnParticle(particleName, spawnX, spawnY, spawnZ, spawnMotX, spawnMotY, spawnMotZ), world);
    }
View Full Code Here

Examples of pneumaticCraft.common.network.PacketSpawnParticle

            NetworkHandler.sendToAllAround(new PacketPlaySound(Sounds.LEAKING_GAS_SOUND, xCoord, yCoord, zCoord, 0.1F, 1.0F, true), worldObj);
        }

        if(getPressure(side) < 0) {
            double speed = getPressure(side) * 0.1F - 0.1F;
            NetworkHandler.sendToAllAround(new PacketSpawnParticle("smoke", xCoord + 0.5D + motionX / 2D, yCoord + 0.5D + motionY / 2D, zCoord + 0.5D + motionZ / 2D, motionX * speed, motionY * speed, motionZ * speed), worldObj);

            int dispersedAmount = -(int)(getPressure(side) * PneumaticValues.AIR_LEAK_FACTOR) + 20;
            if(getCurrentAir(side) > dispersedAmount) dispersedAmount = -getCurrentAir(side);
            onAirDispersion(dispersedAmount, side);
            addAir(dispersedAmount, side);
        } else {
            double speed = getPressure(side) * 0.1F + 0.1F;
            if(DateEventHandler.isEvent()) {
                DateEventHandler.spawnFirework(worldObj, xCoord + 0.5D + motionX / 2D, yCoord + 0.5D + motionY / 2D, zCoord + 0.5D + motionZ / 2D);
            } else {
                NetworkHandler.sendToAllAround(new PacketSpawnParticle("smoke", xCoord + 0.5D + motionX / 2D, yCoord + 0.5D + motionY / 2D, zCoord + 0.5D + motionZ / 2D, motionX * speed, motionY * speed, motionZ * speed), worldObj);
            }

            int dispersedAmount = (int)(getPressure(side) * PneumaticValues.AIR_LEAK_FACTOR) + 20;
            if(dispersedAmount > getCurrentAir(side)) dispersedAmount = getCurrentAir(side);
            onAirDispersion(-dispersedAmount, side);
View Full Code Here

Examples of pneumaticCraft.common.network.PacketSpawnParticle

            }
            for(int i = 0; i < 10; i++) {
                double velX = velocity[0] * 0.4D + (rand.nextGaussian() - 0.5D) * 0.05D;
                double velY = velocity[1] * 0.4D + (rand.nextGaussian() - 0.5D) * 0.05D;
                double velZ = velocity[2] * 0.4D + (rand.nextGaussian() - 0.5D) * 0.05D;
                NetworkHandler.sendToAllAround(new PacketSpawnParticle("largesmoke", xCoord + 0.5D, yCoord + 0.7D, zCoord + 0.5D, velX, velY, velZ), worldObj);
            }
            NetworkHandler.sendToAllAround(new PacketPlaySound(Sounds.CANNON_SOUND, xCoord, yCoord, zCoord, 1.0F, rand.nextFloat() / 4F + 0.75F, true), worldObj);
            return true;
        } else {
            return false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.