本文整理匯總了Java中net.minecraftforge.common.EnumPlantType.Beach方法的典型用法代碼示例。如果您正苦於以下問題:Java EnumPlantType.Beach方法的具體用法?Java EnumPlantType.Beach怎麽用?Java EnumPlantType.Beach使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.common.EnumPlantType
的用法示例。
在下文中一共展示了EnumPlantType.Beach方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: canSustainPlant
import net.minecraftforge.common.EnumPlantType; //導入方法依賴的package包/類
public boolean canSustainPlant(final IBlockAccess world, final int x,
final int y, final int z, final ForgeDirection direction,
final IPlantable plantable) {
final EnumPlantType plant = plantable.getPlantType(world, x, y + 1, z);
// Crops or reeds
return plant == EnumPlantType.Crop || plant == EnumPlantType.Beach;
}
示例2: canSustainPlant
import net.minecraftforge.common.EnumPlantType; //導入方法依賴的package包/類
@Override
public boolean canSustainPlant(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing direction, IPlantable plantable)
{
boolean hasWater = world.getBlockState(pos.east()).getMaterial() == Material.WATER ||
world.getBlockState(pos.west()).getMaterial() == Material.WATER ||
world.getBlockState(pos.north()).getMaterial() == Material.WATER ||
world.getBlockState(pos.south()).getMaterial() == Material.WATER;
return plantable.getPlantType(world, pos.offset(direction)) == EnumPlantType.Plains ||
plantable.getPlantType(world, pos.offset(direction)) == EnumPlantType.Beach && hasWater;
}
示例3: getPlantType
import net.minecraftforge.common.EnumPlantType; //導入方法依賴的package包/類
@Override
public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
{
return EnumPlantType.Beach;
}
示例4: getPlantType
import net.minecraftforge.common.EnumPlantType; //導入方法依賴的package包/類
@Override
public EnumPlantType getPlantType(World world, int x, int y, int z)
{
return EnumPlantType.Beach;
}
示例5: getPlantType
import net.minecraftforge.common.EnumPlantType; //導入方法依賴的package包/類
@Override
public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos)
{
return EnumPlantType.Beach;
}