本文整理匯總了Java中net.minecraft.entity.Entity.isBeingRidden方法的典型用法代碼示例。如果您正苦於以下問題:Java Entity.isBeingRidden方法的具體用法?Java Entity.isBeingRidden怎麽用?Java Entity.isBeingRidden使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.entity.Entity
的用法示例。
在下文中一共展示了Entity.isBeingRidden方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: removeEntity
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
* Schedule the entity for removal during the next tick. Marks the entity dead in anticipation.
*/
public void removeEntity(Entity entityIn)
{
if (entityIn.isBeingRidden())
{
entityIn.removePassengers();
}
if (entityIn.isRiding())
{
entityIn.dismountRidingEntity();
}
entityIn.setDead();
if (entityIn instanceof EntityPlayer)
{
this.playerEntities.remove(entityIn);
this.updateAllPlayersSleepingFlag();
this.onEntityRemoved(entityIn);
}
}
示例2: spawnEntity
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public static void spawnEntity(Entity entityIn, World worldIn)
{
if (worldIn.spawnEntityInWorld(entityIn) && entityIn.isBeingRidden())
{
for (Entity entity : entityIn.getPassengers())
{
spawnEntity(entity, worldIn);
}
}
}
示例3: onEntityCollidedWithBlock
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
* Called When an Entity Collided with the Block
*/
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
if (!entityIn.isRiding() && !entityIn.isBeingRidden() && entityIn.isNonBoss())
{
entityIn.setPortal(pos);
}
}
示例4: onEntityCollidedWithBlock
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
* Called When an Entity Collided with the Block
*/
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
if (!entityIn.isRiding() && !entityIn.isBeingRidden() && entityIn.isNonBoss() && !worldIn.isRemote && entityIn.getEntityBoundingBox().intersectsWith(state.getBoundingBox(worldIn, pos).offset(pos)))
{
entityIn.changeDimension(1);
}
}
示例5: apply
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
public boolean apply(@Nullable Entity p_apply_1_)
{
return p_apply_1_.isEntityAlive() && !p_apply_1_.isBeingRidden() && !p_apply_1_.isRiding();
}