Package net.minecraft.entity.item

Examples of net.minecraft.entity.item.EntityItem.playSound()


            plant.motionY = -1.0F;
            plant.motionZ = rand.nextFloat() - 0.5F;
            plant.lifespan = 300;
            ItemPlasticPlants.markInactive(plant);
            world.spawnEntityInWorld(plant);
            plant.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);

            world.setBlockMetadataWithNotify(x, y, z, 4, 3);
        }
    }
}
View Full Code Here


            plant.motionY = rand.nextFloat() * 0.2F;
            plant.motionZ = (rand.nextFloat() - 0.5F) / 4F;
            plant.lifespan = 1200;
            ItemPlasticPlants.markInactive(plant);
            world.spawnEntityInWorld(plant);
            plant.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);

            world.setBlockMetadataWithNotify(x, y, z, 4, 3);
        }
    }
}
View Full Code Here

            plant.motionY = 0.1F;
            plant.motionZ = (rand.nextDouble() * 0.3D + 0.1D) * rand.nextInt(2) == 0 ? 1 : -1;
            plant.lifespan = 300;
            ItemPlasticPlants.markInactive(plant);
            world.spawnEntityInWorld(plant);
            plant.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);

            world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) - 2, 3);
        }
    }
}
View Full Code Here

            plant.motionY = 0.7F;
            plant.motionZ = (rand.nextFloat() - 0.5F) / 2;
            plant.lifespan = 300;
            ItemPlasticPlants.markInactive(plant);
            world.spawnEntityInWorld(plant);
            plant.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);

            world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) - 2, 3);
        }
    }
}
View Full Code Here

            plant.motionY = 1.0F;
            plant.motionZ = rand.nextFloat() - 0.5F;
            plant.lifespan = 300;
            ItemPlasticPlants.markInactive(plant);
            world.spawnEntityInWorld(plant);
            plant.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);

            world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) - 2, 3);
        }
    }
}
View Full Code Here

                plant.motionY = 0.5F;
                plant.motionZ = (rand.nextFloat() - 0.5F) / 2;
                plant.lifespan = 300;
                ItemPlasticPlants.markInactive(plant);
                world.spawnEntityInWorld(plant);
                plant.playSound("mob.newsound.chickenplop", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
            }
        } else {
            world.setBlockMetadataWithNotify(x, y, z, 14, 2);
            world.scheduleBlockUpdate(x, y, z, this, 60);
        }
View Full Code Here

                    EntityItem plant = new EntityItem(world, randX + 0.5D, randY + 0.5D, randZ + 0.5D, seed);
                    // plant.motionX = plant.motionY = plant.motionZ = 0;
                    plant.lifespan = 300;
                    ItemPlasticPlants.markInactive(plant);
                    world.spawnEntityInWorld(plant);
                    plant.playSound("mob.endermen.portal", 0.2F, ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
                    short short1 = 128;
                    for(int j = 0; j < short1; ++j) {
                        double d6 = j / (short1 - 1.0D);
                        float f = (rand.nextFloat() - 0.5F) * 0.2F;
                        float f1 = (rand.nextFloat() - 0.5F) * 0.2F;
 
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.