本文整理汇总了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();
}