本文整理匯總了Java中net.minecraft.util.EnumParticleTypes.HEART屬性的典型用法代碼示例。如果您正苦於以下問題:Java EnumParticleTypes.HEART屬性的具體用法?Java EnumParticleTypes.HEART怎麽用?Java EnumParticleTypes.HEART使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.minecraft.util.EnumParticleTypes
的用法示例。
在下文中一共展示了EnumParticleTypes.HEART屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: playTameEffect
/**
* Play the taming effect, will either be hearts or smoke depending on status
*/
protected void playTameEffect(boolean play)
{
EnumParticleTypes enumparticletypes = EnumParticleTypes.HEART;
if (!play)
{
enumparticletypes = EnumParticleTypes.SMOKE_NORMAL;
}
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D;
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.nextFloat() * this.height), this.posZ + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, d0, d1, d2, new int[0]);
}
}
示例2: playTameEffect
/**
* Play the taming effect, will either be hearts or smoke depending on status
*/
protected void playTameEffect(boolean play)
{
EnumParticleTypes enumparticletypes = EnumParticleTypes.HEART;
if (!play)
{
enumparticletypes = EnumParticleTypes.SMOKE_NORMAL;
}
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D;
this.world.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.nextFloat() * this.height), this.posZ + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, d0, d1, d2, new int[0]);
}
}
示例3: spawnHorseParticles
/**
* "Spawns particles for the horse entity. par1 tells whether to spawn hearts. If it is false, it spawns smoke."
*/
protected void spawnHorseParticles(boolean p_110216_1_)
{
EnumParticleTypes enumparticletypes = p_110216_1_ ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL;
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D;
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.nextFloat() * this.height), this.posZ + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, d0, d1, d2, new int[0]);
}
}
示例4: playTameEffect
protected void playTameEffect(boolean play) {
EnumParticleTypes enumparticletypes = EnumParticleTypes.HEART;
if (!play) {
enumparticletypes = EnumParticleTypes.SMOKE_NORMAL;
}
for (int i = 0; i < 7; ++i) {
double d0 = rand.nextGaussian() * 0.02D;
double d1 = rand.nextGaussian() * 0.02D;
double d2 = rand.nextGaussian() * 0.02D;
EasyMappings.world(this).spawnParticle(enumparticletypes, posX + rand.nextFloat() * width * 2.0F - width, posY + 0.5D + rand.nextFloat() * height, posZ + rand.nextFloat() * width * 2.0F - width, d0, d1, d2, new int[0]);
}
}
示例5: spawnHorseParticles
/**
* "Spawns particles for the horse entity. par1 tells whether to spawn hearts. If it is false, it spawns smoke."
*/
protected void spawnHorseParticles(boolean p_110216_1_)
{
EnumParticleTypes enumparticletypes = p_110216_1_ ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL;
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D;
this.world.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.nextFloat() * this.height), this.posZ + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, d0, d1, d2, new int[0]);
}
}
示例6: spawnHorseParticles
/**
* "Spawns particles for the horse entity. par1 tells whether to spawn hearts. If it is false, it spawns smoke."
*/
@SideOnly(Side.CLIENT)
protected void spawnHorseParticles(boolean p_110216_1_)
{
EnumParticleTypes enumparticletypes = p_110216_1_ ? EnumParticleTypes.HEART : EnumParticleTypes.SMOKE_NORMAL;
for (int i = 0; i < 7; ++i)
{
double d0 = this.rand.nextGaussian() * 0.02D;
double d1 = this.rand.nextGaussian() * 0.02D;
double d2 = this.rand.nextGaussian() * 0.02D;
this.worldObj.spawnParticle(enumparticletypes, this.posX + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, this.posY + 0.5D + (double)(this.rand.nextFloat() * this.height), this.posZ + (double)(this.rand.nextFloat() * this.width * 2.0F) - (double)this.width, d0, d1, d2, new int[0]);
}
}