本文整理匯總了Java中net.minecraft.entity.Entity.canBePushed方法的典型用法代碼示例。如果您正苦於以下問題:Java Entity.canBePushed方法的具體用法?Java Entity.canBePushed怎麽用?Java Entity.canBePushed使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.entity.Entity
的用法示例。
在下文中一共展示了Entity.canBePushed方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getCollisionBox
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
@Nullable
/**
* Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be
* pushable on contact, like boats or minecarts.
*/
public AxisAlignedBB getCollisionBox(Entity entityIn)
{
return entityIn.canBePushed() ? entityIn.getEntityBoundingBox() : null;
}
示例2: getCollisionBox
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
* Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be
* pushable on contact, like boats or minecarts.
*/
@Nullable
public AxisAlignedBB getCollisionBox(Entity entityIn)
{
if (getCollisionHandler() != null) return getCollisionHandler().getCollisionBox(this, entityIn);
return entityIn.canBePushed() ? entityIn.getEntityBoundingBox() : null;
}
示例3: getCollisionBox
import net.minecraft.entity.Entity; //導入方法依賴的package包/類
/**
* Returns a boundingBox used to collide the entity with other entities and blocks. This enables the entity to be
* pushable on contact, like boats or minecarts.
*/
public AxisAlignedBB getCollisionBox(Entity entityIn)
{
return entityIn.canBePushed() ? entityIn.getEntityBoundingBox() : null;
}